Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adf.share.config
Class ADFConfigImpl

java.lang.Object
  extended by oracle.adf.share.config.ADFConfigImpl
All Implemented Interfaces:
ADFConfig, ADFConfigEx, ADFConfigLifecycle, ADFSettings

public class ADFConfigImpl
extends java.lang.Object
implements ADFConfigEx, ADFConfigLifecycle

This is a implementation class of ADF configuration object. The Application Configuration object will manage and store the Application wide configuration information for diifferent components of an ADF application.

ADF configuration object is initilzed with ADF context object.

The adf configuration file looks like <?xml version="1.0" encoding="windows-1252" ?>

<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:adf=”
            http://xmlns.oracle.com/adf/config
  targetNamespace="http://xmlns.oracle.com/adf/jndi/config"
  xmlns:jndiC="http://xmlns.oracle.com/adf/jndi/config"
  elementFormDefault="qualified">
  <complexType name="PropertyType">
  <attribute name="name" type="string"/>
  <attribute name="value" type="string" />
 </complexType>
 <complexType name="ADFJndiConfigType">
  <sequence>
   <element name="contextEnv" type="jndiC:PropertyType"
        minOccurs="0"  maxOccurs="unbounded"/>
  </sequence>
  <attribute name="initialContextFactoryClass"
  default="oracle.adf.share.jndi.InitialContextFactoryImpl"/>
  <attribute name="backingStoreClass"
  default="oracle.adf.share.jndi.ResourceBackingStore"/>
  <attribute name="backingStoreURL" default="META-INF/connections.xml"/>
 </complexType>
 
 <element name="adf-jndi-config" type="jndiC:ADFJndiConfigType"
  substitutionGroup="adf:adf-config-child"/>
</schema>

Since:
10.1.3
Version:
10.1.3, 02/05/05

Field Summary
static java.lang.String ADF_CONFIG_CHILD
           
static java.lang.String CALLBACK_FILE
           
static java.lang.Class CLASS_INSTANCE
           
static java.lang.String NAMESPACE_ADF_MDS_CONFIG
           
 
Fields inherited from interface oracle.adf.share.ADFConfig
ADFCONFIG_META_FILENAME, ADFCONFIG_MO_NAME, CONFIG_FILENAME, DEFAULT_CONFIGURATION, NAMESPACE, ROOT_ELEMENT_NAME
 
Fields inherited from interface oracle.adf.share.ADFSettings
ADFSETTINGS_FILENAME, ADFSETTINGS_NAMESPACE, ADFSETTINGS_ROOT_ELEMENT_NAME
 
Constructor Summary
ADFConfigImpl(java.lang.String namedConfig, URL url)
           
 
Method Summary
 void addScopeListener(ADFScopeListener listener)
          Adds a scope listener.
 void clearCaches()
           
 java.lang.String dumpAdfConfig()
           
 java.lang.String getApplicationName()
           
 java.lang.Object getApplicationObject(java.lang.String appObjectKey)
           
 Map getCallBackMap()
           
 Map getConfigObject(java.lang.String namespace)
          get the configuration object information stored for the provided namespace
 Map getConfigObject(java.lang.String namespace, boolean forceReparse)
          get the config object information stored for the provided namespace
 oracle.adfnmc.javax.naming.Context getConnectionsContext()
          JNDI context containing the application connection definitions.
 java.lang.Object getId()
          Unique identifier for this application
 java.lang.Object getMDSInstance()
          Gets the MDS instance configured for this application
 java.lang.Object getMDSInstance(boolean bCreate)
          Gets the MDS instance, but controls if it should be created via the parameter.
 oracle.adfnmc.javax.naming.Context getSecurityContext()
          Security context containing the jaas configuration.
 List getSessionDefPackages()
           
protected  void init()
          Initilization function, which will load the adf config xml file, process the configuration object.
protected  void invokeMDSInstanceClearCache()
           
 void releaseResources()
          Releases resources allocated by the config
 void removeScopeListener(ADFScopeListener listener)
          Removes a scope listener.
protected  void reset()
           
 void setApplicationObject(java.lang.String appObjectKey, java.lang.Object appObject)
           
 void updateIfNeeded()
          Called to give the config a place to see if the document has been updated and needs to be processed again.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE

CALLBACK_FILE

public static final java.lang.String CALLBACK_FILE
See Also:
Constant Field Values

