|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.share.config.Configuration | +--oracle.cabo.share.config.Customization
The Customization class is a Configuration implementation which allows Configuration properties to be customized on a per-request basis. Most applications use a small number of ConfigurationImpl instances, which store global configuration settings for all users. However, certain Configuration properties, such as the LOOK_AND_FEEL or USER_STYLE_SHEET typically need to be specified on a per-user basis, based on the end user's preferences. Rather than create and intitialize a new ConfigurationImpl instance for each request, applications can create a lighter weight Customization instance which wraps the Configuration instance. Specific Configuration properties can then be overridden for the request via the Customization.putProperty() method.
Like all Configuration instances, Customization objects can be registered via the Configuration.register() API. Customization objects are somewhat different from other Configuration instances, as Customization instances should only exist while the user session for which the Customization is being used is valid. Once the user logs out, or the user's session expires, the application must unregister the user's Customization object by calling Configuration.unregister(). Failing to unregister a Customization object which is no longer being used results in a memory leak.
Note: Due to the extra burden that the unregistration requirement places on the application, the behavior of the Customization API is slightly more lenient than other Configuration implementations, such as the ConfigurationImpl class, which requires that all ConfigurationImpl instances be registered. Applications can elect not to register Customization instances. In this case, the user's preferred customizations may not be honored in certain situations. For example, UIX Components may render auxilary windows, such as the calendar dialog for date picking, without the user's customized preferences.
Fields inherited from class oracle.cabo.share.config.Configuration |
ACCESSIBILITY_MODE, BASE_DIRECTORY, DISABLE_CONTENT_COMPRESSION, HEADLESS, HELP_PROVIDER, IMAGE_SERVLET_URL, IMAGE_TYPE_MANAGER, IMAGES_CACHE_DIRECTORY, IMAGES_DIRECTORY, JSLIBS_DIRECTORY, JSPS_DIRECTORY, LOOK_AND_FEEL, LOOK_AND_FEEL_MANAGER, RENDERER_MANAGER, STYLE_SHEET_NAME, STYLES_CACHE_DIRECTORY, STYLES_DIRECTORY, TECATE_SERVLET_URL, TRANSLATION_LOCALE_MAPPER, USER_STYLE_SHEET, XML_PROVIDER |
Constructor Summary | |
Customization(Configuration config)
Creates a Customization which wraps the specified Configuration instance. |
|
Customization(java.lang.String name,
Configuration config)
Creates a named Customization which wraps the specific Configuration instance. |
Method Summary | |
java.lang.String |
getPath(java.lang.Object key,
java.lang.String contextPath)
Return a path for a Cabo directory. |
java.lang.Object |
getProperty(java.lang.Object key)
Return a registered property. |
java.lang.String |
getURI(java.lang.Object key,
java.lang.String contextURI)
Return a URI for a Cabo directory. |
boolean |
isDebug()
Returns whether the configuration is in debug mode. |
void |
putProperty(java.lang.Object key,
java.lang.Object value)
Registers a property. |
Methods inherited from class oracle.cabo.share.config.Configuration |
getConfiguration, getConfiguration, getName, register, register, unregister, unregister |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Customization(Configuration config)
public Customization(java.lang.String name, Configuration config)
Method Detail |
public java.lang.String getURI(java.lang.Object key, java.lang.String contextURI)
getURI
in class Configuration
oracle.cabo.share.config.Configuration
key
- the key used to identify the directorycontextURI
- the current contextURI; this will
be preprended to the returned URI if this directory
is registered as (or defaulting to) context-relative.
This path must not be terminated with a separator ("/").DirectoryUnavailableException
- if the directory is
unavailablepublic java.lang.String getPath(java.lang.Object key, java.lang.String contextPath)
getPath
in class Configuration
oracle.cabo.share.config.Configuration
key
- the key used to identify the directorycontextPath
- the current context path; this will
be preprended to the returned path if this directory
is registered as (or defaulting to) context-relative.DirectoryUnavailableException
- if the directory is
unavailablepublic java.lang.Object getProperty(java.lang.Object key)
getProperty
in class Configuration
key
- the key used to identify the propertypublic void putProperty(java.lang.Object key, java.lang.Object value)
public boolean isDebug()
isDebug
in class Configuration
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |