public abstract class J2eeModuleProvider extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
J2eeModuleProvider.ConfigSupport
Configuration support to allow development module code to access well-known
configuration propeties, such as web context root, cmp mapping info...
|
static interface |
J2eeModuleProvider.DeployOnSaveClassInterceptor |
static interface |
J2eeModuleProvider.DeployOnSaveSupport |
Constructor and Description |
---|
J2eeModuleProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addConfigurationFilesListener(ConfigurationFilesListener l) |
void |
addInstanceListener(InstanceListener l)
Register an instance listener that will listen to server instances changes.
|
Datasource |
createDatasource(String jndiName,
String url,
String username,
String password,
String driver)
Creates and saves data source in the module if it does not exist yet on the target server or in the module.
|
void |
deployDatasources()
Deprecated.
Nobody should use this method. Being an API is a mistake.
|
protected void |
fireServerChange(String oldServerID,
String newServerID) |
J2eeModuleProvider.ConfigSupport |
getConfigSupport() |
FileObject[] |
getConfigurationFiles()
Returns all configuration files known to this J2EE Module.
|
FileObject[] |
getConfigurationFiles(boolean refresh) |
String |
getDeploymentName()
Return name to be used in deployment of the module.
|
J2eeModuleProvider.DeployOnSaveClassInterceptor |
getDeployOnSaveClassInterceptor() |
J2eeModuleProvider.DeployOnSaveSupport |
getDeployOnSaveSupport() |
InstanceProperties |
getInstanceProperties()
Return InstanceProperties of the server instance
|
abstract J2eeModule |
getJ2eeModule() |
abstract ModuleChangeReporter |
getModuleChangeReporter() |
Set<Datasource> |
getModuleDatasources()
Deprecated.
|
File[] |
getRequiredLibraries() |
ResourceChangeReporter |
getResourceChangeReporter()
Return the class reporting any possible change in resources intended to
be deployed on server.
|
Set<Datasource> |
getServerDatasources()
Gets the data sources deployed on the target server instance.
|
ServerDebugInfo |
getServerDebugInfo()
Return server debug info.
|
abstract String |
getServerID()
This method is used to determin type of target server.
|
abstract String |
getServerInstanceID()
Id of server instance for deployment or null if the module has no server
instance set.
|
SourceFileMap |
getSourceFileMap()
Return destination path-to-source file mappings.
|
FileObject[] |
getSourceRoots()
Returns list of root directories for source files including configuration files.
|
boolean |
hasVerifierSupport()
Returns true if the current target platform provide verifier support for this module.
|
boolean |
isDatasourceCreationSupported()
Tests whether data source creation is supported.
|
boolean |
isOnlyCompileOnSaveEnabled()
Allow J2EE module provider to indicate to server deployment infrastructure
that only Compile on Save should be performed and not full Deploy on Save.
|
void |
removeConfigurationFilesListener(ConfigurationFilesListener l) |
void |
removeInstanceListener(InstanceListener l)
Remove an instance listener which has been registered previously.
|
abstract void |
setServerInstanceID(String severInstanceID)
Set ID of the server instance that will be used for deployment.
|
void |
verify(FileObject target,
OutputStream logger)
Invoke verifier from current platform on the provided target file.
|
public abstract J2eeModule getJ2eeModule()
public abstract ModuleChangeReporter getModuleChangeReporter()
@CheckForNull public ResourceChangeReporter getResourceChangeReporter()
public final J2eeModuleProvider.ConfigSupport getConfigSupport()
public final ServerDebugInfo getServerDebugInfo()
public Set<Datasource> getServerDatasources() throws ConfigurationException
ConfigurationException
- reports problems in retrieving data source
definitions.@Deprecated public Set<Datasource> getModuleDatasources() throws ConfigurationException
J2eeModuleProvider.ConfigSupport.getDatasources()
on J2eeModuleProvider.getConfigSupport()
resultConfigurationException
- reports problems in retrieving data source
definitions.public boolean isDatasourceCreationSupported()
public final Datasource createDatasource(String jndiName, String url, String username, String password, String driver) throws DatasourceAlreadyExistsException, ConfigurationException
jndiName
- name of data sourceurl
- database URLusername
- database userpassword
- user's passworddriver
- fully qualified name of database driver classDatasourceAlreadyExistsException
- if conflicting data source is foundConfigurationException
@Deprecated public void deployDatasources() throws ConfigurationException, DatasourceAlreadyExistsException
ConfigurationException
- if there is some problem with data source configurationDatasourceAlreadyExistsException
- if module data source(s) are conflicting
with data source(s) already deployed on the serverpublic FileObject[] getSourceRoots()
public SourceFileMap getSourceFileMap()
public abstract void setServerInstanceID(String severInstanceID)
severInstanceID
- server instance ID.public abstract String getServerInstanceID()
null
if the module has no server
instance set.public J2eeModuleProvider.DeployOnSaveSupport getDeployOnSaveSupport()
public J2eeModuleProvider.DeployOnSaveClassInterceptor getDeployOnSaveClassInterceptor()
public File[] getRequiredLibraries()
public boolean isOnlyCompileOnSaveEnabled()
public InstanceProperties getInstanceProperties()
public abstract String getServerID()
getServerInstanceID
.public String getDeploymentName()
public boolean hasVerifierSupport()
public void verify(FileObject target, OutputStream logger) throws ValidationException
target
- File to run verifier against.logger
- output stream to write verification resutl to.ValidationException
public final FileObject[] getConfigurationFiles()
public final FileObject[] getConfigurationFiles(boolean refresh)
public final void addConfigurationFilesListener(ConfigurationFilesListener l)
public final void removeConfigurationFilesListener(ConfigurationFilesListener l)
public final void addInstanceListener(InstanceListener l)
l
- listener which should be added.public final void removeInstanceListener(InstanceListener l)
l
- listener which should be removed.