Class RMMethodSecurityInterceptor
java.lang.Object
net.sf.acegisecurity.intercept.AbstractSecurityInterceptor
net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor
org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor
org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
Records Management Method Security Interceptor.
Provides a way to record information about the capabilities being executed and report when an access denied exception is thrown.
- Since:
- 2.2
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.LogloggerFields inherited from class net.sf.acegisecurity.intercept.AbstractSecurityInterceptor
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMessage(String message) Add a message to be displayed in the error report.static voidaddMessage(String message, Object... params) protected net.sf.acegisecurity.intercept.InterceptorStatusTokenbeforeInvocation(Object object) Gets the failure report for the currently recorded capabilities.invoke(org.aopalliance.intercept.MethodInvocation mi) static voidisRMSecurityChecked(boolean newValue) Indicates whether this is a RM security check or notstatic voidreportCapabilityCondition(String name, String conditionName, boolean expected, boolean actual) Report capability condition.static voidreportCapabilityStatus(String name, int status) Report capability status.Methods inherited from class org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor
preMethods inherited from class net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor
getObjectDefinitionSource, getSecureObjectClass, obtainObjectDefinitionSource, setObjectDefinitionSourceMethods inherited from class net.sf.acegisecurity.intercept.AbstractSecurityInterceptor
afterInvocation, afterPropertiesSet, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setApplicationContext, setAuthenticationManager, setRunAsManager, setValidateConfigAttributes
-
Field Details
-
LOGGER
protected static final org.apache.commons.logging.Log LOGGERlogger
-
-
Constructor Details
-
RMMethodSecurityInterceptor
public RMMethodSecurityInterceptor()
-
-
Method Details
-
isRMSecurityChecked
public static void isRMSecurityChecked(boolean newValue) Indicates whether this is a RM security check or not- Parameters:
newValue- true if RM security check, false otherwise
-
addMessage
Add a message to be displayed in the error report.- Parameters:
message- error message
-
addMessage
-
reportCapabilityStatus
Report capability status.- Parameters:
name- capability namestatus- capability status
-
reportCapabilityCondition
public static void reportCapabilityCondition(String name, String conditionName, boolean expected, boolean actual) Report capability condition.- Parameters:
name- capability nameconditionName- capability condition nameexpected- expected valueactual- actual value
-
getFailureReport
Gets the failure report for the currently recorded capabilities.- Returns:
Stringcapability error report
-
beforeInvocation
- Overrides:
beforeInvocationin classnet.sf.acegisecurity.intercept.AbstractSecurityInterceptor- See Also:
-
AbstractSecurityInterceptor.beforeInvocation(java.lang.Object)
-
invoke
- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Overrides:
invokein classnet.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor- Throws:
Throwable- See Also:
-
MethodSecurityInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
-