|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.client.Configuration
Class to manage 'Configuration' file created during the design time.
The Configuaration file contains one or more named 'Configuration's. A
'Configuration' is a named collection of property-value pairs. They
correspond to the list of property-value pairs, needed to perform a
JNDI lookup and create an AppModule.
The property values stored in the external file might be mapped to
another property name before being used in a JNDI lookup.
This mapping is neeed for some properties such as the JDBC connection name.
For ease, of editing in the design time, the JDBC connection is stored
as a named connection and might need to be mapped to another property name.
This class can retrieve a Configuration created during the design
time or create a new 'Configuration'.
This class along with the Configuration file provides an alternative way
to store the list of parameters needed to create an AppModule. Clients who
wish to store/retrieve the parameters from the Configuration file should
use this class.
Configuration c = new Configuration(
Configuration.buildConfigFileName("package10"));
Hashtable env = c.getConfiguration("Oracle8iCorba");
ApplicationModuleHome home =
(ApplicationModuleHome)ic.lookup(
env.get(Configuration.APPMODULE_JNDI_NAME);
.....
.....
Field Summary |
Type | Field |
---|---|
protected static java.lang.String |
APP_MODULE_CONFIG_BAG
|
protected static java.lang.String |
APP_MODULE_CONFIG_NAME
|
static java.lang.String |
APPLICATION_NAME_PROPERTY
name of the property in the Config, which identifies the package qualified AppModuleName |
static java.lang.String |
APPLICATION_TYPE_PROPERTY
name of the property in the Config, which identifies the meaning of the APPLICATION_NAME_PROPERTY. |
static java.lang.String |
APPLICATION_TYPE_VALUE_APPMODULE
|
static java.lang.String |
APPLICATION_TYPE_VALUE_PACKAGE
|
static java.lang.String |
APPMODULE_JNDI_NAME
name of the property in the Config, which identifies the jndi name used to lookup the appmodule home. |
static java.lang.String |
APPSERVER_CONNECTION_NAME
|
protected static java.lang.String |
ATTR_CONFIG_NAME
|
static java.lang.String |
BC4J_CONFIG
Name of the tag, which in turn holds the AppModuleConfig nodes |
static java.lang.String |
BC4J_CONFIG_NAME
|
static java.lang.String |
COMMON
name of the common package |
protected XMLDocument |
configDocument
|
protected static java.lang.String |
CONNECTION_DEF_NAME
|
protected static oracle.jdeveloper.cm.ConnectionManager |
connectionManager
|
static java.lang.String |
DB_CONNECTION_PROPERTY
|
static java.lang.String |
DB_DATASOURCE_PASSWD_PROPERTY
|
static java.lang.String |
DB_DATASOURCE_PROPERTY
|
static java.lang.String |
DB_DATASOURCE_USERNAME_PROPERTY
|
static java.lang.String |
DB_PASSWORD_PROPERTY
|
static java.lang.String |
DB_USERNAME_PROPERTY
|
static java.lang.String |
DEFAULT_CONFIG_FILE
|
static java.lang.String |
DEFAULT_CONFIG_FILE_EXT
default name for the configuration file, created by the Wizards. |
static java.lang.String |
DEFAULT_CONFIG_FILENAME
|
protected DOMParser |
domParser
|
static java.lang.String |
DT_COMMONDEPLOYMENTPROFILE
|
static java.lang.String |
DT_DEPLOYMENTPROFILE
name of the designtime deployment profile that created the configuration Currently only supported on ejb. |
static java.lang.String |
DT_MIDDLETIERDEPLOYMENTPROFILE
|
static java.lang.String |
HTTP_CONNECTION_NAME
constant to indicate the HTTP connection name |
static java.lang.String |
IIOP_CONNECTION_NAME
constant to indicate the IIOP connection name |
static java.lang.String |
JBO_SESSION_COOKIE
|
static java.lang.String |
JDBC_CONNECTION_NAME
name of the property in the Config, which identifies the connect string. |
static java.lang.String |
JDBC_DS_NAME
|
static java.lang.String |
O8I_CONNECT_STRING
default connect string for an 8i connection |
Constructor Summary |
Configuration()
|
Method Summary |
Type | Method |
---|---|
protected void |
addProperties(java.util.Hashtable h)
|
static java.lang.String |
buildConfigurationFileName(java.lang.String fileName)
A helper function which hides the details of building a package qualified filename for the Configuration file. |
static java.lang.String |
buildConfigurationFileNameFromClassPath(java.lang.String packageName)
|
void |
createNewConnectionEntry(java.lang.String sName,
java.util.Properties props)
|
static ApplicationModule |
createRootApplicationModule(java.lang.String qualifiedAMDefName,
java.lang.String configName)
Creates and connects an application module using the specified configuration. |
static ApplicationModule |
createRootApplicationModule(java.lang.String qualifiedAMDefName,
java.lang.String configName,
EnvInfoProvider envInfo)
Creates and connects an application module using the specified configuration. |
protected Node |
getAppModuleConfigBagNode()
|
protected NodeList |
getAppModuleConfigNodes()
|
java.util.Hashtable |
getConfiguration(java.lang.String nameOfTheConfiguration)
Get the list of properties for a given Configuration. |
void |
getConfiguration(java.lang.String nameOfTheConfiguration,
java.util.Hashtable env)
|
java.lang.String[] |
getConfigurationNameList()
Get the list of 'named' Configuration defined in this file. |
protected Node |
getConfigurationNode(java.lang.String name)
Helper function to get a named config node |
protected NodeList |
getConnectionDefinitionNodes()
|
oracle.jdeveloper.cm.ConnectionDescriptor |
getConnectionDescriptor(java.lang.String connectionName)
|
protected XMLDocument |
getXMLDocument(java.io.InputStream inputStream)
|
void |
initializeFromConnectionName(java.util.Hashtable ht)
|
void |
loadFromClassPath(java.lang.String classPathConfigurationFileName)
Pass the name of the Configuration file. |
void |
loadFromFile(java.lang.String configurationFileName)
|
void |
loadFromStream(java.io.InputStream in)
Build a Configuration class using the input stream on the config file. |
protected void |
registerConnectionsFromDocument()
|
static void |
releaseRootApplicationModule(ApplicationModule appModule,
boolean remove)
Release the specified application module. |
protected void |
removeConfigurationProperty(java.lang.String configName,
java.lang.String property)
|
protected void |
removeConnectionEntry(java.lang.String sName)
|
void |
updateConnectionDefinition(java.lang.String connectionName,
oracle.jdeveloper.cm.ConnectionDescriptor connProps)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String BC4J_CONFIG
protected static final java.lang.String APP_MODULE_CONFIG_BAG
protected static final java.lang.String APP_MODULE_CONFIG_NAME
protected static final java.lang.String CONNECTION_DEF_NAME
protected static final java.lang.String ATTR_CONFIG_NAME
public static final java.lang.String APPLICATION_NAME_PROPERTY
public static final java.lang.String APPMODULE_JNDI_NAME
public static final java.lang.String BC4J_CONFIG_NAME
public static final java.lang.String APPLICATION_TYPE_PROPERTY
public static final java.lang.String APPLICATION_TYPE_VALUE_PACKAGE
public static final java.lang.String APPLICATION_TYPE_VALUE_APPMODULE
public static final java.lang.String DB_CONNECTION_PROPERTY
public static final java.lang.String DB_USERNAME_PROPERTY
public static final java.lang.String DB_PASSWORD_PROPERTY
public static final java.lang.String DB_DATASOURCE_PROPERTY
public static final java.lang.String DB_DATASOURCE_USERNAME_PROPERTY
public static final java.lang.String DB_DATASOURCE_PASSWD_PROPERTY
public static final java.lang.String JDBC_CONNECTION_NAME
public static final java.lang.String DT_DEPLOYMENTPROFILE
public static final java.lang.String DT_COMMONDEPLOYMENTPROFILE
public static final java.lang.String DT_MIDDLETIERDEPLOYMENTPROFILE
public static final java.lang.String IIOP_CONNECTION_NAME
public static final java.lang.String APPSERVER_CONNECTION_NAME
public static final java.lang.String HTTP_CONNECTION_NAME
public static final java.lang.String JDBC_DS_NAME
public static final java.lang.String O8I_CONNECT_STRING
public static final java.lang.String COMMON
public static final java.lang.String DEFAULT_CONFIG_FILE_EXT
public static final java.lang.String DEFAULT_CONFIG_FILE
public static final java.lang.String DEFAULT_CONFIG_FILENAME
public static final java.lang.String JBO_SESSION_COOKIE
protected XMLDocument configDocument
protected DOMParser domParser
protected static oracle.jdeveloper.cm.ConnectionManager connectionManager
Constructor Detail |
public Configuration()
Method Detail |
public void loadFromStream(java.io.InputStream in) throws JboException
in
- The input stream on the config filepublic void loadFromFile(java.lang.String configurationFileName) throws JboException
public void loadFromClassPath(java.lang.String classPathConfigurationFileName) throws JboException
filename
- Package qualified name of the Configuration file.
The configuratin file named bc4j.xcfg is stored in the
common package of an AppModulepublic java.util.Hashtable getConfiguration(java.lang.String nameOfTheConfiguration) throws JboException
nameOfTheConfiguration
- which was created in the design time
using the Configurations dialog.JboException
- if the named Configuration is not foundpublic void getConfiguration(java.lang.String nameOfTheConfiguration, java.util.Hashtable env) throws JboException
protected void addProperties(java.util.Hashtable h)
public java.lang.String[] getConfigurationNameList() throws JboException
JboException
- if the named Configuration is not foundpublic static java.lang.String buildConfigurationFileName(java.lang.String fileName)
packageName
- pass the name of the ApplicationModule package.,
ex., pass package10, for package10.Package10Modulepublic static java.lang.String buildConfigurationFileNameFromClassPath(java.lang.String packageName)
protected Node getConfigurationNode(java.lang.String name)
protected NodeList getAppModuleConfigNodes()
protected NodeList getConnectionDefinitionNodes()
protected Node getAppModuleConfigBagNode()
protected XMLDocument getXMLDocument(java.io.InputStream inputStream) throws JboException
public void initializeFromConnectionName(java.util.Hashtable ht)
protected void registerConnectionsFromDocument() throws JboException
public oracle.jdeveloper.cm.ConnectionDescriptor getConnectionDescriptor(java.lang.String connectionName)
public void updateConnectionDefinition(java.lang.String connectionName, oracle.jdeveloper.cm.ConnectionDescriptor connProps)
protected void removeConnectionEntry(java.lang.String sName)
public void createNewConnectionEntry(java.lang.String sName, java.util.Properties props)
protected void removeConfigurationProperty(java.lang.String configName, java.lang.String property)
public static void releaseRootApplicationModule(ApplicationModule appModule, boolean remove)
appModule
- an application module which was created with createRootApplicationModule(String,
String, EnvInfoProvider)
remove
- indicates whether the application module should be removed
true: remove the application module
false: retain the application module for future usepublic static ApplicationModule createRootApplicationModule(java.lang.String qualifiedAMDefName, java.lang.String configName)
qualifiedAMDefName
- the package qualified application module definition nameconfigName
- the name ofthe configurationpublic static ApplicationModule createRootApplicationModule(java.lang.String qualifiedAMDefName, java.lang.String configName, EnvInfoProvider envInfo)
qualifiedAMDefName
- the package qualified application module definition nameconfigName
- the name ofthe configurationenvInfo
- an EnvInfoProvider which may be used to provide additional
information when the application module is connected
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |