@Interceptor @Priority(value=4000) public class RolesCDIInterceptor extends Object
| Constructor and Description |
|---|
RolesCDIInterceptor(javax.enterprise.inject.spi.Bean<?> interceptedBean,
javax.enterprise.inject.spi.BeanManager beanManager) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAccessPermitted(RolesPermitted roles)
Check that the roles allowed by the class or method match the roles currently granted to the caller.
|
static <A extends Annotation> |
getAnnotationFromMethod(javax.enterprise.inject.spi.BeanManager beanManager,
Method annotatedMethod,
Class<A> annotationType) |
Object |
method(javax.interceptor.InvocationContext invocationContext)
Method invoked whenever a method annotated with @Roles, or a method within a class annotated with @Roles is
called.
|
@Inject
public RolesCDIInterceptor(@Intercepted
javax.enterprise.inject.spi.Bean<?> interceptedBean,
javax.enterprise.inject.spi.BeanManager beanManager)
public Object method(javax.interceptor.InvocationContext invocationContext) throws Exception
invocationContext - Context provided by Weld.Exceptionpublic boolean checkAccessPermitted(RolesPermitted roles)
roles - The roles declared within the @Roles annotation.public static <A extends Annotation> Optional<A> getAnnotationFromMethod(javax.enterprise.inject.spi.BeanManager beanManager, Method annotatedMethod, Class<A> annotationType)
Copyright © 2019. All rights reserved.