org.objectweb.easybeans.deployment.annotations.metadata
Class ClassAnnotationMetadata

java.lang.Object
  extended by org.objectweb.easybeans.deployment.annotations.metadata.CommonAnnotationMetadata
      extended by org.objectweb.easybeans.deployment.annotations.metadata.ClassAnnotationMetadata
All Implemented Interfaces:
IAnnotationResource, IAnnotationSecurityPermitAll, IAnnotationSecurityRolesAllowed, IEjbEJB, IEJBInterceptors, IPersistenceContext, IPersistenceUnit, ISharedMetadata, ITransactionAttribute

public class ClassAnnotationMetadata
extends CommonAnnotationMetadata
implements ITransactionAttribute, IEJBInterceptors, IAnnotationSecurityRolesAllowed, IAnnotationSecurityPermitAll

This class represents the annotation metadata of a Bean.
From this class, we can access to all methods of a bean with its associated information.

Author:
Florent Benoit

Field Summary
private  JInterceptors annotationInterceptors
          List of annotation interceptors.
private  ApplicationException applicationException
          Application exception annotation.
private  java.util.List<MethodAnnotationMetadata> aroundInvokeMethodsMetadata
          List of @AroundInvoke methods on this class (should be only one per class, validating occurs after).
private  java.lang.String className
          Name of the class associated to this metadata.
private  ClassType classType
          The type of the class.
private  java.util.List<java.lang.String> declareRoles
          List of roles that are declared on this class.
private  EjbJarAnnotationMetadata ejbJarAnnotationMetadata
          Parent meta data.
private  java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> externalUserInterceptors
          User interceptors.
private  java.util.Map<JField,FieldAnnotationMetadata> fieldsAnnotationMetadata
          List of field annotations metadata.
private  java.util.List<JClassInterceptor> globalEasyBeansInterceptors
          EasyBeans global interceptors.
These interceptors correspond to a list of interceptors that need to be present first on all methods.
private  java.lang.String[] interfaces
          Interfaces of this clas.
private  java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> internalUserInterceptors
          User interceptors.
private  java.util.List<JAnnotationResource> jAnnotationResources
          Object representing @Resources annotation.
private  java.util.List<JavaxPersistenceContext> javaxPersistencePersistenceContexts
          Object representing @PersistenceContext annotation.
private  java.util.List<JavaxPersistenceUnit> javaxPersistencePersistenceUnits
          Object representing @PersistenceUnit annotation.
private  JCommonBean jCommonBean
          CommonBean description.
private  java.util.List<JEjbEJB> jEjbEJBs
          Object representing @EJBs annotation.
private  JLocal jLocal
          List of local interfaces.
private  JMessageDriven jMessageDriven
          Message Driven attribute.
private  JRemote jRemote
          List of remote interfaces.
private  JStateful jStateful
          Stateful attribute.
private  JStateless jStateless
          Stateless attribute.
private  java.lang.String localHome
          Local Home.
private static JLog logger
          Logger.
private  java.util.Map<JMethod,MethodAnnotationMetadata> methodsAnnotationMetadata
          List of method annotations metadata.
private  boolean modified
          Is that the class represented by this metadata has already been modified ?
private  boolean permitAll
          This class/bean has the permitAll annotation.
private  java.util.LinkedList<MethodAnnotationMetadata> postActivateMethodsMetadata
          Methods used for @PostActivate on this class (only one per class but may be defined in super classes).
private  java.util.LinkedList<MethodAnnotationMetadata> postConstructMethodsMetadata
          Methods used for @PostConstruct on this class (only one per class but may be defined in super classes).
private  java.util.LinkedList<MethodAnnotationMetadata> preDestroyMethodsMetadata
          Methods used for @PreDestroy on this class (only one per class but may be defined in super classes).
private  java.util.LinkedList<MethodAnnotationMetadata> prePassivateMethodsMetadata
          Methods used for @PrePassivate on this class (only one per class but may be defined in super classes).
