org.eclipse.jst.j2ee.ejb
Interface EJBJar

All Superinterfaces:
CompatibilityDescriptionGroup, DescriptionGroup, org.eclipse.emf.ecore.EObject, J2EEEObject, org.eclipse.emf.common.notify.Notifier

public interface EJBJar
extends CompatibilityDescriptionGroup

The root element of the EJB deployment descriptor. It contains an optional description of the ejb-jar file; optional display name; optional small icon file name; optional large icon file name; mandatory structural information about all included enterprise beans; a descriptor for container managed relationships, if any; an optional application-assembly descriptor; and an optional name of an ejb-client-jar file for the ejb-jar.

Since:
1.0

Method Summary
 boolean containsContainerManagedBeans()
          Return true if there are any ContainerManagedEntity beans in this jar.
 boolean containsSecurityRole(java.lang.String name)
          Returns true if there is security role with the name specified in the argument
 AssemblyDescriptor getAssemblyDescriptor()
           
 java.util.List getBeanManagedBeans()
          Return List of BeanManaged beans in this jar.
 java.util.List getContainerManagedBeans()
          Return List of ContainerManagedEntity beans in this jar.
 java.util.List getEJB11ContainerManagedBeans()
          Return List of EJB 1.1 ContainerManagedEntity beans in this jar.
 java.util.List getEJB20ContainerManagedBeans()
          Return List of EJB 2.0 ContainerManagedEntity beans in this jar.
 java.lang.String getEjbClientJar()
           
 EJBRelation getEJBRelation(java.lang.String aRelationName)
          Return the first EJBRelation with the same name as aRelationName.
 java.util.List getEjbRelations()
           
 java.util.List getEJBRelationsForSource(ContainerManagedEntity cmp)
          Return all EJBRelation objects that have an EJBRelationshipRole with a source EJB of cmp.
 java.util.List getEJBRelationshipRolesForType(ContainerManagedEntity cmp)
          Return all EJBRelationshipRole objects that have an EJBRelationshipRole with a type EJB of cmp.
 EnterpriseBean getEnterpiseBeanFromRef(EjbRef ref)
          Return an enterprise bean referenced by the EjbRef, if one exists.
 EnterpriseBean getEnterpriseBeanNamed(java.lang.String ejbName)
          Return the enterprise bean model which has the bean name of ejbName
 org.eclipse.emf.common.util.EList getEnterpriseBeans()
           
 java.util.List getEnterpriseBeansWithReference(JavaClass aJavaClass)
          Return ALL EnterpriseBean(s) that are referencing @aJavaClass as a home, remote, bean class, or key class.
 EnterpriseBean getEnterpriseBeanWithReference(JavaClass aJavaClass)
          Return the *FIRST* EnterpriseBean that is referencing @aJavaClass as its home, remote, bean class, or key class.
 int getJ2EEVersionID()
          This returns the j2ee version id.
 java.util.List getMessageDrivenBeans()
          Return List of MessageDriven beans in this jar.
 Relationships getRelationshipList()
           
 EJBRelationshipRole getRelationshipRole(java.lang.String aRoleName, ContainerManagedEntity sourceCMP)
          Return the EJBRelationshipRole with the same name as aRoleName that has sourceCMP as its source bean.
 java.util.List getSessionBeans()
          Return List of Session beans in this jar.
 java.lang.String getVersion()
          Returns the value of the 'Version' attribute
 int getVersionID()
          This returns the module version id.
 boolean isVersion1_1Descriptor()
          Deprecated. Use getVersionID() to determine module level
 boolean isVersion2_0Descriptor()
          Deprecated. Use getVersionID() to determine module level
 void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName)
          Rename the security role contained in the assembly descriptor; for each enterprise bean, fix the role-link on any contained role refs
 void setAssemblyDescriptor(AssemblyDescriptor value)
           
 void setEjbClientJar(java.lang.String value)
           
 void setRelationshipList(Relationships value)
           
 void setVersion(java.lang.String value)
          Sets the value of the 'Version' attribute
 
