Class RMSecurityCommon
- 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 Summary
Fields Modifier and Type Field Description protected org.springframework.context.ApplicationContext
applicationContext
Application contextprotected RMCaveatConfigComponent
caveatConfigComponent
protected org.alfresco.service.cmr.repository.NodeService
nodeService
Servicesprotected static int
NOSET_VALUE
No set valueprotected org.alfresco.service.cmr.security.PermissionService
permissionService
-
Constructor Summary
Constructors Constructor Description RMSecurityCommon()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
checkRead(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Check for RM readint
checkRead(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean allowDMRead)
Check for RM readint
checkRmRead(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Core RM read checkprotected FilePlanService
getFilePlanService()
protected org.alfresco.service.cmr.repository.NodeRef
getTestNode(org.aopalliance.intercept.MethodInvocation invocation, Class[] params, int position, boolean parent)
protected int
getTransactionCache(String prefix, org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets a value from the transaction cachevoid
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setCaveatConfigComponent(RMCaveatConfigComponent caveatConfigComponent)
void
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
void
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
protected int
setTransactionCache(String prefix, org.alfresco.service.cmr.repository.NodeRef nodeRef, int value)
Sets a value into the transaction cache
-
-
-
Field Detail
-
NOSET_VALUE
protected static final int NOSET_VALUE
No set value- See Also:
- Constant Field Values
-
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
Services
-
permissionService
protected org.alfresco.service.cmr.security.PermissionService permissionService
-
caveatConfigComponent
protected RMCaveatConfigComponent caveatConfigComponent
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
Application context
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- See Also:
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Parameters:
nodeService
- node service
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.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, org.alfresco.service.cmr.repository.NodeRef nodeRef, int value)
Sets a value into the transaction cache- Parameters:
prefix
-nodeRef
-value
-- Returns:
-
getTransactionCache
protected int getTransactionCache(String prefix, org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets a value from the transaction cache- Parameters:
prefix
-nodeRef
-- Returns:
-
checkRead
public int checkRead(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Check for RM read- Parameters:
nodeRef
-- Returns:
-
checkRead
public int checkRead(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean allowDMRead)
Check for RM read- Parameters:
nodeRef
-allowDMRead
-- Returns:
-
checkRmRead
public int checkRmRead(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Core RM read check- Parameters:
nodeRef
- node reference- Returns:
- int see
AccessDecisionVoter
-
getTestNode
protected org.alfresco.service.cmr.repository.NodeRef getTestNode(org.aopalliance.intercept.MethodInvocation invocation, Class[] params, int position, boolean parent)
-
-