org.apache.fulcrum.yaafi.framework.configuration
Class ComponentConfigurationPropertiesResolverBaseImpl

java.lang.Object
  extended by org.apache.fulcrum.yaafi.framework.configuration.ComponentConfigurationPropertiesResolverBaseImpl
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, ComponentConfigurationPropertiesResolver
Direct Known Subclasses:
ComponentConfigurationPropertiesResolverImpl

public abstract class ComponentConfigurationPropertiesResolverBaseImpl
extends java.lang.Object
implements ComponentConfigurationPropertiesResolver, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Configurable

Base class to expand the value and all attributes. This class is intentend to be sub-classed if you hook up your own configuration mechanism.

Author:
Siegfried Goeschl

Field Summary
 
Fields inherited from interface org.apache.fulcrum.yaafi.framework.configuration.ComponentConfigurationPropertiesResolver
COMPONENT_CONFIG_PROPERTIES_VALUE
 
Constructor Summary
ComponentConfigurationPropertiesResolverBaseImpl()
           
 
Method Summary
protected  void addAvalonContext(java.util.Properties properties)
          Add the Avalon context variables.
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 void contextualize(org.apache.avalon.framework.context.Context context)
           
protected  java.io.InputStream createInputStream(java.lang.String location)
          Creates an InputStream using a Locator.
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
           
protected  java.io.File getApplicationRootDir()
           
protected  org.apache.avalon.framework.configuration.Configuration getConfiguration()
           
protected  org.apache.avalon.framework.context.Context getContext()
           
protected  java.lang.String getLocation()
           
protected  org.apache.avalon.framework.logger.Logger getLogger()
           
protected  java.util.Properties loadProperties(java.lang.String location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.fulcrum.yaafi.framework.configuration.ComponentConfigurationPropertiesResolver
resolve
 

Constructor Detail

ComponentConfigurationPropertiesResolverBaseImpl

public ComponentConfigurationPropertiesResolverBaseImpl()
Method Detail

enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Throws:
org.apache.avalon.framework.context.ContextException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

getLogger

protected org.apache.avalon.framework.logger.Logger getLogger()
Returns:
Returns the logger.

getContext

protected org.apache.avalon.framework.context.Context getContext()
Returns:
Returns the context.

getApplicationRootDir

protected java.io.File getApplicationRootDir()
Returns:
the home directory of the application

getConfiguration

protected org.apache.avalon.framework.configuration.Configuration getConfiguration()
Returns:
Returns the configuration.

getLocation

protected java.lang.String getLocation()
Returns:
Returns the componentConfigurationPropertiesLocation.

createInputStream

protected java.io.InputStream createInputStream(java.lang.String location)
                                         throws java.io.IOException
Creates an InputStream using a Locator.

Returns:
the InputStrem or null if the resource was not found
Throws:
java.io.IOException

addAvalonContext

protected void addAvalonContext(java.util.Properties properties)
                         throws org.apache.avalon.framework.context.ContextException
Add the Avalon context variables.

Throws:
org.apache.avalon.framework.context.ContextException

loadProperties

protected java.util.Properties loadProperties(java.lang.String location)
                                       throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.