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
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 method login(String, String)
logs in to OpenCms
and returns a CmsRepositorySession
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:
-
Field Summary
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Initializes a configuration after all parameters have been added.void
initializeCms
(CmsObject cms) Initializes this repository with an admin CMS object.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 Details
-
CmsRepository
public CmsRepository()Empty default constructor.
-
-
Method Details
-
initConfiguration
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:
-
initializeCms
Description copied from interface:I_CmsRepository
Initializes this repository with an admin CMS object.- Parameters:
cms
- an admin CMS object- See Also:
-
login
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:
-