|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider
public abstract class J2eeModuleProvider
This object must be implemented by J2EE module support and an instance added into project lookup.
Nested Class Summary | |
---|---|
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... |
Field Summary | |
---|---|
static String |
PROP_ENTERPRISE_RESOURCE_DIRECTORY
Enterprise resorce directory property |
Constructor Summary | |
---|---|
J2eeModuleProvider()
|
Method Summary | |
---|---|
void |
addConfigurationFilesListener(ConfigurationFilesListener l)
|
void |
addInstanceListener(InstanceListener l)
Register an instance listener that will listen to server instances changes. |
void |
addPropertyChangeListener(PropertyChangeListener l)
Register a listener which will be notified when some of the properties change. |
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()
Deploys data sources saved in the module. |
abstract org.openide.filesystems.FileObject |
findDeploymentConfigurationFile(String name)
Finds source deployment configuration file object for the given deployment configuration file name. |
protected void |
firePropertyChange(String propName,
Object oldValue,
Object newValue)
Fire PropertyChange to all registered PropertyChangeListeners. |
protected void |
fireServerChange(String oldServerID,
String newServerID)
|
J2eeModuleProvider.ConfigSupport |
getConfigSupport()
|
org.openide.filesystems.FileObject[] |
getConfigurationFiles()
Returns all configuration files known to this J2EE Module. |
org.openide.filesystems.FileObject[] |
getConfigurationFiles(boolean refresh)
|
abstract File |
getDeploymentConfigurationFile(String name)
Returns source deployment configuration file path for the given deployment configuration file name. |
String |
getDeploymentName()
Return name to be used in deployment of the module. |
File |
getEnterpriseResourceDirectory()
Returns directory containing definition for enterprise resources needed for the module execution; return null if not supported |
InstanceProperties |
getInstanceProperties()
Return InstanceProperties of the server instance |
abstract J2eeModule |
getJ2eeModule()
|
abstract ModuleChangeReporter |
getModuleChangeReporter()
|
Set<Datasource> |
getModuleDatasources()
Gets the data sources saved in the module. |
Set<Datasource> |
getServerDatasources()
Gets the data sources deployed on the target server instance. |
ServerDebugInfo |
getServerDebugInfo()
Return server debug info. |
String |
getServerID()
This method is used to determin type of target server. |
String |
getServerInstanceID()
Id of server isntance for deployment. |
SourceFileMap |
getSourceFileMap()
Return destination path-to-source file mappings. |
org.openide.filesystems.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. |
void |
removeConfigurationFilesListener(ConfigurationFilesListener l)
|
void |
removeInstanceListener(InstanceListener l)
Remove an instance listener which has been registered previously. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a listener registered previously. |
abstract void |
setServerInstanceID(String severInstanceID)
Set ID of the server instance that will be used for deployment. |
boolean |
useDefaultServer()
If the module wants to specify a target server instance for deployment it needs to override this method to return false. |
void |
verify(org.openide.filesystems.FileObject target,
OutputStream logger)
Invoke verifier from current platform on the provided target file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_ENTERPRISE_RESOURCE_DIRECTORY
Constructor Detail |
---|
public J2eeModuleProvider()
Method Detail |
---|
public abstract J2eeModule getJ2eeModule()
public abstract ModuleChangeReporter getModuleChangeReporter()
public final J2eeModuleProvider.ConfigSupport getConfigSupport()
public final ServerDebugInfo getServerDebugInfo()
public Set<Datasource> getServerDatasources()
public Set<Datasource> getModuleDatasources()
public boolean isDatasourceCreationSupported()
public final Datasource createDatasource(String jndiName, String url, String username, String password, String driver) throws DatasourceAlreadyExistsException
jndiName
- name of data sourceurl
- database URLusername
- database userpassword
- user's passworddriver
- fully qualified name of database driver class
DatasourceAlreadyExistsException
- if conflicting data source is foundpublic void deployDatasources() throws javax.enterprise.deploy.spi.exceptions.ConfigurationException, DatasourceAlreadyExistsException
javax.enterprise.deploy.spi.exceptions.ConfigurationException
- if there is some problem with data source configuration
DatasourceAlreadyExistsException
- if module data source(s) are conflicting
with data source(s) already deployed on the serverpublic final void addPropertyChangeListener(PropertyChangeListener l)
l
- listener which should be added.public final void removePropertyChangeListener(PropertyChangeListener l)
l
- listener which should be removed.protected final void firePropertyChange(String propName, Object oldValue, Object newValue)
propName
- property name.oldValue
- old value.newValue
- new value.public abstract File getDeploymentConfigurationFile(String name)
name
- file name of the deployement configuration file.
public abstract org.openide.filesystems.FileObject findDeploymentConfigurationFile(String name)
name
- file name of the deployement configuration file.
public File getEnterpriseResourceDirectory()
public org.openide.filesystems.FileObject[] getSourceRoots()
public SourceFileMap getSourceFileMap()
public boolean useDefaultServer()
public abstract void setServerInstanceID(String severInstanceID)
severInstanceID
- server instance ID.public String getServerInstanceID()
useDefaultServer
.
public InstanceProperties getInstanceProperties()
public String getServerID()
getServerInstanceID
.
public String getDeploymentName()
public boolean hasVerifierSupport()
public void verify(org.openide.filesystems.FileObject target, OutputStream logger) throws ValidationException
target
- File to run verifier against.logger
- output stream to write verification resutl to.
ValidationException
protected final void fireServerChange(String oldServerID, String newServerID)
public final org.openide.filesystems.FileObject[] getConfigurationFiles()
public final org.openide.filesystems.FileObject[] getConfigurationFiles(boolean refresh)
public final void addConfigurationFilesListener(ConfigurationFilesListener l)
public final void removeConfigurationFilesListener(ConfigurationFilesListener l)
public final void addInstanceListener(InstanceListener l)
public final void removeInstanceListener(InstanceListener l)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |