1 17 package org.apache.geronimo.naming.deployment.jsr88; 18 19 import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanLocatorType; 20 21 31 public class GBeanLocator extends HasPattern { 32 public GBeanLocator() { 33 super(null); 34 } 35 36 public GBeanLocator(GerGbeanLocatorType xmlObject) { 37 super(xmlObject); 38 } 39 40 protected GerGbeanLocatorType getGBeanLocator() { 41 return (GerGbeanLocatorType) getXmlObject(); 42 } 43 44 public void configure(GerGbeanLocatorType xml) { 45 setXmlObject(xml); 46 } 47 48 public String getGBeanLink() { 49 return getGBeanLocator().getGbeanLink(); 50 } 51 52 public void setGBeanLink(String link) { 53 GerGbeanLocatorType locator = getGBeanLocator(); 54 if(link != null && locator.isSetPattern()) { 55 clearPatternFromChoice(); 56 } 57 String old = getGBeanLink(); 58 locator.setGbeanLink(link); 59 pcs.firePropertyChange("GBeanLink", old, link); 60 } 61 62 63 protected void clearNonPatternFromChoice() { 64 GerGbeanLocatorType locator = getGBeanLocator(); 65 if(locator.isSetGbeanLink()) { 66 String temp = locator.getGbeanLink(); 67 locator.unsetGbeanLink(); 68 pcs.firePropertyChange("GBeanLink", temp, null); 69 } 70 } 71 } 72 | Popular Tags |