org.opencms.configuration
Interface I_CmsConfigurationParameterHandler

All Known Subinterfaces:
I_CmsDirectEditProvider, I_CmsPasswordHandler, I_CmsResourceLoader, I_CmsResourceType, I_CmsXmlConfiguration
All Known Implementing Classes:
A_CmsDirectEditProvider, A_CmsRepository, A_CmsResourceType, A_CmsXmlConfiguration, org.opencms.loader.A_CmsXmlDocumentLoader, CmsConfigurationManager, CmsDefaultPasswordHandler, CmsDirectEditDefaultProvider, CmsDirectEditJspIncludeProvider, CmsDumpLoader, CmsImportExportConfiguration, CmsJspLoader, CmsModuleConfiguration, CmsPointerLoader, CmsScheduledJobInfo, CmsSearchConfiguration, CmsSearchIndex, CmsSystemConfiguration, CmsVfsConfiguration, CmsWorkplaceConfiguration

public interface I_CmsConfigurationParameterHandler

Used for classes that are configurable using <param name="name">value</param> in the XML configuration.

Such "param" nodes can be used to add some arbitary names parameters to classes that otherwise share the same XML configuration.

Since:
6.0.0
Version:
$Revision: 1.11 $
Author:
Alexander Kandzior

Field Summary
static java.lang.String ADD_PARAMETER_METHOD
          The name of the addConfigurationParameter() method.
static java.lang.String INIT_CONFIGURATION_METHOD
          The name of the initConfiguration() method.
 
Method Summary
 void addConfigurationParameter(java.lang.String paramName, java.lang.String paramValue)
          Adds a configuration parameter to this parameter configurable class instance.
 java.util.Map getConfiguration()
          Returns the configuration of this parameter configurable class instance, or null if the class does not need to be configured.
 void initConfiguration()
          Initializes a configuration after all parameters have been added.
 

Field Detail

ADD_PARAMETER_METHOD

public static final java.lang.String ADD_PARAMETER_METHOD
The name of the addConfigurationParameter() method.

See Also:
Constant Field Values

INIT_CONFIGURATION_METHOD

public static final java.lang.String INIT_CONFIGURATION_METHOD
The name of the initConfiguration() method.

See Also:
Constant Field Values
Method Detail

addConfigurationParameter

public void addConfigurationParameter(java.lang.String paramName,
                                      java.lang.String paramValue)
Adds a configuration parameter to this parameter configurable class instance.

Parameters:
paramName - the name of the parameter
paramValue - the value for the parameter

getConfiguration

public java.util.Map getConfiguration()
Returns the configuration of this parameter configurable class instance, or null if the class does not need to be configured.

All elements in the configuration are key, value String pairs, set using the addConfigurationParameter(String, String) method during initialization of the loader.

Implementations will (should) not to return a direct reference to the internal configuration but just a copy of it, to avoid unwanted external manipulation.

Returns:
the configuration of this resource loader, or null

initConfiguration

public void initConfiguration()
                       throws CmsConfigurationException
Initializes a configuration after all parameters have been added.

Throws:
CmsConfigurationException - if something goes wrong