javax.enterprise.deploy.spi

Interface DConfigBean

public interface DConfigBean

The interface for configuring a server-specific deployment descriptor, or subset of same. A DConfigBean corresponds to a specific location in a standard deployment descriptor, typically where values (such as names and roles) are used.

There are three different ways that DConfigBeans are created:

Method Summary
voidaddPropertyChangeListener(PropertyChangeListener pcl)
Register a property listener for this bean.
DConfigBeangetDConfigBean(DDBean bean)
Return the JavaBean containing the server-specific deployment configuration information based upon the XML data provided by the DDBean.
DDBeangetDDBean()
Return the JavaBean containing the deployment descriptor XML text associated with this DConfigBean.
String[]getXpaths()
Return a list of XPaths designating the deployment descriptor information this DConfigBean requires.
voidnotifyDDChange(XpathEvent event)
A notification that the DDBean provided in the event has changed and this bean or its child beans need to reevaluate themselves.
voidremoveDConfigBean(DConfigBean bean)
Remove a child DConfigBean from this bean.
voidremovePropertyChangeListener(PropertyChangeListener pcl)
Unregister a property listener for this bean.

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener pcl)
Register a property listener for this bean.

Parameters: pcl PropertyChangeListener to add

getDConfigBean

public DConfigBean getDConfigBean(DDBean bean)
Return the JavaBean containing the server-specific deployment configuration information based upon the XML data provided by the DDBean.

Parameters: bean The DDBean containing the XML data to be evaluated.

Returns: The DConfigBean to display the server-specific properties for the standard bean.

Throws: ConfigurationException reports errors in generating a configuration bean. This DDBean is considered undeployable to this server until this exception is resolved. A suitably descriptive message is required so the user can diagnose the error.

getDDBean

public DDBean getDDBean()
Return the JavaBean containing the deployment descriptor XML text associated with this DConfigBean.

Returns: The bean class containing the XML text for this DConfigBean.

getXpaths

public String[] getXpaths()
Return a list of XPaths designating the deployment descriptor information this DConfigBean requires. Each server vendor may need to specify different 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.

Returns: a list of XPath Strings representing XML data to be retrieved or null if there are none.

notifyDDChange

public void notifyDDChange(XpathEvent event)
A notification that the DDBean provided in the event has changed and this bean or its child beans need to reevaluate themselves.

It is advisable, though not declared explicitly in the specification, for a DConfigBean to receive change events for itself, and add or remove events for its direct children. The DConfigBean implementation should not add or remove beans here if it will add or remove those beans again in response to a call to getDConfigBean or removeDConfigBean.

Parameters: event an event containing a reference to the DDBean which has changed.

See Also: DConfigBean DConfigBean

removeDConfigBean

public void removeDConfigBean(DConfigBean bean)
Remove a child DConfigBean from this bean.

Parameters: bean The child DConfigBean to be removed.

Throws: BeanNotFoundException the bean provided is not in the child list of this bean.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener pcl)
Unregister a property listener for this bean.

Parameters: pcl Listener to remove.