java.lang.Object
org.alfresco.module.org_alfresco_module_rm.capability.RMSecurityCommon
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
AbstractBasePolicy, AbstractCapability, RMAfterInvocationProvider, RMEntryVoter

public class RMSecurityCommon extends Object implements org.springframework.context.ApplicationContextAware
Common security functions. TODO move methods to the appropriate services
Since:
2.0
Author:
Roy Wetherall
  • Field Details

    • NOSET_VALUE

      protected static final int NOSET_VALUE
      No set value
      See Also:
    • nodeService

      protected NodeService nodeService
      Services
    • permissionService

      protected PermissionService permissionService
    • caveatConfigComponent

      protected RMCaveatConfigComponent caveatConfigComponent
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
      Application context
  • Constructor Details

    • RMSecurityCommon

      public RMSecurityCommon()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      See Also:
      • ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
    • setNodeService

      public void setNodeService(NodeService nodeService)
      Parameters:
      nodeService - node service
    • setPermissionService

      public void setPermissionService(PermissionService permissionService)
      Parameters:
      permissionService - permission service
    • setCaveatConfigComponent

      public void setCaveatConfigComponent(RMCaveatConfigComponent caveatConfigComponent)
      Parameters:
      caveatConfigComponent - caveat config service
    • getFilePlanService

      protected FilePlanService getFilePlanService()
      Returns:
      FilePlanService file plan service
    • setTransactionCache

      protected int setTransactionCache(String prefix, NodeRef nodeRef, int value)
      Sets a value into the transaction cache
      Parameters:
      prefix -
      nodeRef -
      value -
      Returns:
    • getTransactionCache

      protected int getTransactionCache(String prefix, NodeRef nodeRef)
      Gets a value from the transaction cache
      Parameters:
      prefix -
      nodeRef -
      Returns:
    • checkRead

      public int checkRead(NodeRef nodeRef)
      Check for RM read
      Parameters:
      nodeRef -
      Returns:
    • checkRead

      public int checkRead(NodeRef nodeRef, boolean allowDMRead)
      Check for RM read
      Parameters:
      nodeRef -
      allowDMRead -
      Returns:
    • checkRmRead

      public int checkRmRead(NodeRef nodeRef)
      Core RM read check
      Parameters:
      nodeRef - node reference
      Returns:
      int see AccessDecisionVoter
    • getTestNode

      protected NodeRef getTestNode(org.aopalliance.intercept.MethodInvocation invocation, Class[] params, int position, boolean parent)