public static interface J2eeModuleProvider.ConfigSupport
J2eeModuleProvider.getServerID()
method.Modifier and Type | Interface and Description |
---|---|
static interface |
J2eeModuleProvider.ConfigSupport.DeployOnSaveListener
The listener interface to listen for deploy on save operations.
|
Modifier and Type | Method and Description |
---|---|
void |
addDeployOnSaveListener(J2eeModuleProvider.ConfigSupport.DeployOnSaveListener listener)
Adds a listener which is notified whenever there is deploy on save
performed for the provider associated with this support.
|
void |
addLibraryChangeListener(ChangeListener listener) |
void |
bindDatasourceReference(String referenceName,
String jndiName)
Binds the data source reference name with the corresponding data source which is
identified by the given JNDI name.
|
void |
bindDatasourceReferenceForEjb(String ejbName,
String ejbType,
String referenceName,
String jndiName)
Binds the data source reference name with the corresponding data source which is
identified by the given JNDI name.
|
void |
bindEjbReference(String referenceName,
String jndiName)
Binds EJB reference name with EJB name.
|
void |
bindEjbReferenceForEjb(String ejbName,
String ejbType,
String referenceName,
String jndiName)
Binds EJB reference name with EJB name within the EJB scope.
|
void |
bindMdbToMessageDestination(String mdbName,
String name,
MessageDestination.Type type)
Binds the message destination name with message-driven bean.
|
void |
bindMessageDestinationReference(String referenceName,
String connectionFactoryName,
String destName,
MessageDestination.Type type)
Binds the message destination reference name with the corresponding message destination which is
identified by the given name.
|
void |
bindMessageDestinationReferenceForEjb(String ejbName,
String ejbType,
String referenceName,
String connectionFactoryName,
String destName,
MessageDestination.Type type)
Binds the message destination reference name with the corresponding message destination which is
identified by the given name.
|
void |
configureLibrary(ServerLibraryDependency library)
Configure the library (dependency) the enterprise module needs in order
to work properly.
|
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 in the module.
|
boolean |
createInitialConfiguration()
Create an initial fresh configuration for the current module.
|
MessageDestination |
createMessageDestination(String name,
MessageDestination.Type type)
Creates and saves a message destination in the module if it does not exist in the module yet.
|
boolean |
ensureConfigurationReady()
Ensure configuration is ready to respond to any editing to the module.
|
Datasource |
findDatasource(String jndiName)
Finds data source with the given JNDI name.
|
String |
findDatasourceJndiName(String referenceName)
Finds JNDI name of data source which is mapped to the given reference name of a data source
|
String |
findDatasourceJndiNameForEjb(String ejbName,
String referenceName)
Finds JNDI name of data source which is mapped to the given reference name in the scope of the EJB.
|
String |
findJndiNameForEjb(String ejbName)
Returns a JNDI name for the given EJB or
null if the EJB has
no JNDI name assigned. |
MessageDestination |
findMessageDestination(String name)
Finds message destination with the given name.
|
String |
findMessageDestinationName(String mdbName)
Finds name of message destination which the given MDB listens to
|
String |
getContentRelativePath(String deploymentConfigurationFileName)
Return relative path within the archive or distribution content for the
given server specific deployment descriptor file.
|
Set<Datasource> |
getDatasources()
Gets the data sources saved in the module.
|
String[] |
getDeploymentConfigurationFileNames()
Return a list of file names for current server specific deployment
descriptor used in this module.
|
Set<ServerLibraryDependency> |
getLibraries()
Returns the server library dependencies the enterprise module needs
to work properly.
|
Set<MessageDestination> |
getMessageDestinations()
Retrieves message destinations stored in the module.
|
Set<MessageDestination> |
getServerMessageDestinations()
Retrieves message destinations configured on the target server instance.
|
String |
getWebContextRoot()
Get web module context root.
|
boolean |
isDatasourceCreationSupported()
Tests whether data source creation is supported.
|
boolean |
isDescriptorRequired() |
void |
removeDeployOnSaveListener(J2eeModuleProvider.ConfigSupport.DeployOnSaveListener listener)
Removes the listener listening for deploy on save.
|
void |
removeLibraryChangeListener(ChangeListener listener) |
void |
setCMPMappingInfo(OriginalCMPMapping[] mappings)
Push the CMP and CMR mapping info to the server configuraion.
|
void |
setCMPResource(String ejbName,
String jndiName)
Sets the resource for the specified CMP bean.
|
void |
setWebContextRoot(String contextRoot)
Set web module context root.
|
boolean |
supportsCreateMessageDestination()
Tests whether a message destination creation is supported.
|
boolean createInitialConfiguration()
boolean ensureConfigurationReady()
void setWebContextRoot(String contextRoot) throws ConfigurationException
contextRoot
- web module context root.ConfigurationException
- reports errors in setting the web context
root.String getWebContextRoot() throws ConfigurationException
ConfigurationException
- reports errors in setting the web context
root.String[] getDeploymentConfigurationFileNames()
String getContentRelativePath(String deploymentConfigurationFileName)
deploymentConfigurationFileName
- server specific descriptor file namevoid setCMPMappingInfo(OriginalCMPMapping[] mappings) throws ConfigurationException
ConfigurationException
- reports errors in setting the CMP mapping.void setCMPResource(String ejbName, String jndiName) throws ConfigurationException
ejbName
- name of the CMP bean.jndiName
- the JNDI name of the resource.ConfigurationException
- reports errors in setting the CMP resource.NullPointerException
- if any of the parameters is null
.boolean isDatasourceCreationSupported()
Set<Datasource> getDatasources() throws ConfigurationException
ConfigurationException
- reports errors in retrieving the data sources.Datasource createDatasource(String jndiName, String url, String username, String password, String driver) throws UnsupportedOperationException, DatasourceAlreadyExistsException, ConfigurationException
jndiName
- name of data sourceurl
- database URLusername
- database userpassword
- user's passworddriver
- fully qualified name of database driver classUnsupportedOperationException
- if operation is not supportedDatasourceAlreadyExistsException
- if conflicting data source is foundConfigurationException
- reports errors in creating the data source.void bindDatasourceReference(String referenceName, String jndiName) throws ConfigurationException
referenceName
- name used to identify the data sourcejndiName
- JNDI name of the data sourceNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with data source configurationvoid bindDatasourceReferenceForEjb(String ejbName, String ejbType, String referenceName, String jndiName) throws ConfigurationException
ejbName
- EJB nameejbType
- EJB type - the possible values are
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.SESSION,
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.ENTITY and
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.MESSAGE_DRIVENreferenceName
- name used to identify the data sourcejndiName
- JNDI name of the data sourceNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with data source configurationIllegalArgumentException
- if ejbType doesn't have one of allowed valuesString findDatasourceJndiName(String referenceName) throws ConfigurationException
referenceName
- reference name of data sourceNullPointerException
- if reference name is nullConfigurationException
- if there is some problem with data source configurationString findDatasourceJndiNameForEjb(String ejbName, String referenceName) throws ConfigurationException
ejbName
- EJB namereferenceName
- reference name of data sourceNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with data source configurationDatasource findDatasource(String jndiName) throws ConfigurationException
jndiName
- JNDI name of a data sourceNullPointerException
- if JNDI name is nullConfigurationException
- if there is some problem with data source configurationvoid configureLibrary(@NonNull ServerLibraryDependency library) throws ConfigurationException
Once library is configured it should be present in the result
of the J2eeModuleProvider.getRequiredLibraries()
call.
library
- the library the enterprise module needs in order to work
properlyConfigurationException
- if there was a problem writing
configuration@NonNull Set<ServerLibraryDependency> getLibraries() throws ConfigurationException
ConfigurationException
- if there was a problem reading
configurationvoid addLibraryChangeListener(@NonNull ChangeListener listener)
void removeLibraryChangeListener(@NonNull ChangeListener listener)
boolean isDescriptorRequired()
void addDeployOnSaveListener(J2eeModuleProvider.ConfigSupport.DeployOnSaveListener listener)
listener
- listener to addvoid removeDeployOnSaveListener(J2eeModuleProvider.ConfigSupport.DeployOnSaveListener listener)
listener
- listener to removeJ2eeModuleProvider.ConfigSupport.addDeployOnSaveListener(DeployOnSaveListener)
Set<MessageDestination> getMessageDestinations() throws ConfigurationException
ConfigurationException
- if there is some problem with message destination configurationSet<MessageDestination> getServerMessageDestinations() throws ConfigurationException
ConfigurationException
- if there is some problem with message destination configurationboolean supportsCreateMessageDestination()
MessageDestination createMessageDestination(String name, MessageDestination.Type type) throws UnsupportedOperationException, ConfigurationException
name
- name of the message destinationtype
- message destination typeNullPointerException
- if any of parameters is nullUnsupportedOperationException
- if this opearation is not supportedConfigurationException
- if there is some problem with message destination configurationvoid bindMdbToMessageDestination(String mdbName, String name, MessageDestination.Type type) throws ConfigurationException
mdbName
- MDB namename
- name of the message destinationtype
- message destination typeNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with message destination configurationString findMessageDestinationName(String mdbName) throws ConfigurationException
mdbName
- MDB nameNullPointerException
- if MDB name is nullConfigurationException
- if there is some problem with message destination configurationMessageDestination findMessageDestination(String name) throws ConfigurationException
name
- message destination nameNullPointerException
- if name is nullConfigurationException
- if there is some problem with message destination configurationvoid bindMessageDestinationReference(String referenceName, String connectionFactoryName, String destName, MessageDestination.Type type) throws ConfigurationException
referenceName
- reference name used to identify the message destinationconnectionFactoryName
- connection factory namedestName
- name of the message destinationtype
- message destination typeNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with message destination configurationvoid bindMessageDestinationReferenceForEjb(String ejbName, String ejbType, String referenceName, String connectionFactoryName, String destName, MessageDestination.Type type) throws ConfigurationException
ejbName
- EJB nameejbType
- EJB type - the possible values are
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.SESSION,
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.ENTITY and
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.MESSAGE_DRIVENreferenceName
- reference name used to identify the message destinationconnectionFactoryName
- connection factory namedestName
- name of the message destinationtype
- message destination typeNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with message destination configurationIllegalArgumentException
- if ejbType doesn't have one of allowed valuesString findJndiNameForEjb(String ejbName) throws ConfigurationException
null
if the EJB has
no JNDI name assigned.ejbName
- EJB namenull
if the EJB has no
JNDI name assigned.ConfigurationException
- if there is some problem with EJB configuration.void bindEjbReference(String referenceName, String jndiName) throws ConfigurationException
referenceName
- name used to identify the EJBjndiName
- JNDI name of the referenced EJBNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with EJB configurationvoid bindEjbReferenceForEjb(String ejbName, String ejbType, String referenceName, String jndiName) throws ConfigurationException
ejbName
- EJB nameejbType
- EJB type - the possible values are
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.SESSION,
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.ENTITY and
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.MESSAGE_DRIVENreferenceName
- name used to identify the referenced EJBjndiName
- JNDI name of the referenced EJBNullPointerException
- if any of parameters is nullConfigurationException
- if there is some problem with EJB configurationIllegalArgumentException
- if ejbType doesn't have one of allowed values