DConfigBean (Java EE 5)

Java EE API


javax.enterprise.deploy.spi Interface DConfigBean

All Known Subinterfaces:
DConfigBeanRoot

public interface DConfigBean

Implemented by: DConfigBeanRoot

DConfigBean 是一个部署配置 Bean (DConfigBean),它与一个或多个部署描述符 Bean (DDBean) 关联。DConfigBean 表示要呈现给部署者的部署配置数据的逻辑分组。DConfigBean 提供 0 个或多个 XPath,用于标识它需要的 XML 信息。DConfigBean 可能包含其他 DConfigBean 和常规 JavaBean。最顶层的 DConfigBean 是一个 DConfigBeanRoot 对象,它表示一个 XML 实例文档。

通过调用 DConfigBean.getDConfigBean(DDBean) 方法创建 DConfigBean,其中 DConfigBean 是提供 DDBean 所表示的 XPath 的对象。

DConfigBean 是一个 JavaBean 组件,表示呈现给部署者的 J2EE 插件的动态部署配置信息。它是一个 JavaBean。选择 JavaBean 架构是因为它的多功能性,以及同时提供简单和复杂组件的能力。JavaBean 也可用于属性表和属性编辑器开发,以及复杂的自定义向导开发。

插件供应商应该提供一个可用于 DConfigBean 中任何复杂数据类型的属性编辑器,部署者需要通过属性表来编辑此 DConfigBean。根据 JavaBean API 规范 1.01 中定义的指南,该属性编辑器应该被实现并可用于工具。

英文文档:

The DConfigBean is a deployment configuration bean (DConfigBean) that is associated with one or more deployment descriptor beans, (DDBean). A DConfigBean represents a logical grouping of deployment configuration data to be presented to the Deployer. A DConfigBean provides zero or more XPaths that identifies the XML information it requires. A DConfigBean may contain other DConfigBeans and regular JavaBeans. The top most DConfigBean is a DConfigBeanRoot object which represents a single XML instance document.

A DConfigBean is created by calling DConfigBean.getDConfigBean(DDBean) method, where DConfigBean is the object that provided the XPath which the DDBean represents.

A DConfigBean is a JavaBean component that presents the dynamic deployment configuration information for a J2EE plugin to the deployer. It is a JavaBean. The JavaBean architecture was chosen because of its versatility in providing both simple and complex components. JavaBeans also enable the development of property sheets and property editors, as well as sophisticated customization wizards.

It is expected that a plugin vendor will provide a Property Editor for any complex datatype in a DConfigBean that a deployer needs to edit through a property sheet. The Property Editor should be implemented and made available to a tool according to the guidelines defined in the JavaBeans API Specification version 1.01.


Method Summary
 void
 DConfigBean
 DDBean
 String[]
 void
 void
 void
 

Method Detail

public DDBean getDDBean()
返回包含与此 DConfigBean 关联的部署描述符 XML 文本的 JavaBean。
return 包含此 DConfigBean 的 XML 文本的 Bean 类。
英文文档:

getDDBean

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.

public String[] getXpaths()
返回指定此 DConfigBean 所需的部署描述符信息的 XPath 列表。 给定的服务器供应商将需要指定一些特定于服务器的信息。此方法返回的每个 String 都是一个描述标准部署描述符某一部分的 XPath,标准部署描述符有相应的特定于服务器的配置。
return 表示要获取的 XML 数据的 XPath String 列表;如果没有,则返回 'null'。
英文文档:

getXpaths

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.

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

public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException
返回包含特定于服务器的部署配置信息的 JavaBean,此信息基于 DDBean 提供的 XML 数据。
return 显示标准 Bean 特定于服务器属性的 DConfigBean。
bean 包含要求值的 XML 数据的 DDBean。
ThrowsConfigurationException: 报告生成配置 Bean 时的错误。解决此异常前,此 DDBean 被视为无法部署在此服务器上。用户需要合适的描述性信息才能诊断错误。
英文文档:

getDConfigBean

DConfigBean getDConfigBean(DDBean bean)
                           throws ConfigurationException
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.

public void removeDConfigBean(DConfigBean bean) throws BeanNotFoundException
从此 Bean 移除一个子 DConfigBean。
bean 要移除的子 DConfigBean。
ThrowsBeanNotFoundException: 提供的 Bean 不在此 Bean 的子列表中。
英文文档:

removeDConfigBean

void removeDConfigBean(DConfigBean bean)
                       throws BeanNotFoundException
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.

public void notifyDDChange(XpathEvent event)
DDBean 在事件中提供的通知已被更改,此 Bean 或其子 Bean 需要重新对自身求值。
event 包含对已更改 DDBean 的引用的事件。
英文文档:

notifyDDChange

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.

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

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
为此 Bean 注册一个属性侦听器。
pcl 要添加的 PropertyChangeListener。
英文文档:

addPropertyChangeListener

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

Parameters:
pcl - PropertyChangeListener to add

public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
取消为此 Bean 注册的属性侦听器。
pcl 要移除的侦听器。
英文文档:

removePropertyChangeListener

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

Parameters:
pcl - Listener to remove.


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!