public class CmsRepository extends A_CmsRepository
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.
CmsObjectWrapper
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
构造器和说明 |
---|
CmsRepository()
Empty default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
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.
|
addConfigurationParameter, getConfiguration, getFilter, getName, setFilter, setName
public void initConfiguration() throws CmsConfigurationException
I_CmsConfigurationParameterHandler
initConfiguration
在接口中 I_CmsConfigurationParameterHandler
initConfiguration
在类中 A_CmsRepository
CmsConfigurationException
- if something goes wrongA_CmsRepository.initConfiguration()
public void initializeCms(CmsObject cms)
I_CmsRepository
cms
- an admin CMS objectI_CmsRepository.initializeCms(org.opencms.file.CmsObject)
public I_CmsRepositorySession login(java.lang.String userName, java.lang.String password) throws CmsException
A_CmsRepository
login
在类中 A_CmsRepository
userName
- the user namepassword
- the user's passwordCmsException
- if the login was not succesfulA_CmsRepository.login(java.lang.String, java.lang.String)