Class CachedPolicyFactory<B extends BehaviourBinding,​P extends Policy>

  • Type Parameters:
    B - the type of Binding
    P - 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 Detail

      • setTryLockTimeout

        public void setTryLockTimeout​(long tryLockTimeout)
      • create

        public P create​(B binding)
        Construct a Policy implementation for the specified binding
        Parameters:
        binding - the binding
        Returns:
        the policy implementation
      • createList

        public Collection<P> createList​(B binding)
        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

        protected static void setTenantService​(TenantService service)
        Sets the Tenant Service
        Parameters:
        service - TenantService
      • getPolicyClass

        protected Class<P> getPolicyClass()
        Gets the Policy class created by this factory
        Returns:
        the policy class
      • toPolicy

        public P toPolicy​(Collection<P> policyList)
        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

        protected static void convertMTArgs​(Object[] args)
        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