org.jboss.metadata
Class BeanMetaData

java.lang.Object
  extended byorg.jboss.metadata.MetaData (src) 
      extended byorg.jboss.metadata.BeanMetaData
All Implemented Interfaces:
java.lang.Cloneable, XmlLoadable (src)
Direct Known Subclasses:
EntityMetaData (src) , MessageDrivenMetaData (src) , SessionMetaData (src)

public abstract class BeanMetaData
extends MetaData (src)

A common meta data class for the entity, message-driven and session beans.


Field Summary
protected  char beanType
          The type of bean: ENTITY_TYPE, SESSION_TYPE, MDB_TYPE
protected  boolean callByValue
          Should the bean use by value call semeantics
protected  boolean clustered
          Is the bean marked as clustered
protected  java.lang.String configurationName
          The container configuration name
protected  boolean containerManagedTx
          Is this bean's transactions managed by the container?
static char ENTITY_TYPE
           
protected  java.util.HashMap invokerBindings
          The invoker names to JNDI name mapping
static java.lang.String LOCAL_INVOKER_PROXY_BINDING
           
static char MDB_TYPE
           
protected  EjbPortComponentMetaData (src) portComponent
          The jboss port-component binding for a ejb webservice
protected  java.lang.String serviceEndpointClass
          The service-endpoint element contains the fully-qualified name of the bean�s service endpoint interface (SEI)
static char SESSION_TYPE
           
 
Fields inherited from class org.jboss.metadata.MetaData (src)
log, TX_MANDATORY, TX_NEVER, TX_NOT_SUPPORTED, TX_REQUIRED, TX_REQUIRES_NEW, TX_SUPPORTS, TX_UNKNOWN
 
Constructor Summary
BeanMetaData(ApplicationMetaData (src)  app, char beanType)
           
 
Method Summary
 void addExcludedMethod(MethodMetaData (src)  method)
           
 void addPermissionMethod(MethodMetaData (src)  method)
           
 void addTransactionMethod(MethodMetaData (src)  method)
           
protected abstract  void defaultInvokerBindings()
           
 ApplicationMetaData (src) getApplicationMetaData()
           
 ClusterConfigMetaData (src) getClusterConfigMetaData()
           
 java.lang.String getConfigurationName()
           
 ConfigurationMetaData (src) getContainerConfiguration()
           
 java.lang.String getContainerObjectNameJndiName()
          Gets the container jndi name used in the object name
abstract  java.lang.String getDefaultConfigurationName()
           
 java.util.Collection getDepends()
           
 java.lang.String getEjbClass()
           
 EjbLocalRefMetaData (src) getEjbLocalRefByName(java.lang.String name)
           
 java.util.Iterator getEjbLocalReferences()
           
 java.lang.String getEjbName()
           
 EjbRefMetaData (src) getEjbRefByName(java.lang.String name)
           
 java.util.Iterator getEjbReferences()
           
 java.util.Iterator getEnvironmentEntries()
           
 boolean getExceptionRollback()
           
 java.util.Iterator getExcludedMethods()
           
 java.lang.String getHome()
           
 java.lang.String getInvokerBinding(java.lang.String invokerName)
           
 java.util.Iterator getInvokerBindings()
           
 IorSecurityConfigMetaData (src) getIorSecurityConfigMetaData()
           
 java.lang.String getJndiName()
           
 java.lang.String getLocal()
           
 java.lang.String getLocalHome()
           
 java.lang.String getLocalJndiName()
          Gets the JNDI name under with the local home interface should be bound.
 java.util.Iterator getMessageDestinationReferences()
           
 java.util.Set getMethodPermissions(java.lang.String methodName, java.lang.Class[] params, InvocationType (src)  iface)
          A somewhat tedious method that builds a Set of the roles that have been assigned permission to execute the indicated method.
 byte getMethodTransactionType(java.lang.String methodName, java.lang.Class[] params, InvocationType (src)  iface)
           
 java.util.Iterator getPermissionMethods()
           
 EjbPortComponentMetaData (src) getPortComponent()
           
 java.lang.String getRemote()
           
 java.util.Iterator getResourceEnvReferences()
           
 java.util.Iterator getResourceReferences()
           
 SecurityIdentityMetaData (src) getSecurityIdentityMetaData()
           
 java.lang.String getSecurityProxy()
           
 java.util.Iterator getSecurityRoleReferences()
           
 java.lang.String getServiceEndpoint()
           
 java.util.HashMap getServiceReferences()
           
 byte getTransactionMethod(java.lang.reflect.Method m, InvocationType (src)  iface)
           
 java.util.Iterator getTransactionMethods()
           
 int getTransactionTimeout(java.lang.reflect.Method method)
           
 int getTransactionTimeout(java.lang.String methodName)
          Get the transaction timeout for the method
 boolean hasMethodPermission(java.lang.String methodName, java.lang.Class[] params, InvocationType (src)  iface)
          Check to see if there was a method-permission or exclude-list statement for the given method.
 void importEjbJarXml(org.w3c.dom.Element element)
          Called to parse the ejb-jar.xml enterprise-beans child ejb elements
 void importJbossXml(org.w3c.dom.Element element)
          Called to parse the jboss.xml enterprise-beans child ejb elements
 boolean isBeanManagedTx()
           
 boolean isCallByValue()
           
 boolean isClustered()
           
 boolean isContainerManagedTx()
           
 boolean isEntity()
           
 boolean isExcludeMissingMethods()
           
 boolean isMessageDriven()
           
 boolean isMethodReadOnly(java.lang.reflect.Method method)
           
 boolean isMethodReadOnly(java.lang.String methodName)
          Is this method a read-only method described in jboss.xml?
 boolean isSession()
           
 
