org.netbeans.modules.j2ee.deployment.devmodules.api
Interface J2eeModule

All Known Subinterfaces:
J2eeModuleContainer

public interface J2eeModule

Abstraction of J2EE module. Provides access to basic properties of the modules: J2EE version, module type, deployment descriptor.


Nested Class Summary
static interface J2eeModule.RootedEntry
           
static interface J2eeModule.VersionListener
           
 
Field Summary
static String APP_XML
           
static Object CLIENT
          The module is an Client Application archive.
static String CLIENT_XML
           
static Object CONN
          The module is an Connector archive.
static String CONNECTOR_XML
           
static Object EAR
          The module is an EAR archive.
static Object EJB
          The module is an Enterprise Java Bean archive.
static String EJBJAR_XML
           
static String EJBSERVICES_XML
           
static String J2EE_13
          J2EE specification version 1.3
static String J2EE_14
          J2EE specification version 1.4
static String J2EE_15
          J2EE specification version 1.5
static String MIME_J2EE_MODULE_TARGET
          MIME type for ContentDescriptor of build targets that have J2eeModule in lookup.
static Object WAR
          The module is an Web Application archive.
static String WEB_XML
           
static String WEBSERVICES_XML
           
 
Method Summary
 void addVersionListener(J2eeModule.VersionListener listener)
          Add module change listener.
 org.openide.filesystems.FileObject getArchive()
          Returns the archive file for the module of null if the archive file does not exist (for example, has not been compiled yet).
 Iterator getArchiveContents()
          Returns the contents of the archive, in copyable form.
 org.openide.filesystems.FileObject getContentDirectory()
          This call is used in in-place deployment.
 org.netbeans.modules.schema2beans.BaseBean getDeploymentDescriptor(String location)
          Returns a live bean representing the final deployment descriptor that will be used for deploment of the module.
 Object getModuleType()
          Returns module type
 String getModuleVersion()
          Returns module specification version
 String getUrl()
          Returns the location of the module within the application archive.
 void removeVersionListener(J2eeModule.VersionListener listener)
          Remove module version change listener.
 void setUrl(String url)
          Sets the location of the modules within the application archive.
 

Field Detail

MIME_J2EE_MODULE_TARGET

static final String MIME_J2EE_MODULE_TARGET
MIME type for ContentDescriptor of build targets that have J2eeModule in lookup. This can be used to search implementations of targets providing J2eeModule in project's ContainersList.

See Also:
Constant Field Values

EAR

static final Object EAR
The module is an EAR archive.


WAR

static final Object WAR
The module is an Web Application archive.


EJB

static final Object EJB
The module is an Enterprise Java Bean archive.


CONN

static final Object CONN
The module is an Connector archive.


CLIENT

static final Object CLIENT
The module is an Client Application archive.


J2EE_13

static final String J2EE_13
J2EE specification version 1.3

Since:
1.5
See Also:
Constant Field Values

J2EE_14

static final String J2EE_14
J2EE specification version 1.4

Since:
1.5
See Also:
Constant Field Values

J2EE_15

static final String J2EE_15
J2EE specification version 1.5

Since:
1.6
See Also:
Constant Field Values

APP_XML

static final String APP_XML
See Also:
Constant Field Values

WEB_XML

static final String WEB_XML
See Also:
Constant Field Values

WEBSERVICES_XML

static final String WEBSERVICES_XML
See Also:
Constant Field Values

EJBJAR_XML

static final String EJBJAR_XML
See Also:
Constant Field Values

EJBSERVICES_XML

static final String EJBSERVICES_XML
See Also:
Constant Field Values

CONNECTOR_XML

static final String CONNECTOR_XML
See Also:
Constant Field Values

CLIENT_XML

static final String CLIENT_XML
See Also:
Constant Field Values
Method Detail

getModuleVersion

String getModuleVersion()
Returns module specification version


getModuleType

Object getModuleType()
Returns module type


getUrl

String getUrl()
Returns the location of the module within the application archive.


setUrl

void setUrl(String url)
Sets the location of the modules within the application archive. For example, a web module could be at "/wbmodule1.war" within the ear file. For standalone module the URL cannot be set to a different value then "/"


getArchive

org.openide.filesystems.FileObject getArchive()
                                              throws IOException
Returns the archive file for the module of null if the archive file does not exist (for example, has not been compiled yet).

Throws:
IOException

getArchiveContents

Iterator getArchiveContents()
                            throws IOException
Returns the contents of the archive, in copyable form. Used for incremental deployment. Currently uses its own J2eeModule.RootedEntry interface. If the J2eeModule instance describes a j2ee application, the result should not contain module archives.

Returns:
Iterator through J2eeModule.RootedEntrys
Throws:
IOException

getContentDirectory

org.openide.filesystems.FileObject getContentDirectory()
                                                       throws IOException
This call is used in in-place deployment. Returns the directory staging the contents of the archive This directory is the one from which the content entries returned by getArchiveContents() came from.

Returns:
FileObject for the content directory
Throws:
IOException

getDeploymentDescriptor

org.netbeans.modules.schema2beans.BaseBean getDeploymentDescriptor(String location)
Returns a live bean representing the final deployment descriptor that will be used for deploment of the module. This can be taken from sources, constructed on fly or a combination of these but it needs to be available even if the module has not been built yet.

Parameters:
location - Parameterized by location because of possibility of multiple deployment descriptors for a single module (jsp.xml, webservices.xml, etc). Location must be prefixed by /META-INF or /WEB-INF as appropriate.
Returns:
a live bean representing the final DD

addVersionListener

void addVersionListener(J2eeModule.VersionListener listener)
Add module change listener.

Parameters:
listener - on version change

removeVersionListener

void removeVersionListener(J2eeModule.VersionListener listener)
Remove module version change listener.

Parameters:
listener - on version change

 

Built on March 27 2006.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.