private  java.lang.String remoteHome
          Remote Home.
private  java.util.List<java.lang.String> rolesAllowed
          List of roles that are allowed on this class/bean.
private  java.lang.String runAs
          The run-as security role (if any).
private  java.lang.String superName
          Superclass name.
private  TransactionAttributeType transactionAttributeType
          Transaction attribute type (default = required).
private  TransactionManagementType transactionManagementType
          Transaction management type (default = container).
 
Constructor Summary
ClassAnnotationMetadata(java.lang.String className, EjbJarAnnotationMetadata ejbJarAnnotationMetadata)
          Constructor.
 
Method Summary
 void addAroundInvokeMethodMetadata(MethodAnnotationMetadata aroundInvokeMethodMetadata)
          Add a @AroundInvoke method of this class.
 void addFieldAnnotationMetadata(FieldAnnotationMetadata fieldAnnotationMetadata)
          Add field annotation metadata for a given Bean.
 void addMethodAnnotationMetadata(MethodAnnotationMetadata methodAnnotationMetadata)
          Add method annotation metadata for a given Bean.
 void addPostActivateMethodMetadata(MethodAnnotationMetadata postActivateMethodMetadata)
          Adds a @PostActivate method of this class.
 void addPostConstructMethodMetadata(MethodAnnotationMetadata postConstructMethodMetadata)
          Adds a @PostConstruct method of this class.
 void addPreDestroyMethodMetadata(MethodAnnotationMetadata preDestroyMethodMetadata)
          Adds a @PreDestroy method of this class.
 void addPrePassivateMethodMetadata(MethodAnnotationMetadata prePassivateMethodMetadata)
          Adds a @PrePassivate method of this class.
private  void checkLifeCycleDuplicate(MethodAnnotationMetadata postConstructMethodMetadata, InterceptorType itcType, java.util.List<MethodAnnotationMetadata> existingList)
          Checks that only method at one level of a class is present.
 JInterceptors getAnnotationInterceptors()
           
 ApplicationException getApplicationException()
           
 java.util.List<MethodAnnotationMetadata> getAroundInvokeMethodMetadatas()
           
 java.lang.String getClassName()
           
 java.util.List<java.lang.String> getDeclareRoles()
           
 EjbJarAnnotationMetadata getEjbJarAnnotationMetadata()
           
 java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getExternalUserEasyBeansInterceptors()
           
 FieldAnnotationMetadata getFieldAnnotationMetadata(JField jField)
           
 java.util.Collection<FieldAnnotationMetadata> getFieldAnnotationMetadataCollection()
          Get collections of fields annotation metadata.
 java.util.List<JClassInterceptor> getGlobalEasyBeansInterceptors()
           
 java.lang.String[] getInterfaces()
           
 java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getInternalUserEasyBeansInterceptors()
           
 java.util.List<JAnnotationResource> getJAnnotationResources()
           
 java.util.List<JavaxPersistenceContext> getJavaxPersistencePersistenceContexts()
           
 java.util.List<JavaxPersistenceUnit> getJavaxPersistencePersistenceUnits()
           
 JCommonBean getJCommonBean()
           
 java.util.List<JEjbEJB> getJEjbEJBs()
           
 JMessageDriven getJMessageDriven()
           
 JStateful getJStateful()
           
 JStateless getJStateless()
           
 java.lang.String getLocalHome()
           
 JLocal getLocalInterfaces()
           
 MethodAnnotationMetadata getMethodAnnotationMetadata(JMethod jMethod)
           
 java.util.Collection<MethodAnnotationMetadata> getMethodAnnotationMetadataCollection()
          Get collections of methods annotation metadata.
 java.util.LinkedList<MethodAnnotationMetadata> getPostActivateMethodsMetadata()
           
 java.util.LinkedList<MethodAnnotationMetadata> getPostConstructMethodsMetadata()
           
 java.util.LinkedList<MethodAnnotationMetadata> getPreDestroyMethodsMetadata()
           
 java.util.LinkedList<MethodAnnotationMetadata> getPrePassivateMethodsMetadata()
           
 java.lang.String getRemoteHome()
           
 JRemote getRemoteInterfaces()
           
 java.util.List<java.lang.String> getRolesAllowed()
           
 java.lang.String getRunAs()
           
 java.lang.String getSuperName()
           
 TransactionAttributeType getTransactionAttributeType()
           
 TransactionManagementType getTransactionManagementType()
           
 boolean hasPermitAll()
           
 boolean isAroundInvokeMethodMetadata()
           
 boolean isBean()
           
 boolean isInterceptor()
          Is that this class is an interceptor class ?
 boolean isMdb()
           
 boolean isSession()
           
 boolean isStateful()
           
 boolean isStateless()
           
 void setAnnotationsInterceptors(JInterceptors annotationInterceptors)
          Sets the object representing the @Interceptors annotation.
 void setApplicationException(ApplicationException applicationException)
          Sets the object representing the @ApplicationException annotation.
 void setClassType(ClassType cType)
          Sets the type of this class.
 void setDeclareRoles(java.util.List<java.lang.String> declareRoles)
          Sets the list of roles declared on this class.
 void setExternalUserInterceptors(java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> externalUserInterceptors)
          Sets the list of user interceptors that enhancers will use.
