org.opencms.repository
Class CmsRepository

java.lang.Object
  extended by org.opencms.repository.A_CmsRepository
      extended by 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 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
Version:
$Revision: 1.9 $
Author:
Peter Bonrad
See Also:
CmsObjectWrapper

Field Summary
 
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
 
Constructor Summary
CmsRepository()
          Empty default constructor.
 
Method Summary
 void initConfiguration()
          Initializes a configuration after all parameters have been added.
 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, setFilter, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface I_CmsConfigurationParameterHandler
Overrides:
initConfiguration in class A_CmsRepository
Throws:
CmsConfigurationException - if something goes wrong
See Also:
A_CmsRepository.initConfiguration()

login

public I_CmsRepositorySession login(java.lang.String userName,
                                    java.lang.String password)
                             throws CmsException
Description copied from interface: I_CmsRepository
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
See Also:
I_CmsRepository.login(java.lang.String, java.lang.String)