<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
     
     <!--  Invitation Service Configuration File --> 
     <bean id="invitationService" class="org.alfresco.repo.invitation.InvitationServiceImpl" init-method="init">
        <property name="workflowService" ref="WorkflowService"/>
        <property name="personService" ref="PersonService"/>
        <property name="permissionService" ref="PermissionService"/>
        <property name="authenticationService" ref="AuthenticationService"/>
        <property name="siteService" ref="SiteService"/>
        <property name="namespaceService" ref="NamespaceService"/>
        <property name="nodeService" ref="NodeService"/>
        <property name="userNameGenerator" ref="userNameGenerator"/>
        <property name="passwordGenerator" ref="passwordGenerator"/> 
        <property name="policyComponent">
            <ref bean="policyComponent" />
        </property>
     </bean>
     
    <!-- Site service security bean -->
    <bean id="InvitationService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
     
    <!-- Site service transaction bean -->
    <bean id="InvitationService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
        <property name="transactionManager">
            <ref bean="transactionManager"/>
        </property>
        <property name="transactionAttributes">
            <props>
                <prop key="*">${server.transaction.mode.default}</prop>
            </props>
        </property>
    </bean>
    
    <bean id="InvitationService" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="proxyInterfaces">
            <list>
                <value>org.alfresco.service.cmr.invitation.InvitationService</value>
            </list>
        </property>
        <property name="targetName">
            <value>invitationService</value>
        </property>
        <property name="interceptorNames">
            <list>
                <idref local="InvitationService_transaction"/>
                <idref bean="AuditMethodInterceptor"/>
                <idref bean="exceptionTranslator"/>
                <idref local="InvitationService_security"/>
            </list>
        </property>
    </bean>
        
    <bean id="invitationResourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
    	<property name="resourceBundles">
    		<list>
    			<value>alfresco.messages.invitation-service</value>
    		</list>
    	</property>
   </bean>
   
   <bean id="invitationServiceScript" parent="baseJavaScriptExtension" class="org.alfresco.repo.invitation.script.ScriptInvitationService">
        <property name="extensionName">
            <value>invitations</value>
        </property>
        <property name="invitationService" ref="InvitationService"/>
        <property name="nodeService" ref="NodeService"/>
        <property name="personService" ref="PersonService"/>
    </bean>
    
</beans>