org.objectweb.jonas_ejb.deployment.api
Class BeanDesc

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.deployment.api.BeanDesc
Direct Known Subclasses:
EntityDesc, MessageDrivenDesc, SessionDesc

public abstract class BeanDesc
extends java.lang.Object

Base class for bean descriptors


Field Summary
protected static int BEAN_TRANSACTION_TYPE
           
protected static int CONTAINER_TRANSACTION_TYPE
           
protected  java.lang.String displayName
           
protected  java.util.Properties ejb10EnvProps
           
protected  java.lang.Class ejbClass
           
protected  java.util.Vector ejbLocalRefDesc
           
protected  java.lang.String ejbName
           
protected  java.util.Vector ejbRefDesc
           
protected  java.util.Vector envEntryDesc
           
protected  java.lang.Class home
           
protected  java.lang.String jndiName
           
protected  java.lang.Class local
           
protected  java.lang.Class localhome
           
protected  java.util.Hashtable methodDesc
           
protected  java.lang.Class remote
           
protected  java.util.Vector resourceEnvRefDesc
           
protected  java.util.Vector resourceRefDesc
           
protected  java.util.Hashtable securityRoleRef
           
protected static java.lang.String[] TRANS
           
 
Method Summary
 void check()
          Check that the bean descriptor is valid
protected abstract  void checkTxAttribute(java.lang.reflect.Method method)
          check that trans-attribute is valid for bean
 java.lang.String getDisplayName()
          Get the displayName of the bean.
 java.util.Properties getEjb10Environment()
          Get bean's EJB 1.0 environment properties
 java.lang.Class getEjbClass()
          Get bean's class.
 EjbLocalRefDesc[] getEjbLocalRefDesc()
          Get bean's ejb local references.
 java.lang.String getEjbName()
          Get the enterprise bean's name.
 EjbRefDesc[] getEjbRefDesc()
          Get bean's ejb references.
 EnvEntryDesc[] getEnvEntryDesc()
          Get bean's environment entries.
 java.lang.Class getHomeClass()
          Get bean's home interface.
 java.lang.String getJndiLocalName()
          Get the name to associate with the enterprise Bean in the JNDI name space for local access (inside the same EJBServer)
 java.lang.String getJndiName()
          Get the name to associate with the enterprise Bean in the JNDI name space.
 java.lang.Class getLocalClass()
          Get bean's local interface.
 java.lang.Class getLocalHomeClass()
          Get bean's local home interface.
 MethodDesc getMethodDesc(java.lang.reflect.Method method)
          Get descriptor attached to a given method.
 java.util.Hashtable getMethodDescs()
           
 java.lang.Class getRemoteClass()
          Get bean's remote interface.
 ResourceEnvRefDesc[] getResourceEnvRefDesc()
          Get bean's resource environment references.
 ResourceRefDesc[] getResourceRefDesc()
          Get bean's resource manager connection factory references.
 java.lang.String getRoleLink(java.lang.String roleName)
          Get the role-link value corresponding to the role-name value of a security-role-ref element
 java.lang.String[] getSecurityRoleNames()
          Get all the role names defined in the security-role-ref elements of the bean
 java.lang.String toString()
          String representation of the object for test purpose
protected  void verifyRoleName(AssemblyDescriptor asd)
          check that there are always corresponding role-name element in security-role and method-permission elements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BEAN_TRANSACTION_TYPE

protected static final int BEAN_TRANSACTION_TYPE

CONTAINER_TRANSACTION_TYPE

protected static final int CONTAINER_TRANSACTION_TYPE

TRANS

protected static final java.lang.String[] TRANS

displayName

protected java.lang.String displayName

ejbName

protected java.lang.String ejbName

jndiName

protected java.lang.String jndiName

home

protected java.lang.Class home

remote

protected java.lang.Class remote

localhome

protected java.lang.Class localhome

local

protected java.lang.Class local

ejbClass

protected java.lang.Class ejbClass

envEntryDesc

protected java.util.Vector envEntryDesc

ejb10EnvProps

protected java.util.Properties ejb10EnvProps

resourceEnvRefDesc

protected java.util.Vector resourceEnvRefDesc

resourceRefDesc

protected java.util.Vector resourceRefDesc

ejbRefDesc

protected java.util.Vector ejbRefDesc

ejbLocalRefDesc

protected java.util.Vector ejbLocalRefDesc

