Top Description Methods
javax.enterprise.deploy.model

public Interface DeployableObject

Known Direct Subinterfaces
javax.enterprise.deploy.model.J2eeApplicationObject
Imports
javax.enterprise.deploy.shared.ModuleType, java.util.Enumeration, java.io.InputStream, .IOException

The DeployableObject interface is an abstract representation of a Java EE deployable module (JAR, WAR, RAR, EAR). A DeployableObject provides access to the module's deployment descriptor and class files.
Author
gfink
Version
0.1

Method Summary

Modifier and TypeMethod and Description
public Enumeration<E>

Returns:

an enumeration of the archive file entries.
entries
()

Returns an enumeration of the module file entries.

public DDBean[]

Returns:

a array of DDBeans or 'null' if no matching data found.
getChildBean
(String
An XPath string identifying the data to be extracted from the deployment descriptor.
xpath
)

Return an array of standard beans representing the XML content returned based upon the XPath.

public Class<T>

Returns:

Class representation of the class
getClassFromScope
(String
Class to retrieve.
className
)

Retrieve the specified class from this deployable module.

public DDBeanRoot

Returns:

A standard bean representing the deployment descriptor.
getDDBeanRoot
()

Return the top level standard bean representing the root of the deployment descriptor.

public DDBeanRoot

Returns:

a DDBeanRoot object for the XML data.
getDDBeanRoot
(String filename)

Returns a DDBeanRoot object for the XML instance document named.

public InputStream

Returns:

the InputStream for the given entry name or null if not found.
getEntry
(String
the file name relative to the root of the module.
name
)

Returns the InputStream for the given entry name The file name must be relative to the root of the module.

public String

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">
root_element - is the name of the root document in the DTD. organization - is the name of the organization responsible for the creation and maintenance of the DTD being referenced. label - is a unique descriptive name for the public text being referenced. language - is the ISO 639 language id representing the natural language encoding of th DTD. location - is the URL of the DTD. An example Java EE deployment descriptor DOCTYPE statement is:
    <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" "http://java.sun.com/dtd/application-client_1_3.dtd">
In this example the label is, "DTD J2EE Application Client 1.3", and the DTD version number is 1.3. A call to getModuleDTDVersion would return a string containing, "1.3".
This method is being deprecated. With the addition of multiple deployment descritors in components for J2EE 1.4 this method is being replaced by DDBeanRoot.getDDBeanRootVersion.
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 Java EE module's deployment descriptor file.
public String[]

Returns:

a list XML content or 'null' if no matching data found.
getText
(String
An xpath string referring to a location in the deployment descriptor
xpath
)

Return the XML content associated with the XPath from a deployment descriptor.

public ModuleType

Returns:

The ModuleType of deployable object
getType
()

Return the ModuleType of deployment descriptor (i.e., EAR, JAR, WAR, RAR) this deployable object represents.

Method Detail

entriesback to summary
public Enumeration<E> 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:Enumeration<E>

an enumeration of the archive file entries.

getChildBeanback to summary
public DDBean[] getChildBean(String xpath)

Return an array of standard beans representing the XML content returned based upon the XPath.

Parameters
xpath:String

An XPath string identifying the data to be extracted from the deployment descriptor.

Returns:DDBean[]

a array of DDBeans or 'null' if no matching data found.

getClassFromScopeback to summary
public Class<T> 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:String

Class to retrieve.

Returns:Class<T>

Class representation of the class

getDDBeanRootback to summary
public DDBeanRoot getDDBeanRoot()

Return the top level standard bean representing the root of the deployment descriptor.

Returns:DDBeanRoot

A standard bean representing the deployment descriptor.

getDDBeanRootback to summary
public 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:DDBeanRoot

a DDBeanRoot object for the XML data.

Exceptions
DDBeanCreateException:
if an error is encountered creating the DDBeanRoot object.
FileNotFoundException:
if the named file can not be found
getEntryback to summary
public 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:String

the file name relative to the root of the module.

Returns:InputStream

the InputStream for the given entry name or null if not found.

getModuleDTDVersionback to summary
public 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 Java EE module's deployment descriptor file.

Returns:String

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">
root_element - is the name of the root document in the DTD. organization - is the name of the organization responsible for the creation and maintenance of the DTD being referenced. label - is a unique descriptive name for the public text being referenced. language - is the ISO 639 language id representing the natural language encoding of th DTD. location - is the URL of the DTD. An example Java EE deployment descriptor DOCTYPE statement is:
    <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" "http://java.sun.com/dtd/application-client_1_3.dtd">
In this example the label is, "DTD J2EE Application Client 1.3", and the DTD version number is 1.3. A call to getModuleDTDVersion would return a string containing, "1.3".
This method is being deprecated. With the addition of multiple deployment descritors in components for J2EE 1.4 this method is being replaced by DDBeanRoot.getDDBeanRootVersion.
getTextback to summary
public String[] getText(String xpath)

Return the XML content associated with the XPath from a deployment descriptor.

Parameters
xpath:String

An xpath string referring to a location in the deployment descriptor

Returns:String[]

a list XML content or 'null' if no matching data found.

getTypeback to summary
public ModuleType getType()

Return the ModuleType of deployment descriptor (i.e., EAR, JAR, WAR, RAR) this deployable object represents. Values are found in DeploymentManager.

Returns:ModuleType

The ModuleType of deployable object