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

Abstract implementation of the repository interface I_CmsRepository.

Get a I_CmsRepositorySession through login in with the username and password (login(String, String)).

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

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.
 CmsParameterConfiguration getConfiguration()
          Returns the parameters of this configurable class instance, or null if the class does not need any parameters.
 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.
abstract  I_CmsRepositorySession login(java.lang.String userName, java.lang.String password)
          Login a user given the username and the password.
 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
initializeCms
 

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 CmsParameterConfiguration getConfiguration()
Description copied from interface: I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, or null if the class does not need any parameters.

Specified by:
getConfiguration in interface I_CmsConfigurationParameterHandler
Returns:
the parameters of this configurable class instance, or null if the class does not need any parameters
See Also:
I_CmsConfigurationParameterHandler.getConfiguration()

getFilter

public CmsRepositoryFilter getFilter()
Returns the filter.

Specified by:
getFilter in interface I_CmsRepository
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()

login

public abstract I_CmsRepositorySession login(java.lang.String userName,
                                             java.lang.String password)
                                      throws CmsException
Login a user given the username and the password.

Parameters:
userName - the user name
password - the user's password
Returns:
the authenticated session
Throws:
CmsException - if the login was not succesful

setFilter

public void setFilter(CmsRepositoryFilter filter)
Sets the filter.

Specified by:
setFilter in interface I_CmsRepository
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)