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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInitializes a configuration after all parameters have been added.voidinitializeCms(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_CmsConfigurationParameterHandlerInitializes a configuration after all parameters have been added.- Specified by:
initConfigurationin interfaceI_CmsConfigurationParameterHandler- Overrides:
initConfigurationin classA_CmsRepository- Throws:
CmsConfigurationException- if something goes wrong- See Also:
-
initializeCms
Description copied from interface:I_CmsRepositoryInitializes this repository with an admin CMS object.- Parameters:
cms- an admin CMS object- See Also:
-
login
Description copied from class:A_CmsRepositoryLogin a user given the username and the password.- Specified by:
loginin 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:
-