FileDocCategorySizeDatePackage
EnterpriseBean.javaAPI DocJBoss 4.2.19751Fri Jul 13 20:53:58 BST 2007org.jboss.ejb3.metamodel

EnterpriseBean

public abstract class EnterpriseBean extends org.jboss.metamodel.descriptor.EnvironmentRefGroup implements Injectable
Represents an EJB element of the ejb-jar.xml deployment descriptor for the 1.4 schema
author
William DeCoste
version
$Revision: 63839 $

Fields Summary
private static final Logger
log
public static final String
BEAN
public static final String
CONTAINER
private String
ejbName
private String
home
private String
remote
private String
localHome
private String
local
private String
ejbClass
private List
remoteBindings
private SecurityIdentity
securityIdentity
protected javax.ejb.TransactionManagementType
tmType
private String
jndiName
private String
homeJndiName
private String
localJndiName
private String
localHomeJndiName
private String
securityDomain
private boolean
callByValue
private String
aopDomainName
private MethodAttributes
methodAttributes
private Collection
dependencies
private Collection
ignoreDependencies
private Collection
xmlAnnotations
private PoolConfig
poolConfig
private Collection
securityRoleRefs
The security-role-ref element(s) info
Constructors Summary
Methods Summary
public voidaddDependency(java.lang.String depends)

      dependencies.add(depends);
   
public voidaddIgnoreDependency(org.jboss.metamodel.descriptor.InjectionTarget ignore)

      ignoreDependencies.add(ignore);
   
public voidaddRemoteBinding(RemoteBinding binding)

      remoteBindings.add(binding);
   
public voidaddSecurityRoleRef(org.jboss.metamodel.descriptor.SecurityRoleRef roleRef)

      this.securityRoleRefs.add(roleRef);
   
public voidaddXmlAnnotation(XmlAnnotation annotation)

   
   
      
   
      xmlAnnotations.add(annotation);
   
public java.lang.StringgetAopDomainName()

      return aopDomainName;
   
public java.util.CollectiongetDependencies()

      return dependencies;
   
public java.lang.StringgetEjbClass()

      return ejbClass;
   
public java.lang.StringgetEjbName()

      return ejbName;
   
public java.lang.StringgetHome()

      return home;
   
public java.lang.StringgetHomeJndiName()

      return homeJndiName;
   
public java.util.CollectiongetIgnoreDependencies()

      return ignoreDependencies;
   
public java.lang.StringgetJndiName()

      return jndiName;
   
public java.lang.StringgetLocal()

      return local;
   
public java.lang.StringgetLocalHome()

      return localHome;
   
public java.lang.StringgetLocalHomeJndiName()

      return localHomeJndiName;
   
public java.lang.StringgetLocalJndiName()

      return localJndiName;
   
public MethodAttributesgetMethodAttributes()

      return methodAttributes;
   
public PoolConfiggetPoolConfig()

      return poolConfig;
   
public java.lang.StringgetRemote()

      return remote;
   
public java.util.ListgetRemoteBindings()

      return remoteBindings;
   
public java.lang.StringgetSecurityDomain()

      return securityDomain;
   
public SecurityIdentitygetSecurityIdentity()

      return securityIdentity;
   
public java.util.CollectiongetSecurityRoleRefs()

      return securityRoleRefs;
   
public javax.ejb.TransactionManagementTypegetTransactionManagementType()

      return tmType;
   
public java.util.CollectiongetXmlAnnotations()

      return xmlAnnotations;
   
public booleanisCallByValue()

      return callByValue;
   
public booleanisConsumer()

      return this instanceof Consumer;
   
public booleanisEntityBean()

      return this instanceof EntityEnterpriseBean;
   
public booleanisMessageDrivenBean()

      return this instanceof MessageDrivenBean;
   
public booleanisService()

      return this instanceof Service;
   
public booleanisSessionBean()

      return this instanceof SessionEnterpriseBean;
   
