Package org.opencms.repository
Class CmsRepository
- java.lang.Object
-
- org.opencms.repository.A_CmsRepository
-
- org.opencms.repository.CmsRepository
-
- All Implemented Interfaces:
I_CmsConfigurationParameterHandler
,I_CmsRepository
public class CmsRepository extends A_CmsRepository
Creates a repository session to access OpenCms.The configuration of the used
I_CmsResourceWrapper
is done here. This is the main class to get access to the resources in the VFS of OpenCms. The methodlogin(String, String)
logs in to OpenCms and returns aCmsRepositorySession
to use for basic file and folder operations.The project and the site to use for the access to OpenCms is read out of the user settings.
- Since:
- 6.5.6
- See Also:
CmsObjectWrapper
-
-
Field Summary
-
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
-
Constructor Summary
Constructors Constructor Description CmsRepository()
Empty default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initConfiguration()
Initializes a configuration after all parameters have been added.void
initializeCms(CmsObject cms)
Initializes this repository with an admin CMS object.I_CmsRepositorySession
login(java.lang.String userName, java.lang.String password)
Login a user given the username and the password.-
Methods inherited from class org.opencms.repository.A_CmsRepository
addConfigurationParameter, getConfiguration, getFilter, getName, getTranslation, isTranslationEnabled, setFilter, setName, setTranslation
-
-
-
-
Constructor Detail
-
CmsRepository
public CmsRepository()
Empty default constructor.
-
-
Method Detail
-
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
- Overrides:
initConfiguration
in classA_CmsRepository
- Throws:
CmsConfigurationException
- if something goes wrong- See Also:
A_CmsRepository.initConfiguration()
-
initializeCms
public void initializeCms(CmsObject cms)
Description copied from interface:I_CmsRepository
Initializes this repository with an admin CMS object.- Parameters:
cms
- an admin CMS object- See Also:
I_CmsRepository.initializeCms(org.opencms.file.CmsObject)
-
login
public I_CmsRepositorySession login(java.lang.String userName, java.lang.String password) throws CmsException
Description copied from class:A_CmsRepository
Login a user given the username and the password.- Specified by:
login
in classA_CmsRepository
- Parameters:
userName
- the user namepassword
- the user's password- Returns:
- the authenticated session
- Throws:
CmsException
- if the login was not succesful- See Also:
A_CmsRepository.login(java.lang.String, java.lang.String)
-
-