Methods inherited from class org.jboss.metadata.MetaData (src)
clone, getChildrenByTagName, getElementAttribute, getElementContent, getElementContent, getFirstElementContent, getOptionalChild, getOptionalChild, getOptionalChildBooleanContent, getOptionalChildBooleanContent, getOptionalChildContent, getOptionalChildContent, getUniqueChild, getUniqueChildContent, importXml, jdk13Enabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_TYPE

public static final char SESSION_TYPE
See Also:
Constant Field Values (src)

ENTITY_TYPE

public static final char ENTITY_TYPE
See Also:
Constant Field Values (src)

MDB_TYPE

public static final char MDB_TYPE
See Also:
Constant Field Values (src)

LOCAL_INVOKER_PROXY_BINDING

public static final java.lang.String LOCAL_INVOKER_PROXY_BINDING
See Also:
Constant Field Values (src)

serviceEndpointClass

protected java.lang.String serviceEndpointClass
The service-endpoint element contains the fully-qualified name of the bean�s service endpoint interface (SEI)


beanType

protected char beanType
The type of bean: ENTITY_TYPE, SESSION_TYPE, MDB_TYPE


containerManagedTx

protected boolean containerManagedTx
Is this bean's transactions managed by the container?


invokerBindings

protected java.util.HashMap invokerBindings
The invoker names to JNDI name mapping


configurationName

protected java.lang.String configurationName
The container configuration name


clustered

protected boolean clustered
Is the bean marked as clustered


callByValue

protected boolean callByValue
Should the bean use by value call semeantics


portComponent

protected EjbPortComponentMetaData (src)  portComponent
The jboss port-component binding for a ejb webservice

Constructor Detail

BeanMetaData

public BeanMetaData(ApplicationMetaData (src)  app,
                    char beanType)
Method Detail

isSession

public boolean isSession()

isMessageDriven

public boolean isMessageDriven()

isEntity

public boolean isEntity()

getHome

public java.lang.String getHome()

getRemote

public java.lang.String getRemote()

getLocalHome

public java.lang.String getLocalHome()

getLocal

public java.lang.String getLocal()

getServiceEndpoint

public java.lang.String getServiceEndpoint()

getPortComponent

public EjbPortComponentMetaData (src)  getPortComponent()

getEjbClass

public java.lang.String getEjbClass()

getEjbName

public java.lang.String getEjbName()

isContainerManagedTx

public boolean isContainerManagedTx()

isBeanManagedTx

public boolean isBeanManagedTx()

getEjbReferences

public java.util.Iterator getEjbReferences()

getEjbLocalReferences

public java.util.Iterator getEjbLocalReferences()

defaultInvokerBindings

protected abstract void defaultInvokerBindings()

getInvokerBindings

public java.util.Iterator getInvokerBindings()

getInvokerBinding

public java.lang.String getInvokerBinding(java.lang.String invokerName)

getEjbRefByName

public EjbRefMetaData (src)  getEjbRefByName(java.lang.String name)

getEjbLocalRefByName

public EjbLocalRefMetaData (src)  getEjbLocalRefByName(java.lang.String name)

getEnvironmentEntries

public java.util.Iterator getEnvironmentEntries()

getSecurityRoleReferences

