|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.enterprise.deploy.model Interface DeployableObject
- All Known Subinterfaces:
- J2eeApplicationObject
public interface DeployableObject
DeployableObject 接口是 J2EE 可部署模块(JAR、WAR、RAR、EAR)的抽象表示形式。DeployableObject 提供对模块的部署描述符和类文件的访问。
version | 0.1 |
The DeployableObject interface is an abstract representation of a J2EE deployable module (JAR, WAR, RAR, EAR). A DeployableObject provides access to the module's deployment descriptor and class files.
- Version:
- 0.1
- Author:
- gfink
Method Summary | |
---|---|
Enumeration |
entries()
Returns an enumeration of the module file entries. |
DDBean[] |
getChildBean(String xpath)
Return an array of standard beans representing the XML content returned based upon the XPath. |
Class |
getClassFromScope(String className)
Retrieve the specified class from this deployable module. |
DDBeanRoot |
getDDBeanRoot()
Return the top level standard bean representing the root of the deployment descriptor. |
DDBeanRoot |
getDDBeanRoot(String filename)
Returns a DDBeanRoot object for the XML instance document named. |
InputStream |
getEntry(String name)
Returns the InputStream for the given entry name The file name must be relative to the root of the module. |
String |
getModuleDTDVersion()
Deprecated. As of version 1.1 replaced by DDBeanRoot.getDDBeanRootVersion() |
String[] |
getText(String xpath)
Return the XML content associated with the XPath from a deployment descriptor. |
ModuleType |
getType()
Return the ModuleType of deployment descriptor (i.e., EAR, JAR, WAR, RAR) this deployable object represents. |
Method Detail |
---|
public ModuleType
getType()
返回由此可部署对象表示的部署描述符的 ModuleType(即 EAR、JAR、WAR、RAR)。值存在于 DeploymentManager 中。
return | 可部署对象的 ModuleType。 |
getType
ModuleType getType()
- Return the ModuleType of deployment descriptor (i.e., EAR,
JAR, WAR, RAR) this deployable object represents.
Values are found in DeploymentManager.
- Returns:
- The ModuleType of deployable object
public DDBeanRoot
getDDBeanRoot()
返回表示部署描述符的根的顶级标准 Bean。
return | 表示部署描述符的标准 Bean。 |
getDDBeanRoot
DDBeanRoot getDDBeanRoot()
- Return the top level standard bean representing
the root of the deployment descriptor.
- Returns:
- A standard bean representing the deployment descriptor.
public DDBean[]
getChildBean(String xpath)
返回一个标准 Bean 数组,这些 Bean 表示基于 XPath 返回的 XML 内容。
xpath | 一个 XPath 字符串,标识从部署描述符中提取的数据。 |
return | DDBean 数组;如果未找到任何匹配的数据,则返回 'null'。 |
getChildBean
DDBean[] getChildBean(String xpath)
- Return an array of standard beans representing the
XML content returned based upon the XPath.
- Parameters:
xpath
- An XPath string identifying the data to be extracted from the deployment descriptor.- Returns:
- a array of DDBeans or 'null' if no matching data found.
public String[]
getText(String xpath)
返回与部署描述符中的 XPath 关联的 XML 内容。
xpath | 引用部署描述符中某个位置的 xpath 字符串。 |
return | XML 内容列表;如果未找到任何匹配的数据,则返回 'null'。 |
getText
String[] getText(String xpath)
- Return the XML content associated with the XPath
from a deployment descriptor.
- Parameters:
xpath
- An xpath string referring to a location in the deployment descriptor- Returns:
- a list XML content or 'null' if no matching data found.
public Class<T>
getClassFromScope(String className)
从此可部署模块中获取特定的类。
用途一:获取所有来自 EJB 的查找方法。 如果工具尝试打包某个模块并从此包获取类,则类请求可能失败。可能还不能使用类。该工具应该遵守清单 cross-path 条目。
className | 要获取的类。 |
return | 类的表示形式 (Class)。 |
getClassFromScope
Class getClassFromScope(String className)
- Retrieve the specified class from this deployable module.
One use: to get all finder methods from an EJB If the tool is attempting to package an module and retrieve a class from the package, the class request may fail. The class may not yet be available. The tool should respect the manifest cross-path entries.
- Parameters:
className
- Class to retrieve.- Returns:
- Class representation of the class
public String
getModuleDTDVersion()
返回在 XML DOCTYPE 文本中指定的 DTD 版本号,每个标准的 J2EE 模块部署描述符文件都提供了 XML DOCTYPE 文本。
return |
包含 DTD 版本号的字符串
模块的部署描述符文件总是包含 文档类型标识符 DOCTYPE。DOCTYPE 语句 在语句的标签中包含模块 DTD 版本号 。 DOCTYPE 语句的格式为:
|
deprecated | 从 1.1 版本开始,用 DDBeanRoot.getDDBeanRootVersion() 取代 |
getModuleDTDVersion
String getModuleDTDVersion()
- Deprecated. As of version 1.1 replaced by
DDBeanRoot.getDDBeanRootVersion()
- Returns the DTD version number given in the XML
DOCTYPE text provided in every standard J2EE module's
deployment descriptor file.
- Returns:
- a string containing the DTD version number
A module's deployment descriptor file always contains a document type identifier, DOCTYPE. The DOCTYPE statement contains the module DTD version number in the label of the statement. The format of the DOCTYPE statement is:
-
<!DOCTYPE root_element PUBLIC
"-//organization//label//language" "location">
-
<!DOCTYPE application-client PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN"
"http://java.sun.com/dtd/application-client_1_3.dtd">
public DDBeanRoot
getDDBeanRoot(String filename) throws java.io.FileNotFoundException, DDBeanCreateException
返回指定 XML 实例文档的 DDBeanRoot 对象。此方法应该用于返回非部署描述符 XML 实例文档(如 WSDL 文件)的 DDBeanRoot 对象。
return | XML 数据的 DDBeanRoot 对象。 |
Throws | java.io.FileNotFoundException,: 如果找不到指定的文件 |
Throws | DDBeanCreateException: 如果在创建 DDBeanRoot 对象时遇到错误。 |
getDDBeanRoot
DDBeanRoot getDDBeanRoot(String filename) throws FileNotFoundException, DDBeanCreateException
- Returns a DDBeanRoot object for the XML instance document named.
This method should be used to return DDBeanRoot objects for non
deployment descriptor XML instance documents such as WSDL files.
- Returns:
- a DDBeanRoot object for the XML data.
- Throws:
java.io.FileNotFoundException,
- if the named file can not be foundDDBeanCreateException
- if an error is encountered creating the DDBeanRoot object.FileNotFoundException
public java.util.Enumeration<E>
entries()
返回模块文件条目的枚举。该枚举中的所有元素都是 String 类型。每个 String 表示一个与模块的根相对的文件名称。
return | 归档文件条目的枚举。 |
entries
Enumeration entries()
- Returns an enumeration of the module file entries. All elements
in the enumeration are of type String. Each String represents a
file name relative to the root of the module.
- Returns:
- an enumeration of the archive file entries.
public java.io.InputStream
getEntry(String name)
返回给定条目名称的 InputStream。文件名称必须与模块的根相对。
name | 相对于模块的根的文件名称。 |
return | 给定条目名称的 InputStream;如果未找到,则返回 null。 |
getEntry
InputStream getEntry(String name)
- Returns the InputStream for the given entry name
The file name must be relative to the root of the module.
- Parameters:
name
- the file name relative to the root of the module.- Returns:
- the InputStream for the given entry name or null if not found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!