These interceptors are defined outside the bean class (interceptor classes).
 void setGlobalEasyBeansInterceptors(java.util.List<JClassInterceptor> globalEasyBeansInterceptors)
          Sets the list of global interceptors that enhancers will use.
 void setInterfaces(java.lang.String[] interfaces)
          Sets the interfaces of this class.
 void setInternalUserInterceptors(java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> internalUserInterceptors)
          Sets the list of user interceptors that enhancers will use.
These interceptors are defined in bean class.
 void setJAnnotationResources(java.util.List<JAnnotationResource> jAnnotationResources)
          Sets JAnnotationResources object.
 void setJavaxPersistencePersistenceContexts(java.util.List<JavaxPersistenceContext> javaxPersistencePersistenceContexts)
          Sets JavaxPersistencePersistenceContexts object.
 void setJavaxPersistencePersistenceUnits(java.util.List<JavaxPersistenceUnit> javaxPersistencePersistenceUnits)
          Sets setJavaxPersistencePersistenceUnits object.
 void setJCommonBean(JCommonBean commonBean)
          Sets the attributes for a Stateless/Stateful/MDB.
 void setJEjbEJBs(java.util.List<JEjbEJB> jEjbEJBs)
          Set JEjbEJBs object.
 void setJMessageDriven(JMessageDriven messageDriven)
          Sets the message driven bean object.
 void setJStateful(JStateful jStateful)
          Sets the attributes for a Stateful.
 void setJStateless(JStateless jStateless)
          Sets the attributes for a Stateless.
 void setLocalHome(java.lang.String localHome)
          Sets the @LocalHome class name.
 void setLocalInterfaces(JLocal jLocal)
          Sets the local interfaces of this class.
 void setModified()
          Defines that this class has been modified.
 void setPermitAll(boolean permitAll)
          This class has PermitAll annotation.
 void setRemoteHome(java.lang.String remoteHome)
          Sets the @RemoteHome class name.
 void setRemoteInterfaces(JRemote jRemote)
          Sets the remote interfaces of this class.
 void setRolesAllowed(java.util.List<java.lang.String> rolesAllowed)
          Set the list of roles allowed on this class/method.
 void setRunAs(java.lang.String runAs)
          Set the value of the run-as property.
 void setSuperName(java.lang.String superName)
          Sets the super class name.
 void setTransactionAttributeType(TransactionAttributeType transactionAttributeType)
          Set Transaction Attribute Type.
 void setTransactionManagementType(TransactionManagementType transactionManagementType)
          Sets transaction management type.
 java.lang.String toString()
           
 boolean wasModified()
           
 
