org.opencms.repository
Class A_CmsRepository

java.lang.Object
  extended by org.opencms.repository.A_CmsRepository
All Implemented Interfaces:
I_CmsConfigurationParameterHandler, I_CmsRepository
Direct Known Subclasses:
CmsRepository

public abstract class A_CmsRepository
extends java.lang.Object
implements I_CmsRepository, I_CmsConfigurationParameterHandler

Abstract implementation of the repository interface I_CmsRepository.

Handles the functionality of basic configuration. This is actually the configuration of param/values and the filters (CmsRepositoryFilter) to use of the repository.

Since:
6.2.4
Version:
$Revision: 1.7 $
Author:
Peter Bonrad

Field Summary
 
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
 
Constructor Summary
A_CmsRepository()
          Default constructor initializing member variables.
 
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.
 CmsRepositoryFilter getFilter()
          Returns the filter.
 java.lang.String getName()
          Returns the name of the repository.
 void initConfiguration()
          Initializes a configuration after all parameters have been added.
 void setFilter(CmsRepositoryFilter filter)
          Sets the filter.
 void setName(java.lang.String name)
          Sets the name for this repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opencms.repository.I_CmsRepository
login
 

Constructor Detail

A_CmsRepository

public A_CmsRepository()
Default constructor initializing member variables.

Method Detail

addConfigurationParameter

public void addConfigurationParameter(java.lang.String paramName,
                                      java.lang.String paramValue)
Description copied from interface: I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.

Specified by:
addConfigurationParameter in interface I_CmsConfigurationParameterHandler
Parameters:
paramName - the name of the parameter
paramValue - the value for the parameter
See Also:
I_CmsConfigurationParameterHandler.addConfigurationParameter(java.lang.String, java.lang.String)

getConfiguration

public java.util.Map getConfiguration()
Description copied from interface: I_CmsConfigurationParameterHandler
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 I_CmsConfigurationParameterHandler.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.

Specified by:
getConfiguration in interface I_CmsConfigurationParameterHandler
Returns:
the configuration of this resource loader, or null
See Also:
I_CmsConfigurationParameterHandler.getConfiguration()

getFilter

public CmsRepositoryFilter getFilter()
Returns the filter.

Returns:
the filter

getName

public java.lang.String getName()
Description copied from interface: I_CmsRepository
Returns the name of the repository.

Specified by:
getName in interface I_CmsRepository
Returns:
the name of the repository
See Also:
I_CmsRepository.getName()

initConfiguration

public void initConfiguration()
                       throws CmsConfigurationException
Description copied from interface: I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.

Specified by:
initConfiguration in interface I_CmsConfigurationParameterHandler
Throws:
CmsConfigurationException - if something goes wrong
See Also:
I_CmsConfigurationParameterHandler.initConfiguration()

setFilter

public void setFilter(CmsRepositoryFilter filter)
Sets the filter.

Parameters:
filter - the filter to set

setName

public void setName(java.lang.String name)
Description copied from interface: I_CmsRepository
Sets the name for this repository.

Specified by:
setName in interface I_CmsRepository
Parameters:
name - the name to use for the repository
See Also:
I_CmsRepository.setName(String)