1 22 package org.jboss.metadata; 23 24 import org.w3c.dom.Element ; 25 26 import org.jboss.deployment.DeploymentException; 27 28 48 public class ResourceEnvRefMetaData extends Ref 49 { 50 58 private String refName; 59 63 private String jndiName; 64 69 private String type; 70 72 private String link; 73 84 private boolean containerAuth; 85 94 private boolean isShareable; 95 96 public String getJndiName() 97 { 98 return jndiName; 99 } 100 101 public void setJndiName(String jndiName) 102 { 103 this.jndiName = jndiName; 104 } 105 106 public String getLink() 107 { 108 return link; 109 } 110 111 public void setLink(String link) 112 { 113 this.link = link; 114 } 115 116 public String getRefName() 117 { 118 return refName; 119 } 120 121 public void setRefName(String refName) 122 { 123 this.refName = refName; 124 } 125 126 public String getType() 127 { 128 return type; 129 } 130 131 public void setType(String type) 132 { 133 this.type = type; 134 } 135 136 public boolean isContainerAuth() 137 { 138 return containerAuth; 139 } 140 public void setContainerAuth(boolean flag) 141 { 142 this.containerAuth = flag; 143 } 144 public void setContainerAuth(String value) 145 { 146 this.containerAuth = value.equalsIgnoreCase("Container"); 147 } 148 149 public boolean isShareable() 150 { 151 return isShareable; 152 } 153 public void setSharable(String value) 154 { 155 this.isShareable = value.equalsIgnoreCase("Shareable"); 156 } 157 158 163 public void importEjbJarXml(Element element) throws DeploymentException 164 { 165 String name = element.getLocalName(); 166 if (name.equals("resource-env-ref")) 167 { 168 refName = MetaData.getElementContent(MetaData.getUniqueChild(element, "resource-env-ref-name")); 169 type = MetaData.getElementContent(MetaData.getUniqueChild(element, "resource-env-ref-type")); 170 } 171 else if( name.equals("message-destination-ref") ) 172 { 173 refName = MetaData.getElementContent(MetaData.getUniqueChild(element, "message-destination-ref-name")); 174 type = MetaData.getElementContent(MetaData.getUniqueChild(element, "message-destination-type")); 175 link = MetaData.getElementContent(MetaData.getOptionalChild(element, "message-destination-link")); 176 } 178 } 179 180 185 public void importJbossXml(Element element) throws DeploymentException 186 { 187 jndiName = MetaData.getElementContent(MetaData.getUniqueChild(element, "jndi-name")); 188 } 189 } 190 | Popular Tags |