## org.jboss.metadata
Class BeanMetaData

    java.lang.Object
      |
      +--org.jboss.metadata.MetaData
            |
            +--org.jboss.metadata.BeanMetaData

All Implemented Interfaces:
  java.lang.Cloneable, XmlLoadable

Direct Known Subclasses:
  EntityMetaData, MessageDrivenMetaData, SessionMetaData

public abstract class BeanMetaData
extends MetaData

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

Version:
  $Revision: 1.23.2.4 $
Author:
  Sebastien Alborini, Peter Antman., Daniel OConnor, Scott Stark., Ole Husgaard

Field Summary
`protected char` `beanType` The type of bean: ENTITY_TYPE, SESSION_TYPE, MDB_TYPE
`protected java.lang.String` `configurationName`
`protected boolean` `containerManagedTx` Is this bean's transactions managed by the container?
`static char` `ENTITY_TYPE`
`static char` `MDB_TYPE`
`static char` `SESSION_TYPE`

Fields inherited from class org.jboss.metadata.MetaData
`TX_MANDATORY, TX_NEVER, TX_NOT_SUPPORTED, TX_REQUIRED, TX_REQUIRES_NEW, TX_SUPPORTS, TX_UNKNOWN`

Constructor Summary
`BeanMetaData(ApplicationMetaData app, char beanType)`

Method Summary
`void` `addExcludedMethod(MethodMetaData method)`
`void` `addPermissionMethod(MethodMetaData method)`
`void` `addTransactionMethod(MethodMetaData method)`
`ApplicationMetaData` `getApplicationMetaData()`
`java.lang.String` `getConfigurationName()`
`ConfigurationMetaData` `getContainerConfiguration()`
`abstract java.lang.String` `getDefaultConfigurationName()`
`java.lang.String` `getEjbClass()`
`EjbLocalRefMetaData` `getEjbLocalRefByName(java.lang.String name)`
`java.util.Iterator` `getEjbLocalReferences()`
`java.lang.String` `getEjbName()`
`EjbRefMetaData` `getEjbRefByName(java.lang.String name)`
`java.util.Iterator` `getEjbReferences()`
`java.util.Iterator` `getEnvironmentEntries()`
`java.util.Iterator` `getExcludedMethods()`
`java.lang.String` `getHome()`
`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.Set` `getMethodPermissions(java.lang.String methodName, java.lang.Class[] params, boolean remote)` A somewhat tedious method that builds a Set<Principal> of the roles that have been assigned permission to execute the indicated method.
`byte` `getMethodTransactionType(java.lang.String methodName, java.lang.Class[] params, boolean remote)`
`java.util.Iterator` `getPermissionMethods()`
`java.lang.String` `getRemote()`
`java.util.Iterator` `getResourceEnvReferences()`
`java.util.Iterator` `getResourceReferences()`
`SecurityIdentityMetaData` `getSecurityIdentityMetaData()`
`java.lang.String` `getSecurityProxy()`
`java.util.Iterator` `getSecurityRoleReferences()`
`java.util.Iterator` `getTransactionMethods()`
`void` `importEjbJarXml(org.w3c.dom.Element element)`
`void` `importJbossXml(org.w3c.dom.Element element)`
`boolean` `isBeanManagedTx()`
`boolean` `isContainerManagedTx()`
`boolean` `isEntity()`
`boolean` `isMessageDriven()`
`boolean` `isSession()`
`void` `trim()` Trim all string elements that correspond to class names which cannot tolerate leading and trailing space.

Methods inherited from class org.jboss.metadata.MetaData
`clone, getChildrenByTagName, getElementContent, getElementContent, getOptionalChild, getOptionalChild, getUniqueChild, 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

### ENTITY_TYPE

    public static final char ENTITY_TYPE

### MDB_TYPE

    public static final char MDB_TYPE

### 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?

### configurationName

    protected java.lang.String configurationName

Constructor Detail

### BeanMetaData

    public BeanMetaData(ApplicationMetaData 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()

### 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()

### getEjbRefByName

    public EjbRefMetaData getEjbRefByName(java.lang.String name)

### getEjbLocalRefByName

    public EjbLocalRefMetaData 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()

### 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>

### getConfigurationName

    public java.lang.String getConfigurationName()

### getContainerConfiguration

    public ConfigurationMetaData getContainerConfiguration()

### getSecurityProxy

    public java.lang.String getSecurityProxy()

### getSecurityIdentityMetaData

    public SecurityIdentityMetaData getSecurityIdentityMetaData()

### getApplicationMetaData

    public ApplicationMetaData 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 method)

### addPermissionMethod

    public void addPermissionMethod(MethodMetaData method)

### addExcludedMethod

    public void addExcludedMethod(MethodMetaData method)

### getMethodTransactionType

    public byte getMethodTransactionType(java.lang.String methodName,
                                         java.lang.Class[] params,
                                         boolean remote)

### getMethodPermissions

    public java.util.Set getMethodPermissions(java.lang.String methodName,
                                              java.lang.Class[] params,
                                              boolean remote)

  A somewhat tedious method that builds a Set<Principal> 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<Principal> for the application domain roles that caller principal's are to be validated against.
  See Also:
    `Container.getMethodPermissions(Method, boolean)`

### importEjbJarXml

    public void importEjbJarXml(org.w3c.dom.Element element)
                         throws DeploymentException

  Overrides:
    `importEjbJarXml` in class `MetaData`

### importJbossXml

    public void importJbossXml(org.w3c.dom.Element element)
                        throws DeploymentException

  Overrides:
    `importJbossXml` in class `MetaData`

### trim

    public void trim()

  Trim all string elements that correspond to class names which cannot tolerate leading and trailing space.

Copyright © 2000 The JBoss Organization. All Rights Reserved.