<!-- This provides run time options for each of the configured applications.
  -->
<bedework-options>
  <org>
    <bedework>
      <global>
        <version>3.5</version>

        <!-- This property is how the running system finds the system settings.
             In theory we could have multiple settings with different names
         -->
        <systemName>bedework</systemName>

        <!-- This is used to prefix administrative group names to distinguish
             them from user group names. -->
        <adminGroupsIdPrefix>agrp_</adminGroupsIdPrefix>

        <!-- Uncomment this and set the value to one of the supported portals
             Values that will result in something happening are
             liferay5
             liferay4
             uportal2
        <portalPlatform>your-portal</portalPlatform>
         -->

        <!-- uris to cross link apps - of dubious usefulness -->
        <publicAdminUri>/caladmin</publicAdminUri>
        <publicCalendarUri>/cal</publicCalendarUri>
        <personalCalendarUri>/ucal</personalCalendarUri>

        <!-- CardDAV server locations -->
        <publicCardDAVUri>http://localhost:8080/carddav</publicCardDAVUri>
        <personalCardDAVUri>http://localhost:8080/ucarddav</personalCardDAVUri>

        <!-- Timezone server locations -->
        <timezonesUri>http://localhost:8080/tzsvr</timezonesUri>

        <systemRoots  classname="org.bedework.calfacade.configs.SystemRoots" >
          <principalRoot>/principals</principalRoot>
          <userPrincipalRoot>/principals/users</userPrincipalRoot>
          <groupPrincipalRoot>/principals/groups</groupPrincipalRoot>
          <bwadmingroupPrincipalRoot>/principals/groups/bwadmin</bwadmingroupPrincipalRoot>
          <resourcePrincipalRoot>/principals/resources</resourcePrincipalRoot>
          <venuePrincipalRoot>/principals/locations</venuePrincipalRoot>
          <ticketPrincipalRoot>/principals/tickets</ticketPrincipalRoot>
          <hostPrincipalRoot>/principals/hosts</hostPrincipalRoot>
        </systemRoots>

        <module>
          <!-- A dummy module with no directory. -->
          <dir-config classname="org.bedework.calfacade.configs.DirConfigProperties">
            <!-- List domains at your site separated by commas.
                    A single leading wildcard "*" is allowed.
                    If there is a single domain with no wildcard it wil be stripped from
                    user accounts as they are entered and added as they are turned
                    back into CUAs.
                    Wildcarded or multiple domains will cause retention of the domain
                    (partially untested feature) -->
            <domains>mysite.edu</domains>

            <!-- defaultDomain can be left unspecified for no default or a single
                   exactly specified domain  -->
            <defaultDomain>mysite.edu</defaultDomain>

            <debug>true</debug>
          </dir-config>

          <!-- An example of how we might configure an ldap directory module. -->
          <user-ldap-group classname="org.bedework.calfacade.configs.LdapConfigProperties">
            <domains>mysite.edu</domains>
            <defaultDomain>mysite.edu</defaultDomain>

            <initialContextFactory>com.sun.jndi.ldap.LdapCtxFactory</initialContextFactory>
            <providerUrl>ldap://localhost/</providerUrl>
            <groupContextDn>ou=groups, dc=bedework, dc=org</groupContextDn>
            <groupMemberAttr>uniqueMember</groupMemberAttr>
            <userDnPrefix>uid=</userDnPrefix>
            <userDnSuffix>,ou=accounts, dc=bedework, dc=org</userDnSuffix>
            <groupDnPrefix>cn=</groupDnPrefix>
            <groupDnSuffix>,ou=groups, dc=bedework, dc=org</groupDnSuffix>
            <debug>true</debug>

            <!--
            <securityAuthentication>simple</securityAuthentication>
            <securityProtocol>NONE</securityProtocol>
            <authDn></authDn>
            <authPw></authPw>
             -->
          </user-ldap-group>

          <testmail classname="org.bedework.mail.MailConfigProperties">
            <protocol>smtp</protocol>
            <protocolClass>com.sun.mail.smtp.SMTPTransport</protocolClass>
            <serverIp>localhost</serverIp>
            <from>calendar.myplace.edu</from>
            <subject>Message from demo calendar server</subject>
            <disabled>false</disabled>
          </testmail>

          <dummymail classname="org.bedework.mail.MailConfigProperties">
            <disabled>false</disabled>
          </dummymail>

          <default-pwencrypt classname="org.bedework.calfacade.security.DefaultPwEncryptionConfig">
            <privKeys>@QUICKSTART_DIR@/data/bedework/privkeys</privKeys>
            <pubKeys>@QUICKSTART_DIR@/data/bedework/pubkeys</pubKeys>

            <debug>true</debug>
            <verbose>true</verbose>
          </default-pwencrypt>
        </module>
      </global>

      <syspars classname="org.bedework.calfacade.BwSystem">
        <!-- name must match the global system name -->
        <name>bedework</name>
        <tzid>America/New_York</tzid>
        <systemid>demobedework@mysite.edu</systemid>

        <publicCalendarRoot>public</publicCalendarRoot>
        <userCalendarRoot>user</userCalendarRoot>
        <userDefaultCalendar>calendar</userDefaultCalendar>
        <defaultTrashCalendar>Trash</defaultTrashCalendar>
        <userInbox>Inbox</userInbox>
        <userOutbox>Outbox</userOutbox>
        <deletedCalendar>Deleted</deletedCalendar>
        <busyCalendar>Busy</busyCalendar>

        <defaultUserViewName>All</defaultUserViewName>
        <defaultUserHour24>true</defaultUserHour24>

        <publicUser>public-user</publicUser>

        <httpConnectionsPerUser>10</httpConnectionsPerUser>
        <httpConnectionsPerHost>50</httpConnectionsPerHost>
        <httpConnections>200</httpConnections>

        <!-- size limits -->
        <maxPublicDescriptionLength>500</maxPublicDescriptionLength>
        <maxUserDescriptionLength>5000</maxUserDescriptionLength>
        <maxUserEntitySize>100000</maxUserEntitySize>
        <defaultUserQuota>10000000</defaultUserQuota> <!-- 10 Meg OK? -->

        <!-- Max number of instances per recurring event -->
        <maxInstances>1000</maxInstances>

        <!-- Max number of years per recurring event -->
        <maxYears>50</maxYears>

        <userauthClass>org.bedework.calsvc.directory.UserAuthUWDbImpl</userauthClass>
        <mailerClass>org.bedework.mail.DummyMailer</mailerClass>
        <admingroupsClass>org.bedework.calsvc.directory.AdminGroupsDbImpl</admingroupsClass>
        <!--
        <usergroupsClass>org.bedework.calsvc.directory.UserGroupsLdapImpl</usergroupsClass>
        -->
        <usergroupsClass>org.bedework.calsvc.directory.GroupsDbImpl</usergroupsClass>

        <directoryBrowsingDisallowed>true</directoryBrowsingDisallowed>

        <indexRoot>lucene/indexroot</indexRoot>

        <rootUsers>admin</rootUsers>
      </syspars>

      <app>
        <!-- ==================================================================
                          Timezones server
             ================================================================== -->
        <tzsvr classname="org.bedework.calfacade.configs.ConfigCommon">
          <appType>tzsvr</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>true</guestMode>
        </tzsvr>

        <!-- ==================================================================
                          Config web client
             ================================================================== -->
        <bwconfig classname="org.bedework.calfacade.configs.ConfigCommon">
          <appType>webconfig</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>false</guestMode>
        </bwconfig>

        <!-- ==================================================================
                          Admin web client CalAdmin
             ================================================================== -->
        <CalAdmin classname="org.bedework.calfacade.configs.AdminConfig">
          <autoCreateContacts>false</autoCreateContacts>
          <autoDeleteContacts>false</autoDeleteContacts>
          <autoCreateLocations>false</autoCreateLocations>
          <autoDeleteLocations>false</autoDeleteLocations>

          <!-- if these are false only superuser can maintain public
               categories, locations and contacts -->
          <allowEditAllCategories>true</allowEditAllCategories>
          <allowEditAllLocations>true</allowEditAllLocations>
          <allowEditAllContacts>true</allowEditAllContacts>

          <categoryOptional>true</categoryOptional>

          <noGroupAllowed>false</noGroupAllowed>

          <appType>webadmin</appType>
          <publicAdmin>true</publicAdmin>
          <guestMode>false</guestMode>

          <!-- This will become a system configuration in time -->
          <submissionRoot>/public/unbrowsable/submissions</submissionRoot>

          <!-- Default value for 24 hour mode -->
          <hour24>true</hour24>

          <!-- Default value for minute increments -->
          <minIncrement>5</minIncrement>

          <logPrefix>PubEventsAdmin</logPrefix>

          <appRoot>http://localhost:8080/caladminrsrc</appRoot>
        </CalAdmin>

        <!-- ==================================================================
                          Public event submission web client EventSubmit
             ================================================================== -->
        <EventSubmit classname="org.bedework.calfacade.configs.ClientConfig">
          <autoCreateContacts>false</autoCreateContacts>
          <autoDeleteContacts>false</autoDeleteContacts>
          <autoCreateLocations>false</autoCreateLocations>
          <autoDeleteLocations>false</autoDeleteLocations>

          <appType>websubmit</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>false</guestMode>

          <!-- This will become a system configuration in time -->
          <submissionRoot>/public/unbrowsable/submissions</submissionRoot>

          <!-- Default value for 24 hour mode -->
          <hour24>true</hour24>

          <!-- Default value for minute increments -->
          <minIncrement>5</minIncrement>

          <showYearData>false</showYearData>

          <logPrefix>EventSubmit</logPrefix>

          <appRoot>http://localhost:8080/eventsubmitrsrc</appRoot>

          <refreshAction>setup.do</refreshAction>
          <refreshInterval>900</refreshInterval>
        </EventSubmit>

        <!-- ==================================================================
                          Public web client Events
             ================================================================== -->
        <Events classname="org.bedework.calfacade.configs.ClientConfig">
          <cachingOn>true</cachingOn>
          <cachePrefix>bwpubevents</cachePrefix>

          <autoCreateContacts>false</autoCreateContacts>
          <autoDeleteContacts>false</autoDeleteContacts>
          <autoCreateLocations>false</autoCreateLocations>
          <autoDeleteLocations>false</autoDeleteLocations>

          <appType>webpublic</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>true</guestMode>

          <!-- Default value for 24 hour mode -->
          <hour24>true</hour24>

          <!-- Default value for minute increments -->
          <minIncrement>5</minIncrement>

          <showYearData>false</showYearData>

          <logPrefix>PubEvents</logPrefix>

          <appRoot>http://localhost:8080/calrsrc</appRoot>

          <refreshAction>setup.do</refreshAction>
          <refreshInterval>300</refreshInterval>

          <calSuite>MainCampus</calSuite>
        </Events>

        <!-- ==================================================================
                          Demo departmental Public web client SoEDept
             ================================================================== -->
        <SoEDept classname="org.bedework.calfacade.configs.ClientConfig">
          <cachingOn>true</cachingOn>
          <cachePrefix>bwpubevents</cachePrefix>

          <autoCreateContacts>false</autoCreateContacts>
          <autoDeleteContacts>false</autoDeleteContacts>
          <autoCreateLocations>false</autoCreateLocations>
          <autoDeleteLocations>false</autoDeleteLocations>

          <appType>webpublic</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>true</guestMode>

          <!-- Default value for 24 hour mode -->
          <hour24>true</hour24>

          <!-- Default value for minute increments -->
          <minIncrement>5</minIncrement>

          <showYearData>false</showYearData>

          <logPrefix>SoEDept</logPrefix>

          <appRoot>http://localhost:8080/calrsrc</appRoot>

          <refreshAction>setup.do</refreshAction>
          <refreshInterval>300</refreshInterval>

          <calSuite>SoEDepartmental</calSuite>
        </SoEDept>

        <!-- ==================================================================
                          User web client UserCal
             ================================================================== -->
        <UserCal classname="org.bedework.calfacade.configs.ClientConfig">
          <autoCreateContacts>false</autoCreateContacts>
          <autoDeleteContacts>false</autoDeleteContacts>
          <autoCreateLocations>false</autoCreateLocations>
          <autoDeleteLocations>false</autoDeleteLocations>

          <appType>webuser</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>false</guestMode>

          <!-- Default value for 24 hour mode -->
          <hour24>true</hour24>

          <!-- Default value for minute increments -->
          <minIncrement>5</minIncrement>

          <showYearData>false</showYearData>

          <logPrefix>PersonalCalendar</logPrefix>

          <appRoot>http://localhost:8080/ucalrsrc</appRoot>

          <refreshAction>setup.do</refreshAction>
          <refreshInterval>300</refreshInterval>
        </UserCal>

        <!-- ==================================================================
                          User CalDAV server UserCalDAV
             ================================================================== -->
        <Usercaldav classname="org.bedework.caldav.util.CalDAVConfig">
          <appType>usercaldav</appType>
          <!--
          <publicAdmin>false</publicAdmin>
          -->
          <guestMode>false</guestMode>

          <sysintfImpl>org.bedework.caldav.bwserver.BwSysIntfImpl</sysintfImpl>

          <!-- Comment out or delete for no real time server to server service
               Currently under development and may present a security risk in
               production systems -->
          <realTimeServiceURI>/rtsvc</realTimeServiceURI>

          <!-- Comment out or delete for no freebusy url service -->
          <fburlServiceURI>/fbsvc</fburlServiceURI>

          <!-- Comment out or delete for no web calendar service -->
          <webcalServiceURI>/webcal</webcalServiceURI>
        </Usercaldav>

        <!-- ==================================================================
                          Public (unauthenticated) CalDAV server PublicCalDAV
             ================================================================== -->
        <Pubcaldav classname="org.bedework.caldav.util.CalDAVConfig">
          <appType>publiccaldav</appType>
          <!--
          <publicAdmin>false</publicAdmin>
           -->
          <guestMode>true</guestMode>

          <sysintfImpl>org.bedework.caldav.bwserver.BwSysIntfImpl</sysintfImpl>

          <!-- Comment out or delete for no real time server to server service
               Currently under development and may present a security risk in
               production systems -->
          <realTimeServiceURI>/rtsvc</realTimeServiceURI>

          <!-- Comment out or delete for no freebusy url service -->
          <fburlServiceURI>/fbsvc</fburlServiceURI>

          <!-- Comment out or delete for no web calendar service -->
          <webcalServiceURI>/webcal</webcalServiceURI>
        </Pubcaldav>

        <!-- ==================================================================
                          CalDAV test suite
             ================================================================== -->
        <caldavTest classname="org.bedework.calfacade.configs.ConfigCommon">
          <appType>caldavTest</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>false</guestMode>
        </caldavTest>

        <!-- ==================================================================
                          bedework test suite
             ================================================================== -->
        <test classname="org.bedework.calfacade.configs.ConfigCommon">
          <appType>testsuite</appType>
          <publicAdmin>false</publicAdmin>
          <guestMode>false</guestMode>
        </test>

        <!-- ==================================================================
                          Dump restore program dumpres
             ================================================================== -->
        <dumpres classname="org.bedework.calfacade.configs.DumpRestoreConfig">
          <debug>true</debug>
          <appType>dumprestore</appType>
          <guestMode>true</guestMode>
          <debugEntity>false</debugEntity>
          <superGroupName>campusAdminGroups</superGroupName>
          <defaultPublicCalPath>/public/Other Events/Other</defaultPublicCalPath>
        </dumpres>

        <!-- ==================================================================
                          Crawler program
             ================================================================== -->
        <bwcrawler classname="org.bedework.calfacade.configs.BwCrawlerConfig">
          <debug>true</debug>
          <appType>bwcrawler</appType>
          <guestMode>true</guestMode>
          <debugEntity>false</debugEntity>
        </bwcrawler>

        <!-- ==================================================================
                          System events logger program
             ================================================================== -->
        <sysevlog classname="org.bedework.calfacade.configs.BwCrawlerConfig">
          <debug>true</debug>
          <appType>sysevlog</appType>
          <guestMode>true</guestMode>
          <debugEntity>false</debugEntity>
        </sysevlog>
      </app>
    </bedework>
  </org>
</bedework-options>

