1 22 package org.jboss.metadata; 23 24 import java.util.HashMap ; 25 26 import org.w3c.dom.Element ; 27 28 import org.jboss.deployment.DeploymentException; 29 import static org.jboss.metadata.MetaData.*; 30 31 38 public class EjbRefMetaData extends Ref 39 { 40 42 44 private String name; 46 47 private String type; 49 50 private String home; 52 53 private String remote; 54 55 private String link; 57 58 private String jndiName; 60 61 private HashMap invokerMap = new HashMap (); 62 63 65 public EjbRefMetaData() 67 { 68 } 69 70 72 73 public String getHome() 74 { 75 return home; 76 } 77 78 public void setHome(String home) 79 { 80 this.home = home; 81 } 82 83 public HashMap getInvokerMap() 84 { 85 return invokerMap; 86 } 87 88 public void setInvokerMap(HashMap invokerMap) 89 { 90 this.invokerMap = invokerMap; 91 } 92 93 public String getJndiName() 94 { 95 return jndiName; 96 } 97 98 public void setJndiName(String jndiName) 99 { 100 this.jndiName = jndiName; 101 } 102 103 public String getLink() 104 { 105 return link; 106 } 107 108 public void setLink(String link) 109 { 110 this.link = link; 111 } 112 113 public String getName() 114 { 115 return name; 116 } 117 118 public void setName(String name) 119 { 120 this.name = name; 121 } 122 123 public String getRemote() 124 { 125 return remote; 126 } 127 128 public void setRemote(String remote) 129 { 130 this.remote = remote; 131 } 132 133 public String getType() 134 { 135 return type; 136 } 137 138 public void setType(String type) 139 { 140 this.type = type; 141 } 142 143 public String getInvokerBinding(String bindingName) 144 { 145 return (String ) invokerMap.get(bindingName); 146 } 147 148 public void addInvokerBinding(String bindingName, String jndiName) 149 { 150 invokerMap.put(bindingName, jndiName); 151 } 152 153 public void importEjbJarXml(Element element) throws DeploymentException { 154 name = getElementContent(getUniqueChild(element, "ejb-ref-name")); 155 type = getElementContent(getUniqueChild(element, "ejb-ref-type")); 156 home = getElementContent(getUniqueChild(element, "home")); 157 remote = getElementContent(getUniqueChild(element, "remote")); 158 link = getElementContent(getOptionalChild(element, "ejb-link")); 159 } 160 161 public void importJbossXml(Element element) throws DeploymentException { 162 jndiName = getElementContent(getOptionalChild(element, "jndi-name")); 163 } 164 165 public void importJbossXml(String invokerBinding, Element element) throws DeploymentException 166 { 167 String refJndiName = getElementContent(getOptionalChild(element, "jndi-name")); 168 invokerMap.put(invokerBinding, refJndiName); 169 } 170 171 173 175 177 } 179 | Popular Tags |