public java.util.Iterator getSecurityRoleReferences()

getResourceReferences

public java.util.Iterator getResourceReferences()

getResourceEnvReferences

public java.util.Iterator getResourceEnvReferences()

getMessageDestinationReferences

public java.util.Iterator getMessageDestinationReferences()

getServiceReferences

public java.util.HashMap getServiceReferences()
Returns:
HashMap

getJndiName

public java.lang.String getJndiName()

getLocalJndiName

public java.lang.String getLocalJndiName()
Gets the JNDI name under with the local home interface should be bound. The default is local/<ejbName>


getContainerObjectNameJndiName

public java.lang.String getContainerObjectNameJndiName()
Gets the container jndi name used in the object name


getConfigurationName

public java.lang.String getConfigurationName()

getContainerConfiguration

public ConfigurationMetaData (src)  getContainerConfiguration()

getSecurityProxy

public java.lang.String getSecurityProxy()

getSecurityIdentityMetaData

public SecurityIdentityMetaData (src)  getSecurityIdentityMetaData()

getApplicationMetaData

public ApplicationMetaData (src)  getApplicationMetaData()

getDefaultConfigurationName

public abstract java.lang.String getDefaultConfigurationName()

getTransactionMethods

public java.util.Iterator getTransactionMethods()

getPermissionMethods

public java.util.Iterator getPermissionMethods()

getExcludedMethods

public java.util.Iterator getExcludedMethods()

addTransactionMethod

public void addTransactionMethod(MethodMetaData (src)  method)

addPermissionMethod

public void addPermissionMethod(MethodMetaData (src)  method)

addExcludedMethod

public void addExcludedMethod(MethodMetaData (src)  method)

getMethodTransactionType

public byte getMethodTransactionType(java.lang.String methodName,
                                     java.lang.Class[] params,
                                     InvocationType (src)  iface)

getTransactionMethod

public byte getTransactionMethod(java.lang.reflect.Method m,
                                 InvocationType (src)  iface)

getDepends

public java.util.Collection getDepends()

isMethodReadOnly

public boolean isMethodReadOnly(java.lang.String methodName)
Is this method a read-only method described in jboss.xml?


isMethodReadOnly

public boolean isMethodReadOnly(java.lang.reflect.Method method)

getTransactionTimeout

public int getTransactionTimeout(java.lang.String methodName)
Get the transaction timeout for the method


getTransactionTimeout

public int getTransactionTimeout(java.lang.reflect.Method method)

getMethodPermissions

public java.util.Set getMethodPermissions(java.lang.String methodName,
                                          java.lang.Class[] params,
                                          InvocationType (src)  iface)
A somewhat tedious method that builds a Set of the roles that have been assigned permission to execute the indicated method. The work performed is tedious because of the wildcard style of declaring method permission allowed in the ejb-jar.xml descriptor. This method is called by the Container.getMethodPermissions() when it fails to find the prebuilt set of method roles in its cache.

Returns:
The Set for the application domain roles that caller principal's are to be validated against.

hasMethodPermission

public boolean hasMethodPermission(java.lang.String methodName,
                                   java.lang.Class[] params,
                                   InvocationType (src)  iface)
Check to see if there was a method-permission or exclude-list statement for the given method.

Parameters:
methodName - - the method name
params - - the method parameter signature
iface - - the method interface type
Returns:
true if a matching method permission exists, false if no match

isClustered

public boolean isClustered()

isCallByValue

public boolean isCallByValue()

isExcludeMissingMethods

public boolean isExcludeMissingMethods()

getClusterConfigMetaData

public ClusterConfigMetaData (src)  getClusterConfigMetaData()

getIorSecurityConfigMetaData

public IorSecurityConfigMetaData (src)  getIorSecurityConfigMetaData()

getExceptionRollback

public boolean getExceptionRollback()

importEjbJarXml

public void importEjbJarXml(org.w3c.dom.Element element)
                     throws DeploymentException (src) 
Called to parse the ejb-jar.xml enterprise-beans child ejb elements

Overrides:
importEjbJarXml in class MetaData (src)
Parameters:
element - one of session/entity/message-driven
Throws:
DeploymentException (src)

importJbossXml

public void importJbossXml(org.w3c.dom.Element element)
                    throws DeploymentException (src) 
Called to parse the jboss.xml enterprise-beans child ejb elements

Overrides:
importJbossXml in class MetaData (src)
Parameters:
element - one of session/entity/message-driven
Throws:
DeploymentException (src)