Methods inherited from interface org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup
getDescription, getDisplayName, getLargeIcon, getSmallIcon, setDescription, setDescriptionGen, setDisplayName, setDisplayNameGen, setLargeIcon, setLargeIconGen, setSmallIcon, setSmallIconGen
 
Methods inherited from interface org.eclipse.jst.j2ee.common.DescriptionGroup
getDescriptions, getDisplayNames, getIcons
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

containsContainerManagedBeans

boolean containsContainerManagedBeans()
Return true if there are any ContainerManagedEntity beans in this jar.

Returns:
boolean value

containsSecurityRole

boolean containsSecurityRole(java.lang.String name)
Returns true if there is security role with the name specified in the argument

Parameters:
name - the name of the security role
Returns:
boolean value

getBeanManagedBeans

java.util.List getBeanManagedBeans()
Return List of BeanManaged beans in this jar.

Returns:
java.util.List

getContainerManagedBeans

java.util.List getContainerManagedBeans()
Return List of ContainerManagedEntity beans in this jar.

Returns:
java.util.List

getEJB11ContainerManagedBeans

java.util.List getEJB11ContainerManagedBeans()
Return List of EJB 1.1 ContainerManagedEntity beans in this jar.

Returns:
java.util.List

getEJB20ContainerManagedBeans

java.util.List getEJB20ContainerManagedBeans()
Return List of EJB 2.0 ContainerManagedEntity beans in this jar.

Returns:
java.util.List

getMessageDrivenBeans

java.util.List getMessageDrivenBeans()
Return List of MessageDriven beans in this jar.

Returns:
java.util.List

getEjbRelations

java.util.List getEjbRelations()
Returns:
The list of EjbRelations references A list of ejb-relation elements, which specify the container managed relationships.

getEnterpiseBeanFromRef

EnterpriseBean getEnterpiseBeanFromRef(EjbRef ref)
Return an enterprise bean referenced by the EjbRef, if one exists. The ejb-link value of the ref must equate to a named enterprise bean contained in the jar; otherwise return null

Parameters:
ref - reference to the EjbRef
Returns:
reference to the EnterpriseBean model

getEnterpriseBeanNamed

EnterpriseBean getEnterpriseBeanNamed(java.lang.String ejbName)
Return the enterprise bean model which has the bean name of ejbName

Parameters:
ejbName - the name of the Enterprise Bean
Returns:
reference to the EnterpriseBean model

getEnterpriseBeansWithReference

java.util.List getEnterpriseBeansWithReference(JavaClass aJavaClass)
Return ALL EnterpriseBean(s) that are referencing @aJavaClass as a home, remote, bean class, or key class.

Parameters:
aJavaClass - a reference of type JavaClass
Returns:
java.util.List of EnterpriseBean

getEnterpriseBeanWithReference

EnterpriseBean getEnterpriseBeanWithReference(JavaClass aJavaClass)
Return the *FIRST* EnterpriseBean that is referencing @aJavaClass as its home, remote, bean class, or key class.

Parameters:
aJavaClass - a refernce of type JavaClass
Returns:
reference to EnterpriseBean model

getSessionBeans

java.util.List getSessionBeans()
Return List of Session beans in this jar.

Returns:
java.util.List of EnterpriseBean

isVersion1_1Descriptor

boolean isVersion1_1Descriptor()
Deprecated. Use getVersionID() to determine module level

Return boolean indicating if this EJB JAR was populated from an EJB 1.1 descriptor

Returns:
boolean

isVersion2_0Descriptor

boolean isVersion2_0Descriptor()
Deprecated. Use getVersionID() to determine module level

Return boolean indicating if this EJB JAR was populated from an EJB 2.0 descriptor

Returns:
boolean

renameSecurityRole

void renameSecurityRole(java.lang.String existingRoleName,
                        java.lang.String newRoleName)