Methods inherited from class org.objectweb.easybeans.deployment.annotations.metadata.CommonAnnotationMetadata
concatStringBuilder, concatStringBuilder, getJAnnotationResource, getJavaxPersistenceContext, getJavaxPersistenceUnit, getJEjbEJB, isPersistenceContext, isPersistenceUnit, setJAnnotationResource, setJavaxPersistenceContext, setJavaxPersistenceUnit, setJEjbEJB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static JLog logger
Logger.


methodsAnnotationMetadata

private java.util.Map<JMethod,MethodAnnotationMetadata> methodsAnnotationMetadata
List of method annotations metadata.


fieldsAnnotationMetadata

private java.util.Map<JField,FieldAnnotationMetadata> fieldsAnnotationMetadata
List of field annotations metadata.


ejbJarAnnotationMetadata

private EjbJarAnnotationMetadata ejbJarAnnotationMetadata
Parent meta data.


jLocal

private JLocal jLocal
List of local interfaces.


jRemote

private JRemote jRemote
List of remote interfaces.


jCommonBean

private JCommonBean jCommonBean
CommonBean description.


jMessageDriven

private JMessageDriven jMessageDriven
Message Driven attribute.


jStateless

private JStateless jStateless
Stateless attribute.


jStateful

private JStateful jStateful
Stateful attribute.


localHome

private java.lang.String localHome
Local Home.


remoteHome

private java.lang.String remoteHome
Remote Home.


annotationInterceptors

private JInterceptors annotationInterceptors
List of annotation interceptors.


globalEasyBeansInterceptors

private java.util.List<JClassInterceptor> globalEasyBeansInterceptors
EasyBeans global interceptors.
These interceptors correspond to a list of interceptors that need to be present first on all methods.


externalUserInterceptors

private java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> externalUserInterceptors
User interceptors. These interceptors correspond to a list of Interceptor that user has specified in its bean class. It is the interceptors defined in interceptor classes, not the bean class itself. Map<interceptor type <--> List of methods/class corresponding to the interceptor>


internalUserInterceptors

private java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> internalUserInterceptors
User interceptors. These interceptors correspond to a list of Interceptor that user has specified in the bean class. It is not defined in separated classes. Map<interceptor type <--> List of methods/class corresponding to the interceptor>


transactionManagementType

private TransactionManagementType transactionManagementType
Transaction management type (default = container).


transactionAttributeType

private TransactionAttributeType transactionAttributeType
Transaction attribute type (default = required).


applicationException

private ApplicationException applicationException
Application exception annotation.


superName

private java.lang.String superName
Superclass name.


interfaces

private java.lang.String[] interfaces
Interfaces of this clas.


classType

private ClassType classType
The type of the class.

See Also:
ClassType

className

private java.lang.String className
Name of the class associated to this metadata.


aroundInvokeMethodsMetadata

private java.util.List<MethodAnnotationMetadata> aroundInvokeMethodsMetadata
List of @AroundInvoke methods on this class (should be only one per class, validating occurs after).


jEjbEJBs

private java.util.List<JEjbEJB> jEjbEJBs
Object representing @EJBs annotation.


jAnnotationResources

private java.util.List<JAnnotationResource> jAnnotationResources
Object representing @Resources annotation.


javaxPersistencePersistenceContexts

private java.util.List<JavaxPersistenceContext> javaxPersistencePersistenceContexts
Object representing @PersistenceContext annotation.


javaxPersistencePersistenceUnits

private java.util.List<JavaxPersistenceUnit> javaxPersistencePersistenceUnits
Object representing @PersistenceUnit annotation.


postConstructMethodsMetadata

private java.util.LinkedList<MethodAnnotationMetadata> postConstructMethodsMetadata
Methods used for @PostConstruct on this class (only one per class but may be defined in super classes).


preDestroyMethodsMetadata

