Methods Summary |
---|
public void | addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)Register a property listener for this bean.
|
public static java.lang.String | extractTextFromXML(java.lang.String key, java.lang.String xmlFragment)Convenience method extract node value from the passed xml fragment.
// should we use a parser... seems heavy, we'll see if string parsing is enough
// pass opening tag
String openingTag = "<" + key + ">";
xmlFragment = xmlFragment.substring(xmlFragment.indexOf(openingTag)+openingTag.length());
return xmlFragment.substring(0, xmlFragment.indexOf("</" + key + ">"));
|
public void | fireXpathEvent(javax.enterprise.deploy.model.XpathEvent xpe)Notification of change from the standard DDBean
if (getParent()!=null) {
getParent().fireXpathEvent(xpe);
return;
}
|
public javax.enterprise.deploy.spi.DConfigBean | getDConfigBean(javax.enterprise.deploy.model.DDBean bean)Return the JavaBean containing the server-specific deployment
configuration information based upon the XML data provided
by the DDBean.
Map mapping = getXPathToBeanMapping();
if (mapping==null) {
return null;
}
if (mapping.containsKey(bean.getXpath())) {
Class c = (Class) mapping.get(bean.getXpath());
try {
Object o = c.newInstance();
if (o instanceof SunConfigBean) {
SunConfigBean child = (SunConfigBean) o;
child.setParent(this);
child.setDDBean(bean);
return child;
}
} catch(Exception e) {
e.printStackTrace();
throw new ConfigurationException(e.getMessage());
}
}
return null;
|
protected javax.enterprise.deploy.spi.DConfigBeanRoot | getDConfigBeanRoot()
if (parent!=null) {
return parent.getDConfigBeanRoot();
}
return null;
|
public javax.enterprise.deploy.model.DDBean | getDDBean()Return the JavaBean containing the deployment
descriptor XML text associated with this DConfigBean.
return ddBean;
|
public abstract java.lang.Object | getDescriptor()
|
public com.sun.enterprise.deployapi.config.SunConfigBean | getParent()
return parent;
|
protected abstract java.util.Map | getXPathToBeanMapping()
|
public java.lang.String[] | getXpaths()Return a list of XPaths designating the deployment descriptor
information this DConfigBean requires.
A given server vendor will need to specify some server-specific
information. Each String returned by this method is an XPath
describing a certain portion of the standard deployment descriptor
for which there is corresponding server-specific configuration.
Map mapping = getXPathToBeanMapping();
if (mapping==null) {
return null;
}
Set keys = mapping.keySet();
String[] xPaths = new String[keys.size()];
int i=0;
for (Iterator itr=keys.iterator(); itr.hasNext();) {
String s = (String) itr.next();
xPaths[i++]=s;
}
return xPaths;
|
public void | notifyDDChange(javax.enterprise.deploy.model.XpathEvent xpathEvent)A notification that the DDBean provided in the
event has changed and this bean or its child beans need
to reevaluate themselves.
|
protected abstract void | process()evaluate a standard bean
|
public void | removeDConfigBean(javax.enterprise.deploy.spi.DConfigBean dConfigBean)Remove a child DConfigBean from this bean.
|
public void | removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)Unregister a property listener for this bean.
|
protected void | setDDBean(javax.enterprise.deploy.model.DDBean ddBean)we are being set a new DDBean, we need to reevaluate
ourself.
this.ddBean = ddBean;
process();
|
protected void | setParent(com.sun.enterprise.deployapi.config.SunConfigBean parent)
this.parent = parent;
|
public java.lang.String | toString()
String s = "DConfigBean";
s = s + "\nDConfigBeanRoot = " + getDConfigBeanRoot();
s = s + "\nParent = " + parent;
s = s + "\nXPath = " + ddBean.getXpath();
return s;
|