FileDocCategorySizeDatePackage
ResourceEnvRef.javaAPI DocJBoss 4.2.14041Fri Jul 13 20:54:00 BST 2007org.jboss.metamodel.descriptor

ResourceEnvRef

public class ResourceEnvRef extends Ref
Represents a element of the ejb-jar.xml deployment descriptor for the 1.4 schema
author
William DeCoste
version
$Revision: 60259 $

Fields Summary
private static final Logger
log
private String
resRefName
private String
resType
private String
resAuth
private String
resSharingScope
private String
mappedName
private String
jndiName
private String
resourceName
Constructors Summary
Methods Summary
public java.lang.StringgetAuthorizationType()

      return resAuth;
   
public java.lang.StringgetJndiName()

      return jndiName;
   
public java.lang.StringgetMappedName()

      return mappedName;
   
public java.lang.StringgetResAuth()

      return resAuth;
   
public java.lang.StringgetResRefName()

      return resRefName;
   
public java.lang.StringgetResSharingScope()

      return resSharingScope;
   
public java.lang.StringgetResType()

      return resType;
   
public java.lang.StringgetResourceName()

   
     
   
      return resourceName;
   
public booleanisShareable()

      if (resSharingScope == null || resSharingScope.equals("Shareable"))
         return true;
      else
         return false;
   
public voidmerge(org.jboss.metamodel.descriptor.ResourceEnvRef ref)

      if (ref.getJndiName() != null)
      {
         this.setJndiName(ref.getJndiName());
         
         setMappedName(ref.getJndiName());
      }
      
      if (ref.getResourceName() != null)
      {
         this.setResourceName(ref.getResourceName());
         
         String mappedName = ref.getResourceName();
         if (mappedName.startsWith("java:"))
            this.setMappedName(ref.getResourceName());
         else
            this.setMappedName("java:" + ref.getResourceName());
      }
   
public voidsetJndiName(java.lang.String jndiName)

      this.jndiName = jndiName;
      this.mappedName = jndiName;
   
public voidsetMappedName(java.lang.String mappedName)

      this.mappedName = mappedName;
   
public voidsetResAuth(java.lang.String resAuth)

      this.resAuth = resAuth;
   
public voidsetResRefName(java.lang.String resRefName)

      this.resRefName = resRefName;
   
public voidsetResSharingScope(java.lang.String resSharingScope)

      this.resSharingScope = resSharingScope;
   
public voidsetResType(java.lang.String resType)

      this.resType = resType;
   
public voidsetResourceName(java.lang.String resourceName)

      this.resourceName = resourceName;
   
public java.lang.StringtoString()

      StringBuffer sb = new StringBuffer(100);
      sb.append("[ResourceEnvRef:");
      sb.append("resRefName=").append(resRefName);
      sb.append(",resType=").append(resType);
      sb.append(",jndiName=").append(jndiName);
      sb.append(",mappedName=").append(mappedName);
      sb.append("]");
      return sb.toString();