private java.util.LinkedList<MethodAnnotationMetadata> preDestroyMethodsMetadata
Methods used for @PreDestroy on this class (only one per class but may be defined in super classes).


postActivateMethodsMetadata

private java.util.LinkedList<MethodAnnotationMetadata> postActivateMethodsMetadata
Methods used for @PostActivate on this class (only one per class but may be defined in super classes).


prePassivateMethodsMetadata

private java.util.LinkedList<MethodAnnotationMetadata> prePassivateMethodsMetadata
Methods used for @PrePassivate on this class (only one per class but may be defined in super classes).


modified

private boolean modified
Is that the class represented by this metadata has already been modified ?


declareRoles

private java.util.List<java.lang.String> declareRoles
List of roles that are declared on this class.


rolesAllowed

private java.util.List<java.lang.String> rolesAllowed
List of roles that are allowed on this class/bean.


permitAll

private boolean permitAll
This class/bean has the permitAll annotation.


runAs

private java.lang.String runAs
The run-as security role (if any).

Constructor Detail

ClassAnnotationMetadata

public ClassAnnotationMetadata(java.lang.String className,
                               EjbJarAnnotationMetadata ejbJarAnnotationMetadata)
Constructor.

Parameters:
className - name of the class associated to these metadatas.
ejbJarAnnotationMetadata - parent metadata object.
Method Detail

getClassName

public java.lang.String getClassName()
Returns:
name of the bean (associated to this metadata).

addMethodAnnotationMetadata

public void addMethodAnnotationMetadata(MethodAnnotationMetadata methodAnnotationMetadata)
Add method annotation metadata for a given Bean.

Parameters:
methodAnnotationMetadata - metadata of a method.

getMethodAnnotationMetadata

public MethodAnnotationMetadata getMethodAnnotationMetadata(JMethod jMethod)
Parameters:
jMethod - key of the map of methods annotations.
Returns:
method annotation metadata of a given method.

getMethodAnnotationMetadataCollection

public java.util.Collection<MethodAnnotationMetadata> getMethodAnnotationMetadataCollection()
Get collections of methods annotation metadata.

Returns:
collections of methods annotation metadata.

addFieldAnnotationMetadata

public void addFieldAnnotationMetadata(FieldAnnotationMetadata fieldAnnotationMetadata)
Add field annotation metadata for a given Bean.

Parameters:
fieldAnnotationMetadata - metadata of a field.

getFieldAnnotationMetadata

public FieldAnnotationMetadata getFieldAnnotationMetadata(JField jField)
Parameters:
jField - key of the map of fields annotations.
Returns:
field annotation metadata of a given method.

getFieldAnnotationMetadataCollection

public java.util.Collection<FieldAnnotationMetadata> getFieldAnnotationMetadataCollection()
Get collections of fields annotation metadata.

Returns:
collections of fields annotation metadata.

setLocalInterfaces

public void setLocalInterfaces(JLocal jLocal)
Sets the local interfaces of this class.

Parameters:
jLocal - list of interfaces.

setRemoteInterfaces

public void setRemoteInterfaces(JRemote jRemote)
Sets the remote interfaces of this class.

Parameters:
jRemote - list of interfaces.

getLocalInterfaces

public JLocal getLocalInterfaces()
Returns:
the local interfaces of this class.

getRemoteInterfaces

public JRemote getRemoteInterfaces()
Returns:
the remote interfaces of this class.

isStateless

public boolean isStateless()
Returns:
true if the class is a stateless class

isStateful

public boolean isStateful()
Returns:
true if the class is a stateful class

isSession

public boolean isSession()
Returns:
true if the class is a session bean class

isMdb

public boolean isMdb()
Returns:
true if the class is an MDB class

setClassType

public void setClassType(ClassType cType)
Sets the type of this class.

Parameters:
cType - a type from enum class ClassType.
See Also:
ClassType

getJMessageDriven

public JMessageDriven getJMessageDriven()
Returns:
Message driven attribute.

