1 17 package org.apache.geronimo.naming.deployment.jsr88; 18 19 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType; 20 21 32 public class EjbRef extends HasPattern { 33 public EjbRef() { 34 super(null); 35 } 36 37 public EjbRef(GerEjbRefType xmlObject) { 38 super(xmlObject); 39 } 40 41 public void setRefName(String name) { 42 String old = getEjbRef().getRefName(); 43 getEjbRef().setRefName(name); 44 pcs.firePropertyChange("refName", old, name); 45 } 46 47 public String getRefName() { 48 return getEjbRef().getRefName(); 49 } 50 51 public String getEjbLink() { 52 return getEjbRef().getEjbLink(); 53 } 54 55 public void setEjbLink(String link) { 56 GerEjbRefType ref = getEjbRef(); 57 if(link != null) { 58 if(ref.isSetPattern()) { 59 clearPatternFromChoice(); 60 } 61 } 63 String old = getEjbLink(); 64 ref.setEjbLink(link); 65 pcs.firePropertyChange("ejbLink", old, link); 66 } 67 68 69 protected void clearNonPatternFromChoice() { 70 GerEjbRefType ref = getEjbRef(); 71 if(ref.isSetEjbLink()) { 72 String temp = ref.getEjbLink(); 73 ref.unsetEjbLink(); 74 pcs.firePropertyChange("ejbLink", temp, null); 75 } 76 } 78 79 81 protected GerEjbRefType getEjbRef() { 82 return (GerEjbRefType) getXmlObject(); 83 } 84 85 public void configure(GerEjbRefType xml) { 86 setXmlObject(xml); 87 } 88 } 89 | Popular Tags |