org.apache.myfaces.trinidadinternal.share.config
Class ConfigurationImpl

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.share.config.Configuration
      extended by org.apache.myfaces.trinidadinternal.share.config.ConfigurationImpl
Direct Known Subclasses:
ContextBasedConfiguration

public class ConfigurationImpl
extends Configuration

ConfigurationImpl is the default implementation of Configuration. See that interface's documentation for information on the configuration architecture.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/share/config/ConfigurationImpl.java#0 $) $Date: 10-nov-2005.19:00:19 $
Author:
The Oracle ADF Faces Team

Field Summary
 
Fields inherited from class org.apache.myfaces.trinidadinternal.share.config.Configuration
BASE_DIRECTORY, DISABLE_CONTENT_COMPRESSION, DISABLE_STANDARDS_MODE, HEADLESS, IMAGE_SERVLET_URL, IMAGES_CACHE_DIRECTORY, IMAGES_DIRECTORY, JSLIBS_DIRECTORY, JSPS_DIRECTORY, LOOK_AND_FEEL_MANAGER, RENDERER_MANAGER, SKIN_FAMILY, STYLE_SHEET_NAME, STYLES_CACHE_DIRECTORY, STYLES_DIRECTORY, TECATE_SERVLET_URL, USER_STYLE_SHEET, XML_PROVIDER
 
Constructor Summary
ConfigurationImpl(java.lang.String name)
          Creates a default ConfigurationImpl.
ConfigurationImpl(java.lang.String name, ConfigurationImpl base)
          Creates a default ConfigurationImpl.
 
Method Summary
 java.lang.String getPath(java.lang.Object key, java.lang.String contextPath)
          Return a path for a UIX 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 UIX directory.
 boolean isDebug()
          Returns whether the configuration is in debug mode.
 void putFullURIAndPath(java.lang.Object key, java.lang.String uri, java.lang.String path)
          Register a full URI and path.
 void putProperty(java.lang.Object key, java.lang.Object value)
          Register a propery.
 void putRelativeURI(java.lang.Object key, java.lang.String uri)
          Register a context-relative URI .
 void setDebug(boolean debug)
          Returns whether the configuration is in debug mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationImpl

public ConfigurationImpl(java.lang.String name)
Creates a default ConfigurationImpl. The configuration must be registered (with register()) before being used.


ConfigurationImpl

public ConfigurationImpl(java.lang.String name,
                         ConfigurationImpl base)
Creates a default ConfigurationImpl. The configuration must be registered (with register()) before being used.

Method Detail

isDebug

public boolean isDebug()
Returns whether the configuration is in debug mode.

Specified by:
isDebug in class Configuration

setDebug

public void setDebug(boolean debug)
Returns whether the configuration is in debug mode.


getURI

public java.lang.String getURI(java.lang.Object key,
                               java.lang.String contextURI)
Return a URI for a UIX directory.

Specified by:
getURI in class Configuration
Parameters:
key - the key used to identify the directory
contextURI - 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 ("/").
Returns:
a URI, which will always be terminated with a separator
Throws:
DirectoryUnavailableException - if the directory is unavailable

getPath

public java.lang.String getPath(java.lang.Object key,
                                java.lang.String contextPath)
Return a path for a UIX directory.

Specified by:
getPath in class Configuration
Parameters:
key - the key used to identify the directory
contextPath - the current context path; this will be preprended to the returned path if this directory is registered as (or defaulting to) context-relative.
Returns:
a full file system path, which will always be terminated with the appropriate separator for the file system
Throws:
DirectoryUnavailableException - if the directory is unavailable

getProperty

public java.lang.Object getProperty(java.lang.Object key)
Return a registered property.

Specified by:
getProperty in class Configuration
Parameters:
key - the key used to identify the property
Returns:
the registered object, or null if no object was registered.

putFullURIAndPath

public void putFullURIAndPath(java.lang.Object key,
                              java.lang.String uri,
                              java.lang.String path)
Register a full URI and path.

Parameters:
key - the key used to identify the directory
uri - the full URI pointing to the desired location
path - the full path corresponding to the given URI on the webserver.

putRelativeURI

public void putRelativeURI(java.lang.Object key,
                           java.lang.String uri)
Register a context-relative URI .

Parameters:
key - the key used to identify the directory
uri - a URI pointing to the desired location, relative to the root of a web application

putProperty

public void putProperty(java.lang.Object key,
                        java.lang.Object value)
Register a propery. DO NOT use this method to set up paths for UIX resources. Paths must be set using putRelativeURI() and putFullURIAndPath()

Parameters:
key - the key used to identify the directory
value - the registered value
See Also:
putRelativeURI(java.lang.Object, java.lang.String), putFullURIAndPath(java.lang.Object, java.lang.String, java.lang.String)


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.