1 22 package org.jboss.metadata; 23 24 import java.util.HashMap ; 25 import org.w3c.dom.Element ; 26 27 import org.jboss.deployment.DeploymentException; 28 29 36 public class EjbLocalRefMetaData extends Ref 37 { 38 40 42 private String name; 44 45 private String type; 47 48 private String localHome; 50 51 private String local; 52 53 private String link; 55 56 private String jndiName; 58 59 private HashMap invokerMap = new HashMap (); 60 61 63 65 67 public String getName() 68 { 69 return name; 70 } 71 public void setName(String name) 72 { 73 this.name = name; 74 } 75 76 public String getType() 77 { 78 return type; 79 } 80 81 public void setType(String type) 82 { 83 this.type = type; 84 } 85 86 public String getLocalHome() 87 { 88 return localHome; 89 } 90 public void setLocalHome(String localHome) 91 { 92 this.localHome = localHome; 93 } 94 95 public String getLocal() 96 { 97 return local; 98 } 99 public void setLocal(String local) 100 { 101 this.local = local; 102 } 103 104 public String getLink() 105 { 106 return link; 107 } 108 public void setLink(String link) 109 { 110 this.link = link; 111 } 112 113 public String getJndiName() 114 { 115 return jndiName; 116 } 117 public void setJndiName(String jndiName) 118 { 119 this.jndiName = jndiName; 120 } 121 122 public String getInvokerBinding(String bindingName) 123 { 124 return (String ) invokerMap.get(bindingName); 125 } 126 127 public void importEjbJarXml(Element element) throws DeploymentException 128 { 129 name = MetaData.getElementContent(MetaData.getUniqueChild(element, "ejb-ref-name")); 130 type = MetaData.getElementContent(MetaData.getUniqueChild(element, "ejb-ref-type")); 131 localHome = MetaData.getElementContent(MetaData.getUniqueChild(element, "local-home")); 132 local = MetaData.getElementContent(MetaData.getUniqueChild(element, "local")); 133 link = MetaData.getElementContent(MetaData.getOptionalChild(element, "ejb-link")); 134 } 135 136 public void importJbossXml(Element element) throws DeploymentException { 137 jndiName = MetaData.getElementContent(MetaData.getOptionalChild(element, "local-jndi-name")); 138 } 139 140 public void importJbossXml(String invokerBinding, Element element) throws DeploymentException 141 { 142 String refJndiName = MetaData.getElementContent(MetaData.getOptionalChild(element, "local-jndi-name")); 143 invokerMap.put(invokerBinding, refJndiName); 144 } 145 } 146 | Popular Tags |