public class J2eeModule extends Object
It is not possible to instantiate this class directly. Implementators have to
implement the J2eeModuleImplementation
first and then use the
J2eeModuleFactory
to create a J2eeModule instance.
Modifier and Type | Class and Description |
---|---|
static interface |
J2eeModule.RootedEntry |
static class |
J2eeModule.Type |
Modifier and Type | Field and Description |
---|---|
static String |
APP_XML |
static Object |
CLIENT
Deprecated.
|
static String |
CLIENT_XML |
static Object |
CONN
Deprecated.
|
static String |
CONNECTOR_XML |
static Object |
EAR
Deprecated.
|
static Object |
EJB
Deprecated.
|
static String |
EJBJAR_XML |
static String |
EJBSERVICES_XML |
static String |
J2EE_13
Deprecated.
use
Profile#J2EE_13 |
static String |
J2EE_14
Deprecated.
use
Profile#J2EE_14 |
static String |
JAVA_EE_5
Deprecated.
use
Profile#JAVA_EE_5 |
static String |
MIME_J2EE_MODULE_TARGET
MIME type for ContentDescriptor of build targets that have J2eeModule in lookup.
|
static String |
PROP_MODULE_VERSION
Module version property
|
static String |
PROP_RESOURCE_DIRECTORY
Enterprise resorce directory property
|
static Object |
WAR
Deprecated.
|
static String |
WEB_XML |
static String |
WEBSERVICES_XML |
Modifier and Type | Method and Description |
---|---|
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<J2eeModule.RootedEntry> |
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 path name, for example (but not only) WEB-INF/sun-web.xml
or META-INF/context.xml.
|
<T> MetadataModel<T> |
getMetadataModel(Class<T> type)
Returns a metadata model of a deployment descriptor specified by the
type parameter. |
Object |
getModuleType()
Deprecated.
|
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.
|
J2eeModule.Type |
getType()
Returns module type.
|
String |
getUrl()
Returns the location of the module within the application archive.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
|
public static final String MIME_J2EE_MODULE_TARGET
public static final Object EAR
J2eeModule.Type.EAR
public static final Object WAR
J2eeModule.Type.WAR
public static final Object EJB
J2eeModule.Type.EJB
public static final Object CONN
J2eeModule.Type.RAR
public static final Object CLIENT
J2eeModule.Type.CAR
public static final String J2EE_13
Profile#J2EE_13
public static final String J2EE_14
Profile#J2EE_14
public static final String JAVA_EE_5
Profile#JAVA_EE_5
public static final String APP_XML
public static final String WEB_XML
public static final String WEBSERVICES_XML
public static final String EJBJAR_XML
public static final String EJBSERVICES_XML
public static final String CONNECTOR_XML
public static final String CLIENT_XML
public static final String PROP_RESOURCE_DIRECTORY
public static final String PROP_MODULE_VERSION
@NonNull public String getModuleVersion()
Do not confuse with the Java EE platform specification version.
@NonNull public Object getModuleType()
J2eeModule.getType()
@NonNull public J2eeModule.Type getType()
public String getUrl()
public FileObject getArchive() throws IOException
IOException
public Iterator<J2eeModule.RootedEntry> getArchiveContents() throws IOException
J2eeModule.RootedEntry
interface.
If the J2eeModule instance describes a
j2ee application, the result should not contain module archives.IOException
public FileObject getContentDirectory() throws IOException
J2eeModule.getArchiveContents()
came from.IOException
public <T> MetadataModel<T> getMetadataModel(Class<T> type)
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.
type
- metadata model type class for which a MetadataModel
instance will be returned.type
parameter.NullPointerException
- if the type
parameter is null
.public File getResourceDirectory()
public File getDeploymentConfigurationFile(String name)
name
- file name of the deployment configuration file, WEB-INF/sun-web.xml
for example.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- PropertyChangeListenerpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- PropertyChangeListener