mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
AVMNodeService now points at AVMLockingAwareService.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6023 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
d8050806af
commit
63680c700f
@ -67,6 +67,9 @@
|
||||
<ref bean="layerIssuer" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="avmLockingAwareService">
|
||||
<ref bean="avmLockingAwareService"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Bootstrap AVM Locking Service. -->
|
||||
|
@ -73,7 +73,7 @@
|
||||
<ref bean="dictionaryService"/>
|
||||
</property>
|
||||
<property name="avmService">
|
||||
<ref bean="avmService"/>
|
||||
<ref bean="avmLockingAwareService"/>
|
||||
</property>
|
||||
<property name="policyComponent">
|
||||
<ref bean="policyComponent"/>
|
||||
|
@ -751,15 +751,8 @@
|
||||
<!-- The AVMLockingAwareService -->
|
||||
|
||||
<bean id="avmLockingAwareService" class="org.alfresco.repo.avm.AVMLockingAwareService">
|
||||
<property name="avmService">
|
||||
<ref bean="avmService"/>
|
||||
</property>
|
||||
<property name="avmLockingService">
|
||||
<ref bean="avmLockingService"/>
|
||||
</property>
|
||||
<property name="authenticationService">
|
||||
<ref bean="authenticationService"/>
|
||||
</property>
|
||||
<!-- Because of circular dependendencies, this bean's dependencies
|
||||
are grabbed at bootstrap time. -->
|
||||
</bean>
|
||||
|
||||
<bean id="AVMLockingAwareService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
|
@ -49,12 +49,15 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
/**
|
||||
* An AVMLockingService aware implemantation of AVMService.
|
||||
* @author britt
|
||||
*/
|
||||
public class AVMLockingAwareService implements AVMService
|
||||
public class AVMLockingAwareService implements AVMService, ApplicationContextAware
|
||||
{
|
||||
private AVMService fService;
|
||||
|
||||
@ -62,25 +65,27 @@ public class AVMLockingAwareService implements AVMService
|
||||
|
||||
private AuthenticationService fAuthenticationService;
|
||||
|
||||
private ApplicationContext fContext;
|
||||
|
||||
public AVMLockingAwareService()
|
||||
{
|
||||
}
|
||||
|
||||
public void setAvmService(AVMService service)
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
|
||||
{
|
||||
fService = service;
|
||||
fContext = applicationContext;
|
||||
}
|
||||
|
||||
public void setAvmLockingService(AVMLockingService service)
|
||||
public void init()
|
||||
{
|
||||
fLockingService = service;
|
||||
fService = (AVMService)fContext.getBean("avmService");
|
||||
fLockingService = (AVMLockingService)fContext.getBean("avmLockingService");
|
||||
fAuthenticationService = (AuthenticationService)fContext.getBean("authenticationService");
|
||||
}
|
||||
|
||||
public void setAuthenticationService(AuthenticationService service)
|
||||
{
|
||||
fAuthenticationService = service;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.avm.AVMService#addAspect(java.lang.String, org.alfresco.service.namespace.QName)
|
||||
*/
|
||||
|
@ -44,10 +44,17 @@ public class AvmBootstrap extends AbstractLifecycleBean
|
||||
{
|
||||
private List<Issuer> issuers;
|
||||
|
||||
private AVMLockingAwareService avmLockingAwareService;
|
||||
|
||||
public AvmBootstrap()
|
||||
{
|
||||
issuers = new ArrayList<Issuer>(0);
|
||||
}
|
||||
|
||||
public void setAvmLockingAwareService(AVMLockingAwareService service)
|
||||
{
|
||||
avmLockingAwareService = service;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a list of {@link Issuer issuers} to bootstrap on context initialization.
|
||||
@ -69,6 +76,7 @@ public class AvmBootstrap extends AbstractLifecycleBean
|
||||
{
|
||||
issuer.initialize();
|
||||
}
|
||||
avmLockingAwareService.init();
|
||||
}
|
||||
|
||||
/** NO-OP */
|
||||
|
Loading…
x
Reference in New Issue
Block a user