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.

Version:
$Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $

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.
 String getModuleDTDVersion()
          Deprecated. As of version 1.1, replace by DDBeanRoot.getDDBeanRootVersion()
 String[] getText(String xpath)
           
 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(String xpath)
Return an array of standard beans representing the XML content returned based upon the XPath.

Parameters:
xpath - AAn XPath string identifying the data to be extracted from the deployment descriptor.
Returns:
an array of DDBeans or null if no matching data is found.

getText

String[] getText(String xpath)
Parameters:
xpath - An xpath string referring to a location in the deployment descriptor
Returns:
a list XML content or null if no matching data is found.

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 a 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 Class-Path entries.

Parameters:
className - Class to retrieve.
Returns:
Class representation of the class

getModuleDTDVersion

String getModuleDTDVersion()
Deprecated. As of version 1.1, replace by DDBeanRoot.getDDBeanRootVersion()

A convenience method to return the deployment descriptor document version number of the primary deployment descriptor for the module (e.g. web.xml, ejb-jar.xml, ra.xml, application.xml, and application-client.xml.) The version number for documents webservices.xml , webservicesclient.xml and the like are not returned by this method. DDBeanRoot.getDDBeanRootVersion should be used instead. This method is being deprecated. DDBeanRoot.getDDBeanRootVersion should be used instead.

Returns:
a string that is the version number of the XML instance document. Null is returned if no version number can be found.

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.

Parameters:
filename - the full path name from the root of the module of the xml instance document for which a DDBeanRoot object is to be returned.
Returns:
a DDBeanRoot object for the XML data.
Throws:
FileNotFoundException - if the named file can not be found
DDBeanCreateException - if an error is encountered creating the DDBeanRoot object.
Since:
1.1

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.
Since:
1.1

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.
Since:
1.1


Copyright © 2006 Apache Software Foundation. All Rights Reserved.