setJMessageDriven

public void setJMessageDriven(JMessageDriven messageDriven)
Sets the message driven bean object.

Parameters:
messageDriven - attributes of message driven bean.

toString

public java.lang.String toString()
Overrides:
toString in class CommonAnnotationMetadata
Returns:
string representation.

getRemoteHome

public java.lang.String getRemoteHome()
Returns:
the @RemoteHome class name.

setRemoteHome

public void setRemoteHome(java.lang.String remoteHome)
Sets the @RemoteHome class name.

Parameters:
remoteHome - the class name.

getLocalHome

public java.lang.String getLocalHome()
Returns:
the @LocalHome class name.

setLocalHome

public void setLocalHome(java.lang.String localHome)
Sets the @LocalHome class name.

Parameters:
localHome - the class name.

getTransactionManagementType

public TransactionManagementType getTransactionManagementType()
Returns:
transaction management type from @see TransactionManagementType.

setTransactionManagementType

public void setTransactionManagementType(TransactionManagementType transactionManagementType)
Sets transaction management type.

Parameters:
transactionManagementType - value. (BEAN, CONTAINER)
See Also:
TransactionManagementType

getTransactionAttributeType

public TransactionAttributeType getTransactionAttributeType()
Specified by:
getTransactionAttributeType in interface ITransactionAttribute
Returns:
transaction Attribute type.
See Also:
TransactionAttributeType

setTransactionAttributeType

public void setTransactionAttributeType(TransactionAttributeType transactionAttributeType)
Set Transaction Attribute Type.

Specified by:
setTransactionAttributeType in interface ITransactionAttribute
Parameters:
transactionAttributeType - the type of transaction.
See Also:
TransactionAttributeType

getAnnotationInterceptors

public JInterceptors getAnnotationInterceptors()
Returns:
object representing list of @Interceptors.

setAnnotationsInterceptors

public void setAnnotationsInterceptors(JInterceptors annotationInterceptors)
Sets the object representing the @Interceptors annotation.

Specified by:
setAnnotationsInterceptors in interface IEJBInterceptors
Parameters:
annotationInterceptors - list of classes

getApplicationException

public ApplicationException getApplicationException()
Returns:
the @ApplicationException annotation.

setApplicationException

public void setApplicationException(ApplicationException applicationException)
Sets the object representing the @ApplicationException annotation.

Parameters:
applicationException - object representation

isBean

public boolean isBean()
Returns:
true if the classs is a Bean

getInterfaces

public java.lang.String[] getInterfaces()
Returns:
array of interfaces name.

setInterfaces

public void setInterfaces(java.lang.String[] interfaces)
Sets the interfaces of this class.

Parameters:
interfaces - name of interfaces.

getSuperName

public java.lang.String getSuperName()
Returns:
the super class name.

setSuperName

public void setSuperName(java.lang.String superName)
Sets the super class name.

Parameters:
superName - name of the super class.

getEjbJarAnnotationMetadata

public EjbJarAnnotationMetadata getEjbJarAnnotationMetadata()
Returns:
parent metadata object.

getExternalUserEasyBeansInterceptors

public java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getExternalUserEasyBeansInterceptors()
Returns:
Map<interceptor type <--> List of methods/class corresponding to the interceptor> (interceptor classes) of user interceptors that enhancer will use.

setExternalUserInterceptors

public void setExternalUserInterceptors(java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> externalUserInterceptors)
Sets the list of user interceptors that enhancers will use.
These interceptors are defined outside the bean class (interceptor classes).

Parameters:
externalUserInterceptors - list of interceptors that enhancer will use.

getInternalUserEasyBeansInterceptors

public java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getInternalUserEasyBeansInterceptors()
Returns:
Map<interceptor type <--> List of methods/class corresponding to the interceptor> (bean classes) of user interceptors that enhancer will use.

setInternalUserInterceptors

