javax.enterprise.deploy.model
Interface DeployableObject

All Known Subinterfaces:
J2eeApplicationObject

public interface DeployableObject

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.

Author:
Guillaume Sauthier

Method Summary
 java.util.Enumeration entries()
          Returns an enumeration of the module file entries.
 DDBean[] getChildBean(java.lang.String xpath)
          Return an array of standard beans representing the XML content returned based upon the XPath.
 java.lang.Class getClassFromScope(java.lang.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.
 DDBeanRoot getDDBeanRoot()
          Return the top level standard bean representing the root of the deployment descriptor.
 DDBeanRoot getDDBeanRoot(java.lang.String filename)
          Returns a DDBeanRoot object for the XML instance document named.
 java.io.InputStream getEntry(java.lang.String name)
          Returns the InputStream for the given entry name The file name must be relative to the root of the module.
 java.lang.String getModuleDTDVersion()
          Deprecated. As of version 1.1 replaced by DDBeanRoot.getDDBeanRootVersion()
 java.lang.String[] getText(java.lang.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

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

getDDBeanRoot

DDBeanRoot getDDBeanRoot()
Return the top level standard bean representing the root of the deployment descriptor.

Returns:
A standard bean representing the deployment descriptor.

getChildBean

DDBean[] getChildBean(java.lang.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.

getText

java.lang.String[] getText(java.lang.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.

getClassFromScope

java.lang.Class getClassFromScope(java.lang.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

getModuleDTDVersion

java.lang.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:

getDDBeanRoot

DDBeanRoot getDDBeanRoot(java.lang.String filename)
                         throws java.io.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.

Parameters:
filename -
Returns:
a DDBeanRoot object for the XML data.
Throws:
java.io.FileNotFoundException - if the named file can not be found
DDBeanCreateException - if an error is encountered creating the DDBeanRoot object.

entries

java.util.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.

getEntry

java.io.InputStream getEntry(java.lang.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.


Copyright © 2007 OW2 Consortium. All Rights Reserved.