com.sun.enterprise.deployment.annotation.handlers
Class DenyAllHandler

java.lang.Object
  extended by com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
      extended by com.sun.enterprise.deployment.annotation.handlers.DenyAllHandler
All Implemented Interfaces:
PostProcessor<EjbContext>, AnnotationHandler

@Service
public class DenyAllHandler
extends AbstractHandler

This handler is responsible for handling the javax.annotation.security.DenyAll.

Author:
Shing Wai Chan

Field Summary
 
Fields inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
ejbProvider, localStrings, logger
 
Constructor Summary
DenyAllHandler()
           
 
Method Summary
 java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
           
 java.lang.Class<? extends java.lang.annotation.Annotation>[] getTypeDependencies()
           
 void postProcessAnnotation(AnnotationInfo ainfo, EjbContext ejbContext)
          This method is for processing security annotation associated to ejb.
 HandlerProcessingResult processAnnotation(AnnotationInfo ainfo)
          Process a particular annotation which type is the same as the one returned by @see getAnnotationType().
protected  HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts)
          Process Annotation with given EjbContexts.
protected  HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebBundleContext webBundleContext)
          Process Annotation with given WebBundleContext.
protected  HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebComponentContext[] webCompContexts)
          Process Annotation with given WebCompContexts.
protected  void processEjbMethodSecurity(java.lang.annotation.Annotation authAnnotation, MethodDescriptor md, EjbDescriptor ejbDesc)
          This method processes the EJB Security for the given Annotation.
protected  java.lang.Class<? extends java.lang.annotation.Annotation>[] relatedAnnotationTypes()
          This method returns a list of related annotation types.
protected  boolean supportTypeInheritance()
          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.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
 

Constructor Detail

DenyAllHandler

public DenyAllHandler()
Method Detail

getAnnotationType

public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
Returns:
the annoation type this annotation handler is handling

processEjbMethodSecurity

protected void processEjbMethodSecurity(java.lang.annotation.Annotation authAnnotation,
                                        MethodDescriptor md,
                                        EjbDescriptor ejbDesc)
This method processes the EJB Security for the given Annotation.


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.

relatedAnnotationTypes

protected java.lang.Class<? extends java.lang.annotation.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.

Parameters:
ainfo -
ejbContexts -
Returns:
HandlerProcessingResult
Throws:
AnnotationProcessorException

processAnnotation

protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
                                                    WebComponentContext[] webCompContexts)
                                             throws AnnotationProcessorException
Process Annotation with given WebCompContexts.

Parameters:
ainfo -
webCompContexts -
Returns:
HandlerProcessingResult
Throws:
AnnotationProcessorException

processAnnotation

protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
                                                    WebBundleContext webBundleContext)
                                             throws AnnotationProcessorException
Process Annotation with given WebBundleContext.

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:
postProcessAnnotation in interface PostProcessor<EjbContext>
Throws:
AnnotationProcessorException

supportTypeInheritance

protected boolean supportTypeInheritance()
This indicates whether the annotation type should be processed for type level in super-class.


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.

Parameters:
ainfo - the annotation information
Throws:
AnnotationProcessorException


Copyright © 2012 GlassFish Community. All Rights Reserved.