com.sun.enterprise.deployment.annotation.handlers
Class ServletSecurityHandler
java.lang.Object
com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
com.sun.enterprise.deployment.annotation.handlers.ServletSecurityHandler
- All Implemented Interfaces:
- AnnotationHandler
@Service
public class ServletSecurityHandler
- extends AbstractHandler
This handler is responsible in handling
javax.servlet.annotation.ServletSecurity.
- Author:
- Shing Wai Chan
| Methods inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler |
getConnectorAnnotationTypes, getDefaultFailedResult, getDefaultProcessedResult, getEjbAndWebAnnotationTypes, getEjbAnnotationTypes, getInjectionMethodPropertyName, getInvalidAnnotatedElementHandlerResult, getOverallProcessingResult, getWebAnnotationTypes, log, validateInjectionMethod |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletSecurityHandler
public ServletSecurityHandler()
getAnnotationType
public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
- Returns:
- the annotation type this annotation handler is handling
processAnnotation
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
WebComponentContext[] webCompContexts)
throws AnnotationProcessorException
- Process Annotation with given WebCompContexts.
- Returns:
- HandlerProcessingResult
- Throws:
AnnotationProcessorException
processAnnotation
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
WebBundleContext webBundleContext)
throws AnnotationProcessorException
- Process Annotation with given WebBundleContext.
- Returns:
- HandlerProcessingResult
- Throws:
AnnotationProcessorException
getTypeDependencies
public java.lang.Class<? extends java.lang.annotation.Annotation>[] getTypeDependencies()
- Specified by:
getTypeDependencies in interface AnnotationHandler- Overrides:
getTypeDependencies in class AbstractHandler
- Returns:
- an array of annotation types this annotation handler would
require to be processed (if present) before it processes it's own
annotation type.
getUrlPatternsWithoutSecurityConstraint
public static java.util.Set<java.lang.String> getUrlPatternsWithoutSecurityConstraint(WebComponentDescriptor webCompDesc)
- Given a WebComponentDescriptor, find the set of urlPattern which does not have
any existing url pattern in SecurityConstraint
- Parameters:
webCompDesc -
- Returns:
- a list of url String
createSecurityConstraint
public static SecurityConstraint createSecurityConstraint(WebBundleDescriptor webBundleDesc,
java.util.Set<java.lang.String> urlPatterns,
java.lang.String[] rolesAllowed,
javax.servlet.annotation.ServletSecurity.EmptyRoleSemantic emptyRoleSemantic,
javax.servlet.annotation.ServletSecurity.TransportGuarantee transportGuarantee,
java.lang.String httpMethod)
processAnnotation
public HandlerProcessingResult processAnnotation(AnnotationInfo ainfo)
throws AnnotationProcessorException
- Process a particular annotation which type is the same as the
one returned by @see getAnnotationType(). All information
pertinent to the annotation and its context is encapsulated
in the passed AnnotationInfo instance.
This is a method in interface AnnotationHandler.
- Parameters:
ainfo - the annotation information
- Throws:
AnnotationProcessorException
Copyright © 2012 GlassFish Community. All Rights Reserved.