1 17 package org.apache.geronimo.connector.deployment.jsr88; 18 19 import org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType; 20 import org.apache.geronimo.xbeans.geronimo.GerConfigPropertySettingType; 21 import org.apache.xmlbeans.SchemaTypeLoader; 22 import javax.enterprise.deploy.model.DDBean ; 23 24 30 public class AdminObjectInstance extends ConfigHolder { 31 private DDBean adminObject; 32 33 public AdminObjectInstance() { 34 } 35 36 public AdminObjectInstance(DDBean adminObject, GerAdminobjectInstanceType instance) { 37 configure(adminObject, instance); 38 } 39 40 protected GerAdminobjectInstanceType getAdminInstance() { 41 return (GerAdminobjectInstanceType) getXmlObject(); 42 } 43 44 public void reconfigure() { 45 configure(adminObject, getAdminInstance()); 46 } 47 48 void configure(DDBean adminObject, GerAdminobjectInstanceType definition) { 49 this.adminObject = adminObject; 50 super.configure(adminObject, definition); 51 } 52 53 protected GerConfigPropertySettingType createConfigProperty() { 54 return getAdminInstance().addNewConfigPropertySetting(); 55 } 56 57 protected GerConfigPropertySettingType[] getConfigProperties() { 58 return getAdminInstance().getConfigPropertySettingArray(); 59 } 60 61 protected void removeConfigProperty(int index) { 62 getAdminInstance().removeConfigPropertySetting(index); 63 } 64 65 67 public String getMessageDestinationName() { 68 return getAdminInstance().getMessageDestinationName(); 69 } 70 71 public void setMessageDestinationName(String name) { 72 String old = getMessageDestinationName(); 73 getAdminInstance().setMessageDestinationName(name); 74 pcs.firePropertyChange("messageDestinationName", old, name); 75 } 76 77 79 protected SchemaTypeLoader getSchemaTypeLoader() { 80 return Connector15DCBRoot.SCHEMA_TYPE_LOADER; 81 } 82 } 83 | Popular Tags |