public voidmergeMessageDestinationRef(org.jboss.metamodel.descriptor.MessageDestinationRef ref)

      MessageDestinationRef tmpRef = (MessageDestinationRef)messageDestinationRefs.get(ref.getMessageDestinationRefName());
      if (tmpRef != null)
         tmpRef.merge(ref);
   
public voidmergeResourceEnvRef(org.jboss.metamodel.descriptor.ResourceEnvRef ref)

      ResourceEnvRef tmpRef = (ResourceEnvRef)resourceEnvRefs.get(ref.getResRefName());
      if (tmpRef != null)
         tmpRef.merge(ref);
   
public voidmergeResourceRef(org.jboss.metamodel.descriptor.ResourceRef ref)

      ResourceRef tmpRef = (ResourceRef)resourceRefs.get(ref.getResRefName());
      if (tmpRef != null)
         tmpRef.merge(ref);
   
public voidsetAopDomainName(java.lang.String aopDomainName)

      this.aopDomainName = aopDomainName;
   
public voidsetCallByValue(boolean callByValue)

      this.callByValue = callByValue;
   
public voidsetEjbClass(java.lang.String ejbClass)

      this.ejbClass = ejbClass;
   
public voidsetEjbName(java.lang.String ejbName)

      this.ejbName = ejbName;
   
public voidsetHome(java.lang.String home)

      this.home = home;
   
public voidsetHomeJndiName(java.lang.String homeJndiName)

      this.homeJndiName = homeJndiName;
   
public voidsetJndiName(java.lang.String jndiName)

      this.jndiName = jndiName;
   
public voidsetLocal(java.lang.String local)

      this.local = local;
   
public voidsetLocalHome(java.lang.String localHome)

      this.localHome = localHome;
   
public voidsetLocalHomeJndiName(java.lang.String localHomeJndiName)

      this.localHomeJndiName = localHomeJndiName;
   
public voidsetLocalJndiName(java.lang.String localJndiName)

      this.localJndiName = localJndiName;
   
public voidsetMethodAttributes(MethodAttributes methodAttributes)

      this.methodAttributes = methodAttributes;
   
public voidsetPoolConfig(PoolConfig poolConfig)

      this.poolConfig = poolConfig;
   
public voidsetRemote(java.lang.String remote)

      this.remote = remote;
   
public voidsetRunAsPrincipal(java.lang.String principal)

      /**
       * A case where the RunAs is defined in annotations and the 
       * RunAsPrincipal is specified in jboss.xml
       */
      if (securityIdentity == null)
      {
         securityIdentity = new SecurityIdentity();
      }
      securityIdentity.setRunAsPrincipal(principal);
   
public voidsetSecurityDomain(java.lang.String securityDomain)

      this.securityDomain = securityDomain;
   
public voidsetSecurityIdentity(SecurityIdentity securityIdentity)

      this.securityIdentity = securityIdentity;
   
public voidsetTransactionManagementType(java.lang.String transactionType)

      if (transactionType.equals(BEAN))
         tmType = TransactionManagementType.BEAN;
      else if (transactionType.equals(CONTAINER))
         tmType = TransactionManagementType.CONTAINER;
   
public java.lang.StringtoString()

      StringBuffer sb = new StringBuffer(100);
      sb.append("ejbName=").append(ejbName);
      sb.append(",remoteBindings=").append(remoteBindings);
      sb.append(",jndiName=").append(jndiName);
      sb.append(",local=").append(local);
      sb.append(",remote=").append(remote);
      sb.append(",home=").append(home);
      sb.append(",localHome=").append(localHome);
      sb.append(",ejbClass=").append(ejbClass);
      sb.append(",ejbRefs=").append(ejbRefs);
      sb.append(",ejbLocalRefs=").append(ejbLocalRefs);
      sb.append(",resourceRefs=").append(resourceRefs);
      sb.append(",resourceEnvRefs=").append(resourceEnvRefs);
      sb.append(",methodAttributes=").append(methodAttributes);
      sb.append(",aopDomainName=").append(aopDomainName);
      sb.append(",dependencies=").append(dependencies);
      sb.append(",securityRoleRefs=").append(securityRoleRefs);
      return sb.toString();