<!-- This provides run time options for each of the configured applications.
  -->
<bedework-options>
  <org>
    <bedework>
      <global>
        <module>
          <!-- A dummy module with no directory. -->
          <dir-config classname="org.bedework.calfacade.configs.DirConfigProperties">
            <principalRoot>/principals</principalRoot>
            <userPrincipalRoot>/principals/users</userPrincipalRoot>
            <groupPrincipalRoot>/principals/groups</groupPrincipalRoot>
            <resourcePrincipalRoot>/principals/resources</resourcePrincipalRoot>
            <venuePrincipalRoot>/principals/locations</venuePrincipalRoot>
            <ticketPrincipalRoot>/principals/tickets</ticketPrincipalRoot>
            <hostPrincipalRoot>/principals/hosts</hostPrincipalRoot>

            <!-- 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">
            <principalRoot>/principals</principalRoot>
            <userPrincipalRoot>/principals/users</userPrincipalRoot>
            <groupPrincipalRoot>/principals/groups</groupPrincipalRoot>
            <resourcePrincipalRoot>/principals/resources</resourcePrincipalRoot>
            <venuePrincipalRoot>/principals/locations</venuePrincipalRoot>
            <ticketPrincipalRoot>/principals/tickets</ticketPrincipalRoot>
            <hostPrincipalRoot>/principals/hosts</hostPrincipalRoot>

            <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>
          </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>
        </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>@DIRECTORY-BROWSING-DISALLOWED@</directoryBrowsingDisallowed>

        <indexRoot>lucene/indexroot</indexRoot>
      </syspars>

      <app>
        <!-- ==================================================================
                          Admin web client CalAdmin
             ================================================================== -->
        <CalAdmin classname="org.bedework.calfacade.configs.AdminConfig">
          <autoCreateContacts>false</autoCreateContacts>
          <autoDeleteContacts>false</autoDeleteContacts>
          <autoCreateLocations>false</autoCreateLocations>
          <autoDeleteLocations>false</autoDeleteLocations>
          <allowEditAllCategories>false</allowEditAllCategories>
          <allowEditAllLocations>false</allowEditAllLocations>
          <allowEditAllContacts>false</allowEditAllContacts>
          <categoryOptional>true</categoryOptional>

          <appType>webadmin</appType>

          <!-- 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>
          <portalPlatform>@PORTAL-PLATFORM@</portalPlatform>
        </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>

          <!-- 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>
          <portalPlatform>@PORTAL-PLATFORM@</portalPlatform>

          <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>

          <!-- 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>
          <portalPlatform>@PORTAL-PLATFORM@</portalPlatform>

          <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>

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

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

          <showYearData>false</showYearData>

          <logPrefix>SoEDept</logPrefix>

          <appRoot>/calrsrc</appRoot>
          <portalPlatform>@PORTAL-PLATFORM@</portalPlatform>

          <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>

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

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

          <showYearData>false</showYearData>

          <logPrefix>PersonalCalendar</logPrefix>

          <appRoot>/ucalrsrc</appRoot>
          <portalPlatform>@PORTAL-PLATFORM@</portalPlatform>

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

        <!-- ==================================================================
                          User CalDAV server UserCalDAV
             ================================================================== -->
        <Usercaldav classname="org.bedework.calfacade.configs.CalDAVConfig">
          <!-- 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>
        </Usercaldav>

        <!-- ==================================================================
                          Public (unauthenticated) CalDAV server PublicCalDAV
             ================================================================== -->
        <Pubcaldav classname="org.bedework.calfacade.configs.CalDAVConfig">
          <!-- 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>
        </Pubcaldav>

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