methodDesc

protected java.util.Hashtable methodDesc

securityRoleRef

protected java.util.Hashtable securityRoleRef
Method Detail

check

public void check()
           throws DeploymentDescException
Check that the bean descriptor is valid
Throws:
DeploymentDescException - thrown for non-valid bean

checkTxAttribute

protected abstract void checkTxAttribute(java.lang.reflect.Method method)
                                  throws DeploymentDescException
check that trans-attribute is valid for bean

verifyRoleName

protected void verifyRoleName(AssemblyDescriptor asd)
                       throws DeploymentDescException
check that there are always corresponding role-name element in security-role and method-permission elements

getDisplayName

public java.lang.String getDisplayName()
Get the displayName of the bean. Used by Server
Returns:
null if not set

getEjbName

public java.lang.String getEjbName()
Get the enterprise bean's name.
Returns:
Name of the bean

getJndiName

public java.lang.String getJndiName()
Get the name to associate with the enterprise Bean in the JNDI name space. Invoking this method is disallowed for message driven bean. (This information is JOnAS specific). Used by Server
Returns:
Jndi name of the bean

getJndiLocalName

public java.lang.String getJndiLocalName()
Get the name to associate with the enterprise Bean in the JNDI name space for local access (inside the same EJBServer)
Returns:
Jndi name of the bean

getHomeClass

public java.lang.Class getHomeClass()
Get bean's home interface. Invoking this method is disallowed for message driven bean. Used by GenIC and Server
Returns:
Class for the home interface or null

getRemoteClass

public java.lang.Class getRemoteClass()
Get bean's remote interface. Invoking this method is disallowed for message driven bean. Used by GenIC and Server
Returns:
Class for the remote interface or null

getLocalHomeClass

public java.lang.Class getLocalHomeClass()
Get bean's local home interface. Invoking this method is disallowed for message driven bean. Used by GenIC and Server
Returns:
Class for the home interface or null

getLocalClass

public java.lang.Class getLocalClass()
Get bean's local interface. Invoking this method is disallowed for message driven bean. Used by GenIC and Server
Returns:
Class for the Local interface or null

getEjbClass

public java.lang.Class getEjbClass()
Get bean's class. Used by GenIC and Server
Returns:
Class for the bean

getEnvEntryDesc

public EnvEntryDesc[] getEnvEntryDesc()
Get bean's environment entries. Used by Server
Returns:
array of resource reference descriptors (may be empty)

getEjb10Environment

public java.util.Properties getEjb10Environment()
Get bean's EJB 1.0 environment properties

getResourceEnvRefDesc

public ResourceEnvRefDesc[] getResourceEnvRefDesc()
Get bean's resource environment references. Used by Server
Returns:
array of resource environment reference descriptors (may be empty)

getResourceRefDesc

public ResourceRefDesc[] getResourceRefDesc()
Get bean's resource manager connection factory references. Used by Server
Returns:
array of resource reference descriptors (may be empty)

getEjbRefDesc

public EjbRefDesc[] getEjbRefDesc()
Get bean's ejb references. Used by Server
Returns:
array of ejb reference descriptors (may be empty)

getEjbLocalRefDesc

public EjbLocalRefDesc[] getEjbLocalRefDesc()
Get bean's ejb local references. Used by Server
Returns:
array of ejb local reference descriptors (may be empty)

getMethodDesc

public MethodDesc getMethodDesc(java.lang.reflect.Method method)
Get descriptor attached to a given method. Used by GenIC
Parameters:
method - Method from the Home/Remote/MessageListener interface
Returns:
The method descriptor (never returns null)

getMethodDescs

public java.util.Hashtable getMethodDescs()

getRoleLink

public java.lang.String getRoleLink(java.lang.String roleName)
Get the role-link value corresponding to the role-name value of a security-role-ref element
Parameters:
roleName - String corresponding to the role-name value of a security-role-ref element
Returns:
String corresponding to the role-link value

getSecurityRoleNames

public java.lang.String[] getSecurityRoleNames()
Get all the role names defined in the security-role-ref elements of the bean
Parameters:
roleName - String corresponding to the role-name value of a security-role-ref element
Returns:
String corresponding to the role-link value

toString

public java.lang.String toString()
String representation of the object for test purpose
Overrides:
toString in class java.lang.Object
Returns:
String representation of this object