|
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
The Configuration
class and its default
implementation, ConfigurationImpl
, are responsible for
providing UIX URLs and file paths to all of the UIX projects. It
also provides APIs for retrieving generic object properties. By
localizing all this information in a single object not connected to
the UIX Components RenderingContext
or any other
per-request object, we allow clients to configure UIX in a single
location in a client's code using a unified API.
Before developers consider using this API, they should consider
using the WEB-INF/uix-config.xml
file, which provides
a simple XML format for configuring UIX.
This class is immutable; clients use the
ConfigurationImpl
class to set the properties.
In general, we expect clients will maintain one or a small set
of Configuration objects in a central code location (e.g., one
for HTML, another for WML), and reuse these configuration
objects across requests.
Each Configuration object must have a unique name, and must be
registered (with the register() method). This is critical for
allowing UIX JSPs launched by a page to execute with the same
Configuration. It also provides a convenience for clients, who
can retrieve a configuration simply by calling the static
getConfiguration()
method.
/cabo (empty) | +-- /images (static UIX Components images) | | | +-- /cache (UIX-generated images) | +-- /styles (BLAF.xss) | | | +-- /cache (UIX-generated stylesheets) | +-- /jsLibs (UIX Components Javascript libraries) | +-- /jsps (UIX Components JSPs)
This hierarchy can be modified at any point; subdirectories, if left defaulted, will continue from their parents. For example, setting the "/images" directory to "/foo" will result in UIX generating its images into "/foo/cache". (Clients should be careful when setting the /jsps directory - see the documentation for the JSPS_DIRECTORY constant.)
For clients running against the Servlet 2.2 API, the context URI is
the path prefix associated with the ServletContext
that this servlet is a part of; see section 5.4 of the Servlet
specification. The context path is the path to the directory
on the local file system for that ServletContext
.
For example, in Tomcat, each subdirectory of "\webapps" corresponds
to a ServletContext
.
For clients using Servlet 2.0 or 2.1, the context URI is "/", and the context path will be the filesystem directory containing the webserver root.
The UIX Components images and UIX Dynamic Image caches are being
installed on "d:\OA_MEDIA\", and at the URL "/media/". All other
properties default off of the default configuration supplied
by uix-config.xml
.
ApplicationConfiguration appConfig = ApplicationConfiguration.getInstance(servletContext); ConfigurationImpl config = new ConfigurationImpl("OAConfig", appConfig.getDefault()); config.putFullURIAndPath(config.IMAGES_DIRECTORY, "/media/", "d:\OA_MEDIA\"); config.register(servletContext);
The UIX Components JSPs will be installed alongside the rest of
the application. All other properties default off of the default
configuration supplied by uix-config.xml
:
ApplicationConfiguration appConfig = ApplicationConfiguration.getInstance(servletContext); ConfigurationImpl config = new ConfigurationImpl("OAConfig", appConfig.getDefault()); config.putRelativeURI(config.JSPS_DIRECTORY, ""); config.register(servletContext);
ConfigurationImpl
Field Summary | |
static java.lang.Object |
ACCESSIBILITY_MODE
This is the key to use to get at the current accessibility mode. |
static java.lang.Object |
BASE_DIRECTORY
Key for the base UIX directory. |
static java.lang.Object |
DISABLE_CONTENT_COMPRESSION
Disables optimizations that are normally performed by the UIX Renderers to reduce content size. |
static java.lang.Object |
HEADLESS
Key for enabled headless rendering. |
static java.lang.Object |
HELP_PROVIDER
Key for the HelpProvider property. |
static java.lang.Object |
IMAGE_SERVLET_URL
Key used to specify the URL location of the ImageServlet to use for image generation. |
static java.lang.Object |
IMAGE_TYPE_MANAGER
Key for the ImageTypeManager property. |
static java.lang.Object |
IMAGES_CACHE_DIRECTORY
Key for the UIX image cache directory. |
static java.lang.Object |
IMAGES_DIRECTORY
Key for the UIX images directory. |
static java.lang.Object |
JSLIBS_DIRECTORY
Key for the UIX jsLibs directory. |
static java.lang.Object |
JSPS_DIRECTORY
Key for the UIX JSP directory. |
static java.lang.Object |
LOOK_AND_FEEL
Key for the LookAndFeel property. |
static java.lang.Object |
LOOK_AND_FEEL_MANAGER
Key for the LookAndFeelManager property. |
static java.lang.Object |
RENDERER_MANAGER
Key for the RendererManager property. |
static java.lang.Object |
STYLE_SHEET_NAME
Key for the XSS style sheet name property. |
static java.lang.Object |
STYLES_CACHE_DIRECTORY
Key for the UIX styles cache directory. |
static java.lang.Object |
STYLES_DIRECTORY
Key for the UIX styles directory. |
static java.lang.Object |
TECATE_SERVLET_URL
Deprecated. Use IMAGE_SERVLET_URL |
static java.lang.Object |
TRANSLATION_LOCALE_MAPPER
Key for the Translation Locale Mapper property. |
static java.lang.Object |
USER_STYLE_SHEET
Key for the UserStyleSheetProperty. |
static java.lang.Object |
XML_PROVIDER
Key for the XMLProvider property. |
Constructor Summary | |
Configuration(java.lang.String name)
Create a Configuration with a name. |
Method Summary | |
static Configuration |
getConfiguration(javax.servlet.ServletContext context,
java.lang.String name)
Returns the configuration registered with the given name. |
static Configuration |
getConfiguration(java.lang.String name)
Deprecated. since 2.1.6; use getConfiguration(ServletContext, String) |
java.lang.String |
getName()
Return the name of this Configuration. |
abstract java.lang.String |
getPath(java.lang.Object key,
java.lang.String contextPath)
Return a path for a UIX directory. |
abstract java.lang.Object |
getProperty(java.lang.Object key)
Return a registered property. |
abstract java.lang.String |
getURI(java.lang.Object key,
java.lang.String contextURI)
Return a URI for a UIX directory. |
abstract boolean |
isDebug()
Returns whether the configuration is in debug mode. |
void |
register()
Deprecated. since 2.1.6; use register(ServletContext) |
void |
register(javax.servlet.ServletContext context)
Registers a Configuration within a web application. |
void |
unregister()
Unregisters a Configuration. |
void |
unregister(javax.servlet.ServletContext context)
Unregisters a Configuration. |
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.Object BASE_DIRECTORY
public static final java.lang.Object IMAGES_DIRECTORY
public static final java.lang.Object IMAGES_CACHE_DIRECTORY
public static final java.lang.Object STYLES_DIRECTORY
public static final java.lang.Object STYLES_CACHE_DIRECTORY
public static final java.lang.Object JSLIBS_DIRECTORY
public static final java.lang.Object JSPS_DIRECTORY
public static final java.lang.Object LOOK_AND_FEEL
LookAndFeel
public static final java.lang.Object LOOK_AND_FEEL_MANAGER
LookAndFeelManager
public static final java.lang.Object STYLE_SHEET_NAME
public static final java.lang.Object RENDERER_MANAGER
public static final java.lang.Object TRANSLATION_LOCALE_MAPPER
oracle.bali.share.nls.LocaleMapper
instance is set on
with this property, it should be used to determine the Locale to
be used for translations based on the Locale used for internationalization.public static final java.lang.Object XML_PROVIDER
public static final java.lang.Object HELP_PROVIDER
public static final java.lang.Object IMAGE_TYPE_MANAGER
public static final java.lang.Object HEADLESS
public static final java.lang.Object IMAGE_SERVLET_URL
public static final java.lang.Object TECATE_SERVLET_URL
public static final java.lang.Object USER_STYLE_SHEET
UserStyleSheet
,
StyleProvider
public static final java.lang.Object ACCESSIBILITY_MODE
AccessibilityMode
public static final java.lang.Object DISABLE_CONTENT_COMPRESSION
This Boolean property controls whether or not UIX Renderer implementations should attempt to reduce the size of generated content, for example, by compressing style class names. These optimizations are enabled by default. In general, clients should not need to disable these optimizations. However, clients that want to disable this functionality for testing or debugging purposes can do so by setting this property to Boolean.TRUE.
Constructor Detail |
public Configuration(java.lang.String name)
register()
method) before it is used.
register()
Method Detail |
public static Configuration getConfiguration(java.lang.String name)
public static Configuration getConfiguration(javax.servlet.ServletContext context, java.lang.String name)
public void register()
public void register(javax.servlet.ServletContext context)
public void unregister()
public void unregister(javax.servlet.ServletContext context)
public java.lang.String getName()
public abstract java.lang.String getURI(java.lang.Object key, java.lang.String contextURI)
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 abstract java.lang.String getPath(java.lang.Object key, java.lang.String contextPath)
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 abstract java.lang.Object getProperty(java.lang.Object key)
key
- the key used to identify the propertypublic abstract boolean isDebug()
|
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 |