Package org.opencms.repository
Class A_CmsRepository
- java.lang.Object
-
- 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 interfaceI_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
Constructors Constructor Description A_CmsRepository()
Default constructor initializing member variables.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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, ornull
if the class does not need any parameters.CmsRepositoryFilter
getFilter()
Returns the filter.java.lang.String
getName()
Returns the name of the repository.CmsResourceTranslator
getTranslation()
Gets the repository-specific file translations.void
initConfiguration()
Initializes a configuration after all parameters have been added.boolean
isTranslationEnabled()
Returns true if the repository specific file translations are enabled (they may also be set without being enabled).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.void
setTranslation(CmsResourceTranslator translator, boolean enabled)
Sets the repository-specific file translations-
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 interfaceI_CmsConfigurationParameterHandler
- Parameters:
paramName
- the name of the parameterparamValue
- 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, ornull
if the class does not need any parameters.- Specified by:
getConfiguration
in interfaceI_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 interfaceI_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 interfaceI_CmsRepository
- Returns:
- the name of the repository
- See Also:
I_CmsRepository.getName()
-
getTranslation
public CmsResourceTranslator getTranslation()
Description copied from interface:I_CmsRepository
Gets the repository-specific file translations.- Specified by:
getTranslation
in interfaceI_CmsRepository
- Returns:
- the repository-specific file translations
- See Also:
I_CmsRepository.getTranslation()
-
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 interfaceI_CmsConfigurationParameterHandler
- Throws:
CmsConfigurationException
- if something goes wrong- See Also:
I_CmsConfigurationParameterHandler.initConfiguration()
-
isTranslationEnabled
public boolean isTranslationEnabled()
Description copied from interface:I_CmsRepository
Returns true if the repository specific file translations are enabled (they may also be set without being enabled).- Specified by:
isTranslationEnabled
in interfaceI_CmsRepository
- Returns:
- true if the file translations are enabled
- See Also:
I_CmsRepository.isTranslationEnabled()
-
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 namepassword
- 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 interfaceI_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 interfaceI_CmsRepository
- Parameters:
name
- the name to use for the repository- See Also:
I_CmsRepository.setName(String)
-
setTranslation
public void setTranslation(CmsResourceTranslator translator, boolean enabled)
Description copied from interface:I_CmsRepository
Sets the repository-specific file translations- Specified by:
setTranslation
in interfaceI_CmsRepository
- Parameters:
translator
- the file translationsenabled
- true if the translations should be enabled- See Also:
I_CmsRepository.setTranslation(org.opencms.util.CmsResourceTranslator, boolean)
-
-