<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">


<beans default-lazy-init="false">

   <!-- This is used by the template view as default settings -->
   <bean id="defaultTemplateDef" class="org.sakaiproject.metaobj.utils.mvc.impl.SimpleBeanWrapper">
      <property name="wrappedBean">
         <props>
            <!--
                        <prop key="_rightMenu">/WEB-INF/jsp/rightMenu.jsp</prop>
                        <prop key="_leftMenu">/WEB-INF/jsp/leftMenu.jsp</prop>
                        <prop key="_header">/WEB-INF/jsp/header.jsp</prop>
                        <prop key="_footer">/WEB-INF/jsp/footer.jsp</prop>
            -->
            <prop key="_template">/WEB-INF/jsp/template.jsp</prop>
         </props>
      </property>
   </bean>

   <bean id="ospConfig" class="org.sakaiproject.metaobj.utils.Config">
      <property name="properties">
         <props>
            <prop key="baseUrl">${system.baseUrl}</prop>
            <prop key="allowGuests">true</prop>
            <prop key="institutionName">OSP</prop>
            <prop key="institutionFullName">Open Source Portfolio</prop>
         </props>
      </property>
   </bean>

   <bean id="idManager" class="org.sakaiproject.metaobj.shared.mgt.IdManagerImpl">
   </bean>
   <bean id="idCustomEditor" class="org.sakaiproject.metaobj.shared.mgt.IdCustomEditor">
      <property name="idManager">
         <ref bean="idManager"/>
      </property>
   </bean>

   <bean id="idListCustomEditor" class="org.sakaiproject.metaobj.shared.mgt.IdListCustomEditor">
      <property name="idManager">
         <ref bean="idManager"/>
      </property>
   </bean>

   <bean id="agentManager" class="org.sakaiproject.metaobj.security.impl.sakai.AgentManager">
      <property name="ospiIdManager">
         <ref bean="idManager"/>
      </property>
      <!--<property name="baseAgentManager"><ref bean="baseAgentManager"/></property>-->
      <!--<property name="agentHome"><ref bean="agentXmlHome"/></property>-->
   </bean>
   <!--
      <bean id="baseAgentManager" class="org.sakaiproject.metaobj.shared.mgt.HibernateAgentManager">
          <property name="sessionFactory"><ref bean="sessionFactory"/></property>
         <property name="listeners">
            <list>
               <ref bean="repositoryManager"/>
               <ref bean="guestAgentManager"/>
            </list>
         </property>
      </bean>
   -->

   <bean id="beanFactory" class="org.sakaiproject.metaobj.utils.BeanFactory">
   </bean>

   <bean id="fieldValueWrapperFactory" class="org.sakaiproject.metaobj.shared.mgt.factories.FieldValueWrapperFactory">
      <property name="wrappedClassNamesMap">
         <props>
            <prop key="java.util.Date">org.sakaiproject.metaobj.shared.model.DateBean</prop>
         </props>
      </property>
   </bean>

   <bean id="beanValidator" class="org.sakaiproject.metaobj.shared.control.XmlValidator"/>

   <bean id="structuredArtifactValidator" class="org.sakaiproject.metaobj.shared.control.StructuredArtifactValidator"/>

   <bean id="artifactFinderManager" class="org.sakaiproject.metaobj.shared.mgt.ArtifactFinderManager">
      <property name="finders">
         <map>
            <entry key="fileArtifact">
               <ref bean="fileArtifactFinder"/>
            </entry>
         </map>
      </property>
      <!-- default finder, if can't find a finder in the finder list this one is used -->
      <property name="artifactFinder">
         <ref bean="artifactFinder"/>
      </property>

   </bean>


   <!-- Configurer that sets up a VelocityEngine for Velocity views -->
   <!--
      <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
         <property name="resourceLoaderPath"><value>WEB-INF/templates/</value></property>
         <property name="velocityProperties">
            <props>
               <prop key="velocimacro.permissions.allowInline">true</prop>
               <prop key="velocimacro.permissions.allow.inline.local.scope">true</prop>
               <prop key="velocimacro.library.autoreload">true</prop>
            </props>
         </property>
      </bean>
     -->

   <bean id="structuredArtifactDefinitionManager" class="org.sakaiproject.metaobj.shared.mgt.impl.StructuredArtifacDefinitionManagerImpl">
      <property name="sessionFactory">
         <ref bean="sessionFactory"/>
      </property>
      <property name="idManager">
         <ref bean="idManager"/>
      </property>
      <property name="artifactFinderManager">
         <ref bean="artifactFinderManager"/>
      </property>
      <property name="authzManager">
         <ref bean="authzManager"/>
      </property>
      <property name='worksiteManager'>
         <ref bean="org.sakaiproject.metaobj.worksite.mgt.WorksiteManager"/>
      </property>
   </bean>
   <!--
      <bean id="exportManager" class="org.sakaiproject.metaobj.admin.ExportManager">
         <property name="repositoryManager">
            <ref bean="repositoryManager"/>
         </property>
         <property name="fileNameValidator"><ref bean="fileValidator"/></property>
         <property name="idManager"><ref bean="idManager"/></property>

      </bean>
   -->

   <bean id="org.sakaiproject.metaobj.worksite.mgt.WorksiteManager"
      class="org.sakaiproject.metaobj.worksite.mgt.impl.WorksiteManagerImpl">
      <property name="idManager">
         <ref bean="idManager"/>
      </property>
   </bean>

   <!--
      <bean id="org.sakaiproject.metaobj.shared.mgt.PortalParamManager"
            class="org.sakaiproject.metaobj.shared.mgt.impl.PortalParamManagerImpl" >

         <property name="parameters">
            <list>
               <value>pid</value>
               <value>panelId</value>
            </list>
         </property>

      </bean>



      <bean id="org.sakaiproject.metaobj.admin.intf.SakaiIntegrationService"
         class="org.sakaiproject.metaobj.admin.service.SakaiIntegrationServiceImpl">
      </bean>

      <bean id="org.sakaiproject.metaobj.admin.intf.SakaiIntegrationPlugin.toolPages"
         class="org.sakaiproject.metaobj.admin.service.ToolPageIntegrationPlugin">
         <property name="title">
            <value>Pages to Add</value>
         </property>
         <property name="description">
            <value>Pages to Add</value>
         </property>
         <property name="potentialIntegrations">
            <list>
               <bean class="org.sakaiproject.metaobj.admin.model.IntegrationList">
                  <property name="title">
                     <value>Home</value>
                  </property>
                  <property name="description">
                     <value>Add User Home Page to:</value>
                  </property>
                  <property name="options">
                     <list>
                        <ref bean="org.sakaiproject.metaobj.admin.model.IntegrationOption.homePageToUserTemplate" />
                        <ref bean="org.sakaiproject.metaobj.admin.model.IntegrationOption.homePageToExistingUsers" />
                     </list>
                  </property>
               </bean>
               <bean class="org.sakaiproject.metaobj.admin.model.IntegrationList">
                  <property name="title">
                     <value>Admin Tools</value>
                  </property>
                  <property name="description">
                     <value>Add Global Glossary to:</value>
                  </property>
                  <property name="options">
                     <list>
                     </list>
                  </property>
               </bean>
               <bean class="org.sakaiproject.metaobj.admin.model.IntegrationList">
                  <property name="title">
                     <value>Admin Tools</value>
                  </property>
                  <property name="description">
                     <value>Add Global Forms to:</value>
                  </property>
                  <property name="options">
                     <list>
                     </list>
                  </property>
               </bean>
            </list>
         </property>
      </bean>

      <bean id="org.sakaiproject.metaobj.admin.intf.SakaiIntegrationPlugin.roles"
         class="org.sakaiproject.metaobj.admin.service.SakaiRoleCreationIntegrationPlugin">
         <property name="worksiteManager">
            <ref bean="org.sakaiproject.metaobj.worksite.mgt.WorksiteManager"/>
         </property>
         <property name="title">
            <value>Roles to Add</value>
         </property>
         <property name="description">
            <value>Roles to Add</value>
         </property>
         <property name="potentialIntegrations">
            <list>
               <bean class="org.sakaiproject.metaobj.admin.model.IntegrationList">
                  <property name="title">
                     <value>Reviewer</value>
                  </property>
                  <property name="description">
                     <value>Add Reviewer Role to:</value>
                  </property>
                  <property name="options">
                     <list>
                     </list>
                  </property>
               </bean>
            </list>
         </property>
      </bean>

      <bean id="org.sakaiproject.metaobj.admin.model.IntegrationOption.homePageToExistingUsers"
         class="org.sakaiproject.metaobj.admin.service.ExistingWorksitePageOption">
         <property name="label">
            <value>Existing User Sites</value>
         </property>
         <property name="worksiteType">
            <value>user</value>
         </property>
         <property name="pageName">
            <value>OSP Home</value>
         </property>
         <property name="layout">
            <value>1</value>
         </property>
         <property name="positionFromEnd">
            <value>1</value>
         </property>
         <property name="tools">
            <list>
               <ref bean="org.sakaiproject.metaobj.admin.service.ToolOption.worksiteHome" />
            </list>
         </property>
      </bean>

      <bean id="org.sakaiproject.metaobj.admin.model.IntegrationOption.homePageToUserTemplate"
         class="org.sakaiproject.metaobj.admin.service.PageOption">
         <property name="label">
            <value>Admin Site</value>
         </property>
         <property name="worksiteId">
            <value>~admin</value>
         </property>
         <property name="pageName">
            <value>OSP Home</value>
         </property>
         <property name="layout">
            <value>1</value>
         </property>
         <property name="positionFromEnd">
            <value>1</value>
         </property>
         <property name="tools">
            <list>
               <ref bean="org.sakaiproject.metaobj.admin.service.ToolOption.worksiteHome" />
            </list>
         </property>
      </bean>

      <bean id="org.sakaiproject.metaobj.admin.service.ToolOption.worksiteHome"
         class="org.sakaiproject.metaobj.admin.service.ToolOption">
         <property name="toolId">
            <value>osp.list</value>
         </property>
         <property name="title">
            <value>Worksites</value>
         </property>
         <property name="layoutHints">
            <value>0,0</value>
         </property>
         <property name="initProperties">
            <props>
               <prop key="listGenId">worksites</prop>
            </props>
         </property>
      </bean>
   -->
   <!-- Configurer that sets up a VelocityEngine for Velocity views -->
   <!--
      <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
         <property name="resourceLoaderPath"><value>WEB-INF/templates/</value></property>
         <property name="velocityProperties">
            <props>
               <prop key="velocimacro.permissions.allowInline">true</prop>
               <prop key="velocimacro.permissions.allow.inline.local.scope">true</prop>
               <prop key="velocimacro.library.autoreload">true</prop>
            </props>
         </property>
      </bean>
   -->
</beans>
