|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.deployment.annotations.metadata.CommonAnnotationMetadata
org.objectweb.easybeans.deployment.annotations.metadata.ClassAnnotationMetadata
public class ClassAnnotationMetadata
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.
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 |
---|
private static JLog logger
private java.util.Map<JMethod,MethodAnnotationMetadata> methodsAnnotationMetadata
private java.util.Map<JField,FieldAnnotationMetadata> fieldsAnnotationMetadata
private EjbJarAnnotationMetadata ejbJarAnnotationMetadata
private JLocal jLocal
private JRemote jRemote
private JCommonBean jCommonBean
private JMessageDriven jMessageDriven
private JStateless jStateless
private JStateful jStateful
private java.lang.String localHome
private java.lang.String remoteHome
private JInterceptors annotationInterceptors
private java.util.List<JClassInterceptor> globalEasyBeansInterceptors
private java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> externalUserInterceptors
private java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> internalUserInterceptors
private TransactionManagementType transactionManagementType
private TransactionAttributeType transactionAttributeType
private ApplicationException applicationException
private java.lang.String superName
private java.lang.String[] interfaces
private ClassType classType
ClassType
private java.lang.String className
private java.util.List<MethodAnnotationMetadata> aroundInvokeMethodsMetadata
AroundInvoke
methods on this
class (should be only one per class, validating occurs after).
private java.util.List<JEjbEJB> jEjbEJBs
EJBs
annotation.
private java.util.List<JAnnotationResource> jAnnotationResources
Resources
annotation.
private java.util.List<JavaxPersistenceContext> javaxPersistencePersistenceContexts
PersistenceContext
annotation.
private java.util.List<JavaxPersistenceUnit> javaxPersistencePersistenceUnits
PersistenceUnit
annotation.
private java.util.LinkedList<MethodAnnotationMetadata> postConstructMethodsMetadata
PostConstruct
on this
class (only one per class but may be defined in super classes).
private java.util.LinkedList<MethodAnnotationMetadata> preDestroyMethodsMetadata
PreDestroy
on this class
(only one per class but may be defined in super classes).
private java.util.LinkedList<MethodAnnotationMetadata> postActivateMethodsMetadata
PostActivate
on this class (only
one per class but may be defined in super classes).
private java.util.LinkedList<MethodAnnotationMetadata> prePassivateMethodsMetadata
PrePassivate
on this class (only
one per class but may be defined in super classes).
private boolean modified
private java.util.List<java.lang.String> declareRoles
private java.util.List<java.lang.String> rolesAllowed
private boolean permitAll
private java.lang.String runAs
Constructor Detail |
---|
public ClassAnnotationMetadata(java.lang.String className, EjbJarAnnotationMetadata ejbJarAnnotationMetadata)
className
- name of the class associated to these metadatas.ejbJarAnnotationMetadata
- parent metadata object.Method Detail |
---|
public java.lang.String getClassName()
public void addMethodAnnotationMetadata(MethodAnnotationMetadata methodAnnotationMetadata)
methodAnnotationMetadata
- metadata of a method.public MethodAnnotationMetadata getMethodAnnotationMetadata(JMethod jMethod)
jMethod
- key of the map of methods annotations.
public java.util.Collection<MethodAnnotationMetadata> getMethodAnnotationMetadataCollection()
public void addFieldAnnotationMetadata(FieldAnnotationMetadata fieldAnnotationMetadata)
fieldAnnotationMetadata
- metadata of a field.public FieldAnnotationMetadata getFieldAnnotationMetadata(JField jField)
jField
- key of the map of fields annotations.
public java.util.Collection<FieldAnnotationMetadata> getFieldAnnotationMetadataCollection()
public void setLocalInterfaces(JLocal jLocal)
jLocal
- list of interfaces.public void setRemoteInterfaces(JRemote jRemote)
jRemote
- list of interfaces.public JLocal getLocalInterfaces()
public JRemote getRemoteInterfaces()
public boolean isStateless()
public boolean isStateful()
public boolean isSession()
public boolean isMdb()
public void setClassType(ClassType cType)
cType
- a type from enum class ClassType.ClassType
public JMessageDriven getJMessageDriven()
public void setJMessageDriven(JMessageDriven messageDriven)
messageDriven
- attributes of message driven bean.public java.lang.String toString()
toString
in class CommonAnnotationMetadata
public java.lang.String getRemoteHome()
RemoteHome
class name.public void setRemoteHome(java.lang.String remoteHome)
RemoteHome
class name.
remoteHome
- the class name.public java.lang.String getLocalHome()
LocalHome
class name.public void setLocalHome(java.lang.String localHome)
LocalHome
class name.
localHome
- the class name.public TransactionManagementType getTransactionManagementType()
public void setTransactionManagementType(TransactionManagementType transactionManagementType)
transactionManagementType
- value.
(BEAN, CONTAINER)TransactionManagementType
public TransactionAttributeType getTransactionAttributeType()
getTransactionAttributeType
in interface ITransactionAttribute
TransactionAttributeType
public void setTransactionAttributeType(TransactionAttributeType transactionAttributeType)
setTransactionAttributeType
in interface ITransactionAttribute
transactionAttributeType
- the type of transaction.TransactionAttributeType
public JInterceptors getAnnotationInterceptors()
Interceptors
.public void setAnnotationsInterceptors(JInterceptors annotationInterceptors)
Interceptors
annotation.
setAnnotationsInterceptors
in interface IEJBInterceptors
annotationInterceptors
- list of classespublic ApplicationException getApplicationException()
ApplicationException
annotation.public void setApplicationException(ApplicationException applicationException)
ApplicationException
annotation.
applicationException
- object representationpublic boolean isBean()
public java.lang.String[] getInterfaces()
public void setInterfaces(java.lang.String[] interfaces)
interfaces
- name of interfaces.public java.lang.String getSuperName()
public void setSuperName(java.lang.String superName)
superName
- name of the super class.public EjbJarAnnotationMetadata getEjbJarAnnotationMetadata()
public java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getExternalUserEasyBeansInterceptors()
public void setExternalUserInterceptors(java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> externalUserInterceptors)
externalUserInterceptors
- list of interceptors that enhancer will use.public java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getInternalUserEasyBeansInterceptors()
public void setInternalUserInterceptors(java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> internalUserInterceptors)
internalUserInterceptors
- list of interceptors that enhancer will use.public java.util.List<JClassInterceptor> getGlobalEasyBeansInterceptors()
public void setGlobalEasyBeansInterceptors(java.util.List<JClassInterceptor> globalEasyBeansInterceptors)
globalEasyBeansInterceptors
- list of interceptors that enhancer will use.public boolean isAroundInvokeMethodMetadata()
AroundInvoke
.public java.util.List<MethodAnnotationMetadata> getAroundInvokeMethodMetadatas()
AroundInvoke
.public void addAroundInvokeMethodMetadata(MethodAnnotationMetadata aroundInvokeMethodMetadata)
AroundInvoke
method of this class.
aroundInvokeMethodMetadata
- the method.public java.util.LinkedList<MethodAnnotationMetadata> getPostConstructMethodsMetadata()
PostConstruct
.public void addPostConstructMethodMetadata(MethodAnnotationMetadata postConstructMethodMetadata)
PostConstruct
method of this class.
postConstructMethodMetadata
- the method.private void checkLifeCycleDuplicate(MethodAnnotationMetadata postConstructMethodMetadata, InterceptorType itcType, java.util.List<MethodAnnotationMetadata> existingList)
postConstructMethodMetadata
- method to checkitcType
- the type of interceptor (used for the error)existingList
- current list of methodspublic java.util.LinkedList<MethodAnnotationMetadata> getPreDestroyMethodsMetadata()
PreDestroy
.public void addPreDestroyMethodMetadata(MethodAnnotationMetadata preDestroyMethodMetadata)
PreDestroy
method of this class.
preDestroyMethodMetadata
- the method.public java.util.LinkedList<MethodAnnotationMetadata> getPostActivateMethodsMetadata()
PostActivate
.public void addPostActivateMethodMetadata(MethodAnnotationMetadata postActivateMethodMetadata)
PostActivate
method of this class.
postActivateMethodMetadata
- the method.public java.util.LinkedList<MethodAnnotationMetadata> getPrePassivateMethodsMetadata()
PrePassivate
.public void addPrePassivateMethodMetadata(MethodAnnotationMetadata prePassivateMethodMetadata)
PrePassivate
method of this class.
prePassivateMethodMetadata
- the method.public boolean isInterceptor()
public java.util.List<JEjbEJB> getJEjbEJBs()
EJBs
annotation.public void setJEjbEJBs(java.util.List<JEjbEJB> jEjbEJBs)
jEjbEJBs
- list representing javax.ejb.EJBs annotation.public java.util.List<JAnnotationResource> getJAnnotationResources()
Resources
annotation.public void setJAnnotationResources(java.util.List<JAnnotationResource> jAnnotationResources)
jAnnotationResources
- list representing javax.annotation.Resources annotation.public java.util.List<JavaxPersistenceContext> getJavaxPersistencePersistenceContexts()
PersistenceContexts
annotation.public void setJavaxPersistencePersistenceContexts(java.util.List<JavaxPersistenceContext> javaxPersistencePersistenceContexts)
javaxPersistencePersistenceContexts
- list representing @PersistenceContexts
annotation.public java.util.List<JavaxPersistenceUnit> getJavaxPersistencePersistenceUnits()
PersistenceUnits
annotation.public void setJavaxPersistencePersistenceUnits(java.util.List<JavaxPersistenceUnit> javaxPersistencePersistenceUnits)
javaxPersistencePersistenceUnits
- list representing @PersistenceUnits
annotation.public JCommonBean getJCommonBean()
public void setJCommonBean(JCommonBean commonBean)
commonBean
- the attributespublic JStateful getJStateful()
public void setJStateful(JStateful jStateful)
jStateful
- the attributespublic JStateless getJStateless()
public void setJStateless(JStateless jStateless)
jStateless
- the attributespublic boolean wasModified()
public void setModified()
public void setDeclareRoles(java.util.List<java.lang.String> declareRoles)
declareRoles
- the list of roles.public java.util.List<java.lang.String> getDeclareRoles()
public void setRolesAllowed(java.util.List<java.lang.String> rolesAllowed)
setRolesAllowed
in interface IAnnotationSecurityRolesAllowed
rolesAllowed
- the list of roles.public java.util.List<java.lang.String> getRolesAllowed()
getRolesAllowed
in interface IAnnotationSecurityRolesAllowed
public void setPermitAll(boolean permitAll)
setPermitAll
in interface IAnnotationSecurityPermitAll
permitAll
- the boolean value.public boolean hasPermitAll()
hasPermitAll
in interface IAnnotationSecurityPermitAll
public void setRunAs(java.lang.String runAs)
runAs
- the run-as property.public java.lang.String getRunAs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |