org.netbeans.modules.j2ee.deployment.devmodules.spi
Interface J2eeModuleProvider.ConfigSupport

Enclosing class:
J2eeModuleProvider

public 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... The setters and getters work with server specific data on the server returned by getServerID method.


Method Summary
 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.
 boolean ensureConfigurationReady()
          Ensure configuration is ready to respond to any editing to the module.
 void ensureResourceDefinedForEjb(String ejbname, String ejbtype)
          Ensure needed resources are automatically defined for the entity represented by given DDBean.
 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.
 String getWebContextRoot()
           
 boolean isDatasourceCreationSupported()
          Tests whether data source creation is supported.
 void setCMPMappingInfo(OriginalCMPMapping[] mappings)
          Push the CMP and CMR mapping info to the server configuraion.
 void setWebContextRoot(String contextRoot)
          Set/get web module context root.
 

Method Detail

createInitialConfiguration

boolean createInitialConfiguration()
Create an initial fresh configuration for the current module. Do nothing if configuration already exists.

Returns:
true if there is no existing configuration, false if there is exsisting configuration.

ensureConfigurationReady

boolean ensureConfigurationReady()
Ensure configuration is ready to respond to any editing to the module.

Returns:
true if the configuration is ready, else false.

setWebContextRoot

void setWebContextRoot(String contextRoot)
Set/get web module context root.


getWebContextRoot

String getWebContextRoot()

getDeploymentConfigurationFileNames

String[] getDeploymentConfigurationFileNames()
Return a list of file names for current server specific deployment descriptor used in this module.


getContentRelativePath

String getContentRelativePath(String deploymentConfigurationFileName)
Return relative path within the archive or distribution content for the given server specific deployment descriptor file.

Parameters:
deploymentConfigurationFileName - server specific descriptor file name
Returns:
relative path inside distribution content.

setCMPMappingInfo

void setCMPMappingInfo(OriginalCMPMapping[] mappings)
Push the CMP and CMR mapping info to the server configuraion. This call is typically used by CMP mapping wizard.


ensureResourceDefinedForEjb

void ensureResourceDefinedForEjb(String ejbname,
                                 String ejbtype)
Ensure needed resources are automatically defined for the entity represented by given DDBean.

Parameters:
ejbname - the ejb name
ejbtype - dtd name for type of ejb: 'message-drive', 'entity', 'session'.

isDatasourceCreationSupported

boolean isDatasourceCreationSupported()
Tests whether data source creation is supported.

Returns:
true if data source creation is supported, false otherwise.
Since:
1.15

getDatasources

Set<Datasource> getDatasources()
Gets the data sources saved in the module.

Returns:
set of data sources
Since:
1.15

createDatasource

Datasource createDatasource(String jndiName,
                            String url,
                            String username,
                            String password,
                            String driver)
                            throws javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException,
                                   DatasourceAlreadyExistsException
Creates and saves data source in the module if it does not exist yet in the module. Data source is considered to be existing when JNDI name of the found data source and the one just created equal.

Parameters:
jndiName - name of data source
url - database URL
username - database user
password - user's password
driver - fully qualified name of database driver class
Returns:
created data source
Throws:
javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException - if operation is not supported
DatasourceAlreadyExistsException - if conflicting data source is found
Since:
1.15

 

Built on March 27 2006.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.