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

<beans>

    <bean id="scriptService" class="org.alfresco.repo.jscript.RhinoScriptService">
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean>
    
    <bean id="baseScriptImplementation" abstract="true" init-method="register">
        <property name="scriptService">
            <ref bean="scriptService"/>
        </property>
    </bean>    
    
    <bean id="loggerScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.ScriptLogger">
        <property name="scriptName">
            <value>logger</value>
        </property>
    </bean>
    
    <bean id="utilsScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.ScriptUtils">
        <property name="scriptName">
            <value>utils</value>
        </property>
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean>        
    
    <bean id="actionsScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.Actions">
        <property name="scriptName">
            <value>actions</value>
        </property>        
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean>    

    <bean id="searchScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.Search">
        <property name="scriptName">
            <value>search</value>
        </property>        
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
        <property name="storeUrl">
            <value>${spaces.store}</value>
        </property>
    </bean>     

    <bean id="classificationScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.Classification">
        <property name="scriptName">
            <value>classification</value>
        </property>        
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
        <property name="storeUrl">
            <value>${spaces.store}</value>
        </property>
    </bean> 

    <bean id="peopleScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.People">
        <property name="scriptName">
            <value>people</value>
        </property>        
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
        <property name="authorityDAO">
            <ref bean="authorityDAO"/>
        </property>
    </bean>    

    <bean id="sessionScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.Session">
        <property name="scriptName">
            <value>session</value>
        </property>        
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean> 

    <bean id="scriptBehaviour" abstract="true">
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean>
    
    <bean id="avmScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.AVM">
        <property name="scriptName">
            <value>avm</value>
        </property>        
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean>
    
    <bean id="crossCopyScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.CrossRepositoryCopy">
        <property name="scriptName">
            <value>crossRepoCopy</value>
        </property>        
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean>
    
</beans>