ADF_CONFIG_CHILD

public static final java.lang.String ADF_CONFIG_CHILD
See Also:
Constant Field Values

NAMESPACE_ADF_MDS_CONFIG

public static final java.lang.String NAMESPACE_ADF_MDS_CONFIG
See Also:
Constant Field Values
Constructor Detail

ADFConfigImpl

public ADFConfigImpl(java.lang.String namedConfig,
                     URL url)
Method Detail

getApplicationName

public java.lang.String getApplicationName()

getId

public java.lang.Object getId()
Description copied from interface: ADFConfig
Unique identifier for this application

Specified by:
getId in interface ADFConfig

getCallBackMap

public Map getCallBackMap()
Returns:
the map

reset

protected void reset()

init

protected void init()
Initilization function, which will load the adf config xml file, process the configuration object.


getConfigObject

public Map getConfigObject(java.lang.String namespace)
get the configuration object information stored for the provided namespace

Specified by:
getConfigObject in interface ADFSettings
Parameters:
namespace - namespace for which configObject is to be returned
Returns:
java.util.Map _storedResults for this namespace.

getConfigObject

public Map getConfigObject(java.lang.String namespace,
                           boolean forceReparse)
Description copied from interface: ADFConfigEx
get the config object information stored for the provided namespace

Specified by:
getConfigObject in interface ADFConfigEx
Parameters:
namespace - namespace for which settings is to be returned
forceReparse - this flag decides if the the ADFConfig needs to be recomputed. The ADFConifg component callback parser will be called invariably if true

getMDSInstance

public java.lang.Object getMDSInstance()
Description copied from interface: ADFConfig
Gets the MDS instance configured for this application

Specified by:
getMDSInstance in interface ADFConfig
Returns:
MDS instance the application is configured with or null if none exists.

getMDSInstance

public java.lang.Object getMDSInstance(boolean bCreate)
Description copied from interface: ADFConfig
Gets the MDS instance, but controls if it should be created via the parameter.

Specified by:
getMDSInstance in interface ADFConfig
Parameters:
bCreate - whether to create if one does not exists and if applicable.
Returns:
MDS instance the application is configured with or null if none exists.

getSessionDefPackages

public List getSessionDefPackages()
Specified by:
getSessionDefPackages in interface ADFConfig

getConnectionsContext

public oracle.adfnmc.javax.naming.Context getConnectionsContext()
                                                         throws oracle.adfnmc.javax.naming.NamingException
Description copied from interface: ADFConfig
JNDI context containing the application connection definitions.

Specified by:
getConnectionsContext in interface ADFConfig
Throws:
oracle.adfnmc.javax.naming.NamingException

getSecurityContext

public oracle.adfnmc.javax.naming.Context getSecurityContext()
                                                      throws oracle.adfnmc.javax.naming.NamingException
Description copied from interface: ADFConfig
Security context containing the jaas configuration.

Specified by:
getSecurityContext in interface ADFConfig
Throws:
oracle.adfnmc.javax.naming.NamingException

releaseResources

public void releaseResources()
Description copied from interface: ADFConfigEx
Releases resources allocated by the config

Specified by:
releaseResources in interface ADFConfigEx

clearCaches

public void clearCaches()
Specified by:
clearCaches in interface ADFConfigLifecycle

invokeMDSInstanceClearCache

protected void invokeMDSInstanceClearCache()

addScopeListener

public void addScopeListener(ADFScopeListener listener)
Description copied from interface: ADFConfigEx
Adds a scope listener.

Specified by:
addScopeListener in interface ADFConfigEx

removeScopeListener

public void removeScopeListener(ADFScopeListener listener)
Description copied from interface: ADFConfigEx
Removes a scope listener.

Specified by:
removeScopeListener in interface ADFConfigEx

updateIfNeeded

public void updateIfNeeded()
Description copied from interface: ADFConfigEx
Called to give the config a place to see if the document has been updated and needs to be processed again.

Specified by:
updateIfNeeded in interface ADFConfigEx

dumpAdfConfig

public java.lang.String dumpAdfConfig()

getApplicationObject

public java.lang.Object getApplicationObject(java.lang.String appObjectKey)

setApplicationObject

public void setApplicationObject(java.lang.String appObjectKey,
                                 java.lang.Object appObject)

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.