Package org.alfresco.repo.policy
Class CachedPolicyFactory<B extends BehaviourBinding,P extends Policy>
java.lang.Object
org.alfresco.repo.policy.CachedPolicyFactory<B,P>
- Type Parameters:
B- the type of BindingP- the type of Policy
@AlfrescoPublicApi
public class CachedPolicyFactory<B extends BehaviourBinding,P extends Policy>
extends Object
Policy Factory with caching support.
- Author:
- David Caruana
-
Method Summary
Modifier and TypeMethodDescriptionprotected static voidconvertMTArgs(Object[] args) Convert each of the arguments to the spoofed (no tenant prefix) reference.Construct a Policy implementation for the specified bindingcreateList(B binding) Construct a collection of Policy implementations for the specified bindingGets the Policy class created by this factoryprotected static voidsetTenantService(TenantService service) Sets the Tenant Serviceprotected static voidSets the Transaction Invocation HandlervoidsetTryLockTimeout(long tryLockTimeout) toPolicy(Collection<P> policyList) Construct a single aggregate policy implementation for the specified collection of policy implementations.
-
Method Details
-
setTryLockTimeout
public void setTryLockTimeout(long tryLockTimeout) -
create
Construct a Policy implementation for the specified binding- Parameters:
binding- the binding- Returns:
- the policy implementation
-
createList
Construct a collection of Policy implementations for the specified binding- Parameters:
binding- the binding- Returns:
- the collection of policy implementations
-
setTransactionInvocationHandlerFactory
protected static void setTransactionInvocationHandlerFactory(TransactionInvocationHandlerFactory factory) Sets the Transaction Invocation Handler- Parameters:
factory- TransactionInvocationHandlerFactory
-
setTenantService
Sets the Tenant Service- Parameters:
service- TenantService
-
getPolicyClass
Gets the Policy class created by this factory- Returns:
- the policy class
-
toPolicy
Construct a single aggregate policy implementation for the specified collection of policy implementations.- Parameters:
policyList- the policy implementations to aggregate- Returns:
- the aggregate policy implementation
-
convertMTArgs
Convert each of the arguments to the spoofed (no tenant prefix) reference. Converts arguments of Type NodeRef to base name etc.- Parameters:
args- list of non final arguments - the arguments are updated in place
-