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

ResourceRef

public class ResourceRef 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
private String
resUrl
Constructors Summary
Methods Summary
public java.lang.StringgetAuthorizationType()

      return resAuth;
 /*     if (resAuth == null || resAuth.equals("Container"))
         return AuthenticationType.CONTAINER;
      else
         return AuthenticationType.APPLICATION;*/
   
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.StringgetResUrl()

   
     
   
      return resUrl;
   
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.ResourceRef ref)

      if (ref.getJndiName() != null)
      {
         this.setJndiName(ref.getJndiName());
         
         String mappedName = ref.getJndiName();
         if (mappedName.startsWith("java:"))
            this.setMappedName(ref.getJndiName());
         else
            this.setMappedName("java:" + 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;
   
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 voidsetResUrl(java.lang.String resUrl)

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

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

      StringBuffer sb = new StringBuffer(100);
      sb.append("[" + this.getClass().getName() + ": ");
      sb.append("resRefName=").append(resRefName);
      sb.append(", jndiName=").append(jndiName);
      sb.append(", resourceName=").append(resourceName);
      sb.append(", resType=").append(resType);
      sb.append(", mappedName=").append(mappedName);
      sb.append(", injectionTarget=").append(injectionTarget);
      sb.append("]");
      return sb.toString();