Rename the security role contained in the assembly descriptor; for each enterprise bean, fix the role-link on any contained role refs

Parameters:
existingRoleName - the old name of the Security Role
newRoleName - the new name of the Security Role

getJ2EEVersionID

int getJ2EEVersionID()
                     throws java.lang.IllegalStateException
This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level

Returns:
the j2ee version of the Enterprise Bean in int
Throws:
java.lang.IllegalStateException - when an error is encountered while getting the version

getEjbClientJar

java.lang.String getEjbClientJar()
Returns:
The value of the EjbClientJar attribute The optional ejb-client-jar element specifies a JAR file that contains the class files necessary for a client program to access the enterprise beans in the ejb-jar file. The Deployer should make the ejb-client JAR file accessible to the client's class-loader. Example:employee_service_client.jar

setEjbClientJar

void setEjbClientJar(java.lang.String value)
Parameters:
value - The new value of the EjbClientJar attribute

getVersion

java.lang.String getVersion()
Returns the value of the 'Version' attribute.

If the meaning of the 'Version' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Version' attribute.
See Also:
setVersion(String), EjbPackage.getEJBJar_Version()

getVersionID

int getVersionID()
                 throws java.lang.IllegalStateException
This returns the module version id. Compare with J2EEVersionConstants to determine module level

Returns:
the spec version of the EnterpriseBean, 11, 20, 21
Throws:
java.lang.IllegalStateException - when an error is encountered while getting the spec version of the bean

setVersion

void setVersion(java.lang.String value)
Sets the value of the 'Version' attribute.

Parameters:
value - the new value of the 'Version' attribute.
See Also:
getVersion()

getAssemblyDescriptor

AssemblyDescriptor getAssemblyDescriptor()
Returns:
The AssemblyDescriptor reference

setAssemblyDescriptor

void setAssemblyDescriptor(AssemblyDescriptor value)
Parameters:
value - The new value of the AssemblyDescriptor reference

getEnterpriseBeans

org.eclipse.emf.common.util.EList getEnterpriseBeans()
Returns:
The list of EnterpriseBeans references The enterprise-beans element contains the declarations of one or more enterprise beans.

getRelationshipList

Relationships getRelationshipList()
Returns:
The RelationshipList reference The relationships collection describes the relationships in which container managed persistence entity beans and dependent objects participate. The relationships element contains an optional description; a list of ejb-entity-ref elements (references to entity beans that participate in container managed relationships but whose abstract persistence schemas are not included in the ejb-jar file); and a list of ejb-relation elements, which specify the container managed relationships.

setRelationshipList

void setRelationshipList(Relationships value)
Parameters:
value - The new value of the RelationshipList reference

getRelationshipRole

EJBRelationshipRole getRelationshipRole(java.lang.String aRoleName,
                                        ContainerManagedEntity sourceCMP)
Return the EJBRelationshipRole with the same name as aRoleName that has sourceCMP as its source bean.

Parameters:
aRoleName - the role name
sourceCMP - reference to ContainerManagedEntity
Returns:
a reference to EJBRelationshipRole

getEJBRelation

EJBRelation getEJBRelation(java.lang.String aRelationName)
Return the first EJBRelation with the same name as aRelationName.

Parameters:
aRelationName - the name of the relation
Returns:
a reference to EJBRelation

getEJBRelationsForSource

java.util.List getEJBRelationsForSource(ContainerManagedEntity cmp)
Return all EJBRelation objects that have an EJBRelationshipRole with a source EJB of cmp.

Parameters:
cmp - reference to ContainerManagedEntity
Returns:
List of EJBRelation

getEJBRelationshipRolesForType

java.util.List getEJBRelationshipRolesForType(ContainerManagedEntity cmp)
Return all EJBRelationshipRole objects that have an EJBRelationshipRole with a type EJB of cmp.

Parameters:
cmp - reference to ContainerManagedEntit
Returns:
List of EJBRelationshipRole