Package org.opencms.gwt.shared.rpc
Interface I_CmsCoreService
- All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
- All Known Implementing Classes:
CmsCoreService
Provides general core services.
- Since:
- 8.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionchangePassword
(String oldPassword, String newPassword, String newPasswordConfirm) Changes the password of the current user.Creates a new UUID.Returns the latest messages for the current user.getCategories
(String fromCatPath, boolean includeSubCats, String refVfsPath, boolean withRepositories, Set<String> selected) Returns the categories for the given search parameters.getCategoriesForSitePath
(String sitePath) Returns the categories for the given reference site-path.getCategoryInfo
(CmsUUID structureId) Returns the category information for the given resource.getContextMenuEntries
(CmsUUID structureId, CmsCoreData.AdeContext context) Returns the context menu entries for the given URI.getContextMenuEntries
(CmsUUID structureId, CmsCoreData.AdeContext context, Map<String, String> params) Returns the context menu entries for the given URI.getLinkForReturnCode
(String returnCode) Given a return code, returns the link to the page which corresponds to the return code.getResourceState
(CmsUUID structureId) Gets the resource state for a resource with a given path.getUniqueFileName
(String parentFolder, String baseName) Returns a unique filename for the given base name and the parent folder.Returns the user info.getWorkplaceLink
(CmsUUID structureId) Returns a link for the OpenCms workplace that will reload the whole workplace, switch to the explorer view, the site of the given explorerRootPath and show the folder given in the explorerRootPath.Gets the workplace link for the given path.Loads the user settings for the current user.lockIfExists
(String sitePath) Locks the given resource with a temporary lock if it exists.lockIfExists
(String sitePath, long loadTime) Locks the given resource with a temporary lock if it exists.Locks the given resource with a temporary lock.Locks the given resource with a temporary lock.prefetch()
Generates core data for prefetching in the host page.void
Saves the user settings for the current user.void
setResourceCategories
(CmsUUID structureId, List<String> categories) Sets the categories of the given resource.void
setShowEditorHelp
(boolean showHelp) Sets the show editor help flag.void
setToolbarVisible
(boolean visible) Writes the tool-bar visibility into the session cache.Unlocks the given resource.Unlocks the given resource.validate
(String formValidatorClass, Map<String, CmsValidationQuery> validationQueries, Map<String, String> values, String config) Performs a batch of validations using a custom form validator class.validate
(Map<String, CmsValidationQuery> validationQueries) Performs a batch of validations and returns the results.
-
Method Details
-
changePassword
String changePassword(String oldPassword, String newPassword, String newPasswordConfirm) throws CmsRpcException Changes the password of the current user.- Parameters:
oldPassword
- the old passwordnewPassword
- the value entered for the new passwordnewPasswordConfirm
- the value entered for the confirmation of the new password- Returns:
- an error message if an error occurred, or null if the password was successfully changed
- Throws:
CmsRpcException
- if something goes wrong
-
createUUID
Creates a new UUID.- Returns:
- the created UUID
- Throws:
CmsRpcException
- if something goes wrong
-
getBroadcast
Returns the latest messages for the current user.- Returns:
- the messages
- Throws:
CmsRpcException
- if anything goes wrong
-
getCategories
List<CmsCategoryTreeEntry> getCategories(String fromCatPath, boolean includeSubCats, String refVfsPath, boolean withRepositories, Set<String> selected) throws CmsRpcException Returns the categories for the given search parameters.- Parameters:
fromCatPath
- the category path to start with, can benull
or empty to use the rootincludeSubCats
- if to include all categories, or first level child categories onlyrefVfsPath
- the reference path (site-relative path according to which the available category repositories are determined), can benull
to only use the system repositorywithRepositories
- flag, indicating if also the category repositories should be returned as categoryselected
- a set of paths of currently selected categories (which should be included in the result even if they are marked as hidden)- Returns:
- the resource categories
- Throws:
CmsRpcException
- if something goes wrong
-
getCategoriesForSitePath
Returns the categories for the given reference site-path.- Parameters:
sitePath
- the reference site-path- Returns:
- the categories for the given reference site-path
- Throws:
CmsRpcException
- if something goes wrong
-
getCategoryInfo
Returns the category information for the given resource.- Parameters:
structureId
- the resource structure id- Returns:
- the category information
- Throws:
CmsRpcException
- if something goes wrong
-
getLinkForReturnCode
Given a return code, returns the link to the page which corresponds to the return code.- Parameters:
returnCode
- the return code- Returns:
- the link for the return code
- Throws:
CmsRpcException
- if something goes wrong
-
getResourceState
Gets the resource state for a resource with a given path.- Parameters:
structureId
- the resource structure id- Returns:
- the resource state of the resource
- Throws:
CmsRpcException
- if something goes wrong
-
getUniqueFileName
Returns a unique filename for the given base name and the parent folder.- Parameters:
parentFolder
- the parent folder of the filebaseName
- the proposed file name- Returns:
- the unique file name
- Throws:
CmsRpcException
- if something goes wrong
-
getUserInfo
Returns the user info.- Returns:
- the user info
- Throws:
CmsRpcException
- in case something goes wrong
-
getWorkplaceLink
Returns a link for the OpenCms workplace that will reload the whole workplace, switch to the explorer view, the site of the given explorerRootPath and show the folder given in the explorerRootPath.- Parameters:
structureId
- the structure id of the resource for which to open the workplace- Returns:
- a link for the OpenCms workplace that will reload the whole workplace, switch to the explorer view, the site of the given explorerRootPath and show the folder given in the explorerRootPath.
- Throws:
CmsRpcException
- if something goes wrong
-
getWorkplaceLinkForPath
Gets the workplace link for the given path.- Parameters:
path
- the path- Returns:
- the workplace link for the path
- Throws:
CmsRpcException
- if something goes wrong
-
loadUserSettings
Loads the user settings for the current user.- Returns:
- the user settings for the current user
- Throws:
CmsRpcException
- if something goes wrong
-
lockIfExists
Locks the given resource with a temporary lock if it exists.If the resource does not exist yet, the closest existing ancestor folder will check if it is lockable.
- Parameters:
sitePath
- the site path of the resource to lock- Returns:
null
if successful, an error message if not- Throws:
CmsRpcException
- if something goes wrong
-
lockIfExists
Locks the given resource with a temporary lock if it exists.If the resource does not exist yet, the closest existing ancestor folder will check if it is lockable.
- Parameters:
sitePath
- the site path of the resource to lockloadTime
- the time when the requested resource was loaded- Returns:
null
if successful, an error message if not- Throws:
CmsRpcException
- if something goes wrong
-
lockTemp
Locks the given resource with a temporary lock.- Parameters:
structureId
- the structure id of the resource to lock- Returns:
null
if successful, an error message if not- Throws:
CmsRpcException
- if something goes wrong
-
lockTemp
Locks the given resource with a temporary lock.Locking will fail in case the requested resource has been changed since the given load time.
- Parameters:
structureId
- the resource structure idloadTime
- the time when the requested resource was loaded- Returns:
null
if successful, an error message if not- Throws:
CmsRpcException
- if something goes wrong
-
prefetch
Generates core data for prefetching in the host page.- Returns:
- the core data
- Throws:
CmsRpcException
- if something goes wrong
-
saveUserSettings
Saves the user settings for the current user.- Parameters:
userSettings
- the new values for the user settingsedited
- the keys of the user settings which were actually edited- Throws:
CmsRpcException
- if something goes wrong
-
setResourceCategories
Sets the categories of the given resource. Will remove all other categories.- Parameters:
structureId
- the resource structure idcategories
- the categories to set- Throws:
CmsRpcException
- if something goes wrong
-
setShowEditorHelp
Sets the show editor help flag.- Parameters:
showHelp
- the show help flag- Throws:
CmsRpcException
- if something goes wrong
-
setToolbarVisible
Writes the tool-bar visibility into the session cache.- Parameters:
visible
-true
if the tool-bar is visible- Throws:
CmsRpcException
- if something goes wrong
-
unlock
Unlocks the given resource.- Parameters:
structureId
- the structure id of the resource to unlock- Returns:
null
if successful, an error message if not- Throws:
CmsRpcException
- if something goes wrong
-
unlock
Unlocks the given resource.- Parameters:
rootPath
- the root path of the resource to unlock- Returns:
null
if successful, an error message if not- Throws:
CmsRpcException
- if something goes wrong
-
validate
Map<String,CmsValidationResult> validate(Map<String, CmsValidationQuery> validationQueries) throws CmsRpcExceptionPerforms a batch of validations and returns the results.- Parameters:
validationQueries
- a map from field names to validation queries- Returns:
- a map from field names to validation results
- Throws:
CmsRpcException
- if something goes wrong
-
validate
Map<String,CmsValidationResult> validate(String formValidatorClass, Map<String, CmsValidationQuery> validationQueries, Map<String, throws CmsRpcExceptionString> values, String config) Performs a batch of validations using a custom form validator class.- Parameters:
formValidatorClass
- the class name of the form validatorvalidationQueries
- a map from field names to validation queriesvalues
- the map of all field valuesconfig
- the form validator configuration string- Returns:
- a map from field names to validation results
- Throws:
CmsRpcException
- if the RPC call goes wrong
-