Class MethodSecurityBean<R>
java.lang.Object
org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityBean<R>
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class MethodSecurityBean<R>
extends Object
implements org.springframework.beans.factory.InitializingBean
Support to simulate interceptor-driven permissions.
- Since:
- 4.0
- Author:
- janv, Derek Hulley
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.MethodSecurityBean(MethodSecurityInterceptor methodSecurityInterceptor, Class<?> service, String methodName) Helper constructor to supply necessary values -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyPermissions(Collection<R> toCheck, net.sf.acegisecurity.Authentication authentication, int targetResultCount) applyPermissions(Collection<R> toCheck, net.sf.acegisecurity.Authentication authentication, int targetResultCount, long cutOffAfterTimeMs, int cutOffAfterCount) voidsetMethodName(String methodName) voidsetMethodSecurityInterceptor(org.aopalliance.intercept.MethodInterceptor methodInterceptor) voidsetService(Class<?> service) toString()
-
Constructor Details
-
MethodSecurityBean
public MethodSecurityBean()Default constructor. Use setter methods for initialization. -
MethodSecurityBean
public MethodSecurityBean(MethodSecurityInterceptor methodSecurityInterceptor, Class<?> service, String methodName) Helper constructor to supply necessary values
-
-
Method Details
-
setMethodSecurityInterceptor
public void setMethodSecurityInterceptor(org.aopalliance.intercept.MethodInterceptor methodInterceptor) - Parameters:
methodInterceptor- an method interceptor, ideally a MethodSecurityInterceptor
-
setService
-
setMethodName
-
toString
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
applyPermissions
public Collection<R> applyPermissions(Collection<R> toCheck, net.sf.acegisecurity.Authentication authentication, int targetResultCount) -
applyPermissions
public Collection<R> applyPermissions(Collection<R> toCheck, net.sf.acegisecurity.Authentication authentication, int targetResultCount, long cutOffAfterTimeMs, int cutOffAfterCount)
-