Class RolesAllowedHandler
- java.lang.Object
-
- com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
-
- com.sun.enterprise.deployment.annotation.handlers.AbstractCommonAttributeHandler
-
- com.sun.enterprise.deployment.annotation.handlers.RolesAllowedHandler
-
- All Implemented Interfaces:
PostProcessor<EjbContext>,AnnotationHandler
@Service public class RolesAllowedHandler extends AbstractCommonAttributeHandler
This handler is responsible for handling the jakarta.annotation.security.RolesAllowed.- Author:
- Shing Wai Chan
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
ejbProvider, localStrings, logger
-
Fields inherited from interface org.glassfish.apf.AnnotationHandler
ANNOTATION_HANDLER_METADATA
-
-
Constructor Summary
Constructors Constructor Description RolesAllowedHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Annotation>[]getTypeDependencies()voidpostProcessAnnotation(AnnotationInfo ainfo, EjbContext ejbContext)This method is for processing security annotation associated to ejb.protected HandlerProcessingResultprocessAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts)Process Annotation with given EjbContexts.protected HandlerProcessingResultprocessAnnotation(AnnotationInfo ainfo, WebBundleContext webBundleContext)Process Annotation with given WebBundleContext.protected HandlerProcessingResultprocessAnnotation(AnnotationInfo ainfo, WebComponentContext[] webCompContexts)Process Annotation with given WebCompContexts.protected voidprocessEjbMethodSecurity(Annotation authAnnotation, MethodDescriptor md, EjbDescriptor ejbDesc)Add roles and permissions to given method in EjbDescriptor.protected Class<? extends Annotation>[]relatedAnnotationTypes()This method returns a list of related annotation types.protected booleansupportTypeInheritance()This indicates whether the annotation type should be processed for type level in super-class.-
Methods inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractCommonAttributeHandler
processAnnotation
-
Methods inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
getAnnotationType, getConnectorAnnotationTypes, getDefaultFailedResult, getDefaultProcessedResult, getEjbAndWebAnnotationTypes, getEjbAnnotationTypes, getInjectionMethodPropertyName, getInvalidAnnotatedElementHandlerResult, getOverallProcessingResult, getWebAnnotationTypes, log, validateInjectionMethod
-
-
-
-
Method Detail
-
processEjbMethodSecurity
protected void processEjbMethodSecurity(Annotation authAnnotation, MethodDescriptor md, EjbDescriptor ejbDesc)
Add roles and permissions to given method in EjbDescriptor.- Parameters:
annotation-ejbDesc-md-
-
getTypeDependencies
public Class<? extends Annotation>[] getTypeDependencies()
- Specified by:
getTypeDependenciesin interfaceAnnotationHandler- Overrides:
getTypeDependenciesin classAbstractHandler- Returns:
- an array of annotation types this annotation handler would require to be processed (if present) before it processes it's own annotation type.
-
relatedAnnotationTypes
protected Class<? extends Annotation>[] relatedAnnotationTypes()
This method returns a list of related annotation types. Those annotations should not be used with the given annotaton type.
-
processAnnotation
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException
Process Annotation with given EjbContexts.- Specified by:
processAnnotationin classAbstractCommonAttributeHandler- Parameters:
ainfo-ejbContexts-- Returns:
- HandlerProcessingResult
- Throws:
AnnotationProcessorException
-
processAnnotation
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebComponentContext[] webCompContexts) throws AnnotationProcessorException
Process Annotation with given WebCompContexts.- Specified by:
processAnnotationin classAbstractCommonAttributeHandler- Parameters:
ainfo-webCompContexts-- Returns:
- HandlerProcessingResult
- Throws:
AnnotationProcessorException
-
processAnnotation
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebBundleContext webBundleContext) throws AnnotationProcessorException
Process Annotation with given WebBundleContext.- Specified by:
processAnnotationin classAbstractCommonAttributeHandler- Parameters:
ainfo-webBundleContext-- Returns:
- HandlerProcessingResult
- Throws:
AnnotationProcessorException
-
postProcessAnnotation
public void postProcessAnnotation(AnnotationInfo ainfo, EjbContext ejbContext) throws AnnotationProcessorException
This method is for processing security annotation associated to ejb. Dervied class call this method may like to override protected void processEjbMethodSecurity(Annotation authAnnotation, MethodDescriptor md, EjbDescriptor ejbDesc)- Specified by:
postProcessAnnotationin interfacePostProcessor<EjbContext>- Throws:
AnnotationProcessorException
-
supportTypeInheritance
protected boolean supportTypeInheritance()
Description copied from class:AbstractCommonAttributeHandlerThis indicates whether the annotation type should be processed for type level in super-class.- Overrides:
supportTypeInheritancein classAbstractCommonAttributeHandler
-
-