public void setInternalUserInterceptors(java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> internalUserInterceptors)
Sets the list of user interceptors that enhancers will use.
These interceptors are defined in bean class.

Parameters:
internalUserInterceptors - list of interceptors that enhancer will use.

getGlobalEasyBeansInterceptors

public java.util.List<JClassInterceptor> getGlobalEasyBeansInterceptors()
Returns:
list of global interceptors that enhancer will use. (ie : ENC)

setGlobalEasyBeansInterceptors

public void setGlobalEasyBeansInterceptors(java.util.List<JClassInterceptor> globalEasyBeansInterceptors)
Sets the list of global interceptors that enhancers will use.

Parameters:
globalEasyBeansInterceptors - list of interceptors that enhancer will use.

isAroundInvokeMethodMetadata

public boolean isAroundInvokeMethodMetadata()
Returns:
the method metadata with annotation @AroundInvoke.

getAroundInvokeMethodMetadatas

public java.util.List<MethodAnnotationMetadata> getAroundInvokeMethodMetadatas()
Returns:
the list of methods metadata with annotation @AroundInvoke.

addAroundInvokeMethodMetadata

public void addAroundInvokeMethodMetadata(MethodAnnotationMetadata aroundInvokeMethodMetadata)
Add a @AroundInvoke method of this class.

Parameters:
aroundInvokeMethodMetadata - the method.

getPostConstructMethodsMetadata

public java.util.LinkedList<MethodAnnotationMetadata> getPostConstructMethodsMetadata()
Returns:
the methods metadata with annotation @PostConstruct.

addPostConstructMethodMetadata

public void addPostConstructMethodMetadata(MethodAnnotationMetadata postConstructMethodMetadata)
Adds a @PostConstruct method of this class.

Parameters:
postConstructMethodMetadata - the method.

checkLifeCycleDuplicate

private void checkLifeCycleDuplicate(MethodAnnotationMetadata postConstructMethodMetadata,
                                     InterceptorType itcType,
                                     java.util.List<MethodAnnotationMetadata> existingList)
Checks that only method at one level of a class is present.

Parameters:
postConstructMethodMetadata - method to check
itcType - the type of interceptor (used for the error)
existingList - current list of methods

getPreDestroyMethodsMetadata

public java.util.LinkedList<MethodAnnotationMetadata> getPreDestroyMethodsMetadata()
Returns:
the methods metadata with annotation @PreDestroy.

addPreDestroyMethodMetadata

public void addPreDestroyMethodMetadata(MethodAnnotationMetadata preDestroyMethodMetadata)
Adds a @PreDestroy method of this class.

Parameters:
preDestroyMethodMetadata - the method.

getPostActivateMethodsMetadata

public java.util.LinkedList<MethodAnnotationMetadata> getPostActivateMethodsMetadata()
Returns:
the methods metadata with annotation @PostActivate.

addPostActivateMethodMetadata

public void addPostActivateMethodMetadata(MethodAnnotationMetadata postActivateMethodMetadata)
Adds a @PostActivate method of this class.

Parameters:
postActivateMethodMetadata - the method.

getPrePassivateMethodsMetadata

public java.util.LinkedList<MethodAnnotationMetadata> getPrePassivateMethodsMetadata()
Returns:
the method metadata with annotation @PrePassivate.

addPrePassivateMethodMetadata

public void addPrePassivateMethodMetadata(MethodAnnotationMetadata prePassivateMethodMetadata)
Adds a @PrePassivate method of this class.

Parameters:
prePassivateMethodMetadata - the method.

isInterceptor

public boolean isInterceptor()
Is that this class is an interceptor class ?

Returns:
true if it the case, else false.

getJEjbEJBs

public java.util.List<JEjbEJB> getJEjbEJBs()
Returns:
jEjbEJBs list representing @EJBs annotation.

setJEjbEJBs

public void setJEjbEJBs(java.util.List<JEjbEJB> jEjbEJBs)
Set JEjbEJBs object.

Parameters:
jEjbEJBs - list representing javax.ejb.EJBs annotation.

getJAnnotationResources

public java.util.List<JAnnotationResource> getJAnnotationResources()
Returns:
JAnnotationResources list representing @Resources annotation.

setJAnnotationResources

public void setJAnnotationResources(java.util.List<JAnnotationResource> jAnnotationResources)
Sets JAnnotationResources object.

Parameters:
jAnnotationResources - list representing javax.annotation.Resources annotation.

getJavaxPersistencePersistenceContexts

public java.util.List<JavaxPersistenceContext> getJavaxPersistencePersistenceContexts()
Returns:
javaxPersistencePersistenceContexts list representing @PersistenceContexts annotation.

setJavaxPersistencePersistenceContexts

public void setJavaxPersistencePersistenceContexts(java.util.List<JavaxPersistenceContext> javaxPersistencePersistenceContexts)
Sets JavaxPersistencePersistenceContexts object.

Parameters:
javaxPersistencePersistenceContexts - list representing @PersistenceContexts annotation.

getJavaxPersistencePersistenceUnits

public java.util.List<JavaxPersistenceUnit> getJavaxPersistencePersistenceUnits()
Returns:
javaxPersistencePersistenceUnits list representing @PersistenceUnits annotation.

setJavaxPersistencePersistenceUnits

public void setJavaxPersistencePersistenceUnits(java.util.List<JavaxPersistenceUnit> javaxPersistencePersistenceUnits)
Sets setJavaxPersistencePersistenceUnits object.

Parameters:
javaxPersistencePersistenceUnits - list representing @PersistenceUnits annotation.

getJCommonBean

public JCommonBean getJCommonBean()
Returns:
the attributes for a Stateless/Stateful/MDB

setJCommonBean

public void setJCommonBean(JCommonBean commonBean)
Sets the attributes for a Stateless/Stateful/MDB.

Parameters:
commonBean - the attributes

getJStateful

public JStateful getJStateful()
Returns:
the attributes for a Stateful

setJStateful

public void setJStateful(JStateful jStateful)
Sets the attributes for a Stateful.

Parameters:
jStateful - the attributes

getJStateless

public JStateless getJStateless()
Returns:
the attributes for a Stateless

setJStateless

public void setJStateless(JStateless jStateless)
Sets the attributes for a Stateless.

Parameters:
jStateless - the attributes

wasModified

public boolean wasModified()
Returns:
true if the class has been modified.

setModified

public void setModified()
Defines that this class has been modified.


setDeclareRoles

public void setDeclareRoles(java.util.List<java.lang.String> declareRoles)
Sets the list of roles declared on this class.

Parameters:
declareRoles - the list of roles.

getDeclareRoles

public java.util.List<java.lang.String> getDeclareRoles()
Returns:
the list of roles declared on this class.

setRolesAllowed

public void setRolesAllowed(java.util.List<java.lang.String> rolesAllowed)
Set the list of roles allowed on this class/method.

Specified by:
setRolesAllowed in interface IAnnotationSecurityRolesAllowed
Parameters:
rolesAllowed - the list of roles.

getRolesAllowed

public java.util.List<java.lang.String> getRolesAllowed()
Specified by:
getRolesAllowed in interface IAnnotationSecurityRolesAllowed
Returns:
the list of roles allowed on this class/method.

setPermitAll

public void setPermitAll(boolean permitAll)
This class has PermitAll annotation.

Specified by:
setPermitAll in interface IAnnotationSecurityPermitAll
Parameters:
permitAll - the boolean value.

hasPermitAll

public boolean hasPermitAll()
Specified by:
hasPermitAll in interface IAnnotationSecurityPermitAll
Returns:
true if PermitAll annotation.

setRunAs

public void setRunAs(java.lang.String runAs)
Set the value of the run-as property.

Parameters:
runAs - the run-as property.

getRunAs

public java.lang.String getRunAs()
Returns:
the name of the security-role of the run-as element.