Package org.alfresco.repo.lock.mem
Class LockableAspectInterceptor
java.lang.Object
org.alfresco.repo.lock.mem.LockableAspectInterceptor
- All Implemented Interfaces:
Extensible,org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor
public class LockableAspectInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor, Extensible
NodeService interceptor to spoof the cm:lockable aspect when reading a node that has
an ephemeral lock on it. LockService policies such as beforeDeleteNode that protect
locked nodes, would not fire for nodes with ephemeral locks on them unless
they are reported to have the cm:lockable aspect on them. As ephemeral locks are only held in memory
the nodes have not been marked with this aspect, so the aspect must be spoofed.
This interceptor checks for EPHEMERAL lock directly - MNT-10477 fix.
- Author:
- Matt Ward
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDisables the interceptor for the current thread.voidEnables the interceptor for the current thread.<T extends Trait>
ExtendedTrait<T>voidinit()invoke(org.aopalliance.intercept.MethodInvocation invocation) voidsetAuthenticationService(AuthenticationService authenticationService) voidsetLockService(LockService lockService) voidsetLockStore(LockStore lockStore) voidsetNodeService(NodeService nodeService)
-
Constructor Details
-
LockableAspectInterceptor
public LockableAspectInterceptor()Default constructor.
-
-
Method Details
-
init
public void init() -
invoke
- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Throws:
Throwable
-
enableForThread
public void enableForThread()Enables the interceptor for the current thread. This would normally be used in a finally block to re-enable the interceptor for a previouslydisabledthread. -
disableForThread
public void disableForThread()Disables the interceptor for the current thread. Follow with a try/finally block as described forenableForThread(). -
setLockStore
-
setAuthenticationService
-
setNodeService
-
setLockService
-
getTrait
- Specified by:
getTraitin interfaceExtensible
-