org.netbeans.modules.j2eeserver/4 1.55.0 1

org.netbeans.modules.j2ee.deployment.devmodules.spi
Interface J2eeModuleImplementation

All Known Subinterfaces:
J2eeApplicationImplementation

public interface J2eeModuleImplementation

Base SPI interface for J2eeModule. Implementation of this interface is used to create J2eeModule instance using the J2eeModuleFactory.

Since:
1.23

Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 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.
 FileObject getContentDirectory()
          This call is used in in-place deployment.
 File getDeploymentConfigurationFile(String name)
          Returns source deployment configuration file path for the given deployment configuration file name.
<T> MetadataModel<T>
getMetadataModel(Class<T> type)
          Returns a metadata model of a deployment descriptor specified by the type parameter.
 Object getModuleType()
          Returns module type.
 String getModuleVersion()
          Returns a Java EE module specification version, version of a web application for example.
 File getResourceDirectory()
          Returns the module resource directory, or null if the module has no resource directory.
 String getUrl()
          Returns the location of the module within the application archive.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 

Method Detail

getModuleVersion

String getModuleVersion()
Returns a Java EE module specification version, version of a web application for example.

Do not confuse with the Java EE platform specification version.

Returns:
module specification version.

getModuleType

Object getModuleType()
Returns module type.

Returns:
module type.

getUrl

String getUrl()
Returns the location of the module within the application archive. TODO: this does not belong here.. it has to be moved to J2eeApplication


getArchive

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

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, return null if the module doesn't have a build directory, like an binary archive project
Throws:
IOException

getMetadataModel

<T> MetadataModel<T> getMetadataModel(Class<T> type)
Returns a metadata model of a deployment descriptor specified by the type parameter.

As an example, passing org.netbeans.modules.j2ee.dd.api.web.WebAppMetadata.class as a type parameter will return a metadata model of the web module deployment descriptor - web.xml.

Parameters:
type - metadata model type class for which a MetadataModel instance will be returned.
Returns:
metadata model of a deployment descriptor specified by the type parameter.

getResourceDirectory

File getResourceDirectory()
Returns the module resource directory, or null if the module has no resource directory.

Returns:
the module resource directory, or null if the module has no resource directory.

getDeploymentConfigurationFile

File getDeploymentConfigurationFile(String name)
Returns source deployment configuration file path for the given deployment configuration file name.

Parameters:
name - file name of the deployment configuration file, WEB-INF/sun-web.xml for example.
Returns:
absolute path to the deployment configuration file, or null if the specified file name is not known to this J2eeModule.

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.

Parameters:
listener - PropertyChangeListener

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.

Parameters:
listener - PropertyChangeListener

org.netbeans.modules.j2eeserver/4 1.55.0 1

Built on December 1 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.