Package org.opencms.gwt.shared.rpc
Interface I_CmsCoreServiceAsync
public interface I_CmsCoreServiceAsync
Provides general core services.
- Since:
- 8.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changePassword
(String oldPassword, String newPassword, String newPasswordConfirm, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Changes the password of the current user.void
createUUID
(com.google.gwt.user.client.rpc.AsyncCallback<CmsUUID> callback) Creates a new UUID.void
getBroadcast
(com.google.gwt.user.client.rpc.AsyncCallback<List<CmsBroadcastMessage>> callback) Returns the latest messages for the current user.void
getCategories
(String fromCatPath, boolean includeSubCats, String refVfsPath, boolean withRepositories, Set<String> selected, com.google.gwt.user.client.rpc.AsyncCallback<List<CmsCategoryTreeEntry>> callback) Returns the categories for the given search parameters.void
getCategoriesForSitePath
(String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<List<CmsCategoryTreeEntry>> callback) Returns the categories for the given reference site-path.void
getCategoryInfo
(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceCategoryInfo> callback) Returns the category information for the given resource.void
getContextMenuEntries
(CmsUUID structureId, CmsCoreData.AdeContext context, com.google.gwt.user.client.rpc.AsyncCallback<List<CmsContextMenuEntryBean>> callback) Returns a list of menu entry beans for the context menu.void
getContextMenuEntries
(CmsUUID structureId, CmsCoreData.AdeContext context, Map<String, String> params, com.google.gwt.user.client.rpc.AsyncCallback<List<CmsContextMenuEntryBean>> callback) Returns a list of menu entry beans for the context menu.void
getLinkForReturnCode
(String returnCode, com.google.gwt.user.client.rpc.AsyncCallback<CmsReturnLinkInfo> callback) Given a return code, returns the link to the page which corresponds to the return code.void
getResourceState
(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceState> callback) Gets the resource state of a resource.void
getUniqueFileName
(String parentFolder, String baseName, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Returns a unique filename for the given base name and the parent folder.void
getUserInfo
(com.google.gwt.user.client.rpc.AsyncCallback<CmsCoreData.UserInfo> callback) Returns the user info.void
getWorkplaceLink
(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) 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.void
getWorkplaceLinkForPath
(String path, com.google.gwt.user.client.rpc.AsyncCallback<String> action) Gets the workplace link for the given path.void
loadUserSettings
(com.google.gwt.user.client.rpc.AsyncCallback<CmsUserSettingsBean> callback) Loads the user settings for the current user.void
lockIfExists
(String sitePath, long loadTime, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Locks the given resource with a temporary lock if it exists.void
lockIfExists
(String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Locks the given resource with a temporary lock if it exists.void
lockTemp
(CmsUUID structureId, long loadTime, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Locks the given resource with a temporary lock.void
Locks the given resource with a temporary lock.void
prefetch
(com.google.gwt.user.client.rpc.AsyncCallback<CmsCoreData> callback) Generates core data for prefetching in the host page.void
saveUserSettings
(Map<String, String> userSettings, Set<String> edited, com.google.gwt.user.client.rpc.AsyncCallback<Void> resultCallback) Saves the user settings for the current user.void
setResourceCategories
(CmsUUID structureId, List<String> categories, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Sets the categories of the given resource.void
setShowEditorHelp
(boolean showHelp, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Sets the show editor help flag.void
setToolbarVisible
(boolean visible, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Writes the tool-bar visibility into the session cache.void
Unlocks the given resource.void
Unlocks the given resource.void
validate
(String formValidatorClass, Map<String, CmsValidationQuery> validationQueries, Map<String, String> values, String config, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, CmsValidationResult>> callback) Performs a batch of validations using a custom form validator class.void
validate
(Map<String, CmsValidationQuery> validationQueries, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, CmsValidationResult>> callback) Performs a batch of validations and returns the results.
-
Method Details
-
changePassword
void changePassword(String oldPassword, String newPassword, String newPasswordConfirm, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) 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 passwordcallback
- the callback for the result
-
createUUID
Creates a new UUID.- Parameters:
callback
- the async callback
-
getBroadcast
Returns the latest messages for the current user.- Parameters:
callback
- the async callback
-
getCategories
void getCategories(String fromCatPath, boolean includeSubCats, String refVfsPath, boolean withRepositories, Set<String> selected, com.google.gwt.user.client.rpc.AsyncCallback<List<CmsCategoryTreeEntry>> callback) 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)callback
- the async callback
-
getCategoriesForSitePath
void getCategoriesForSitePath(String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<List<CmsCategoryTreeEntry>> callback) Returns the categories for the given reference site-path.- Parameters:
sitePath
- the reference site-pathcallback
- the async callback
-
getCategoryInfo
void getCategoryInfo(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceCategoryInfo> callback) Returns the category information for the given resource.- Parameters:
structureId
- the resource structure idcallback
- the callback which receives the result
-
getLinkForReturnCode
void getLinkForReturnCode(String returnCode, com.google.gwt.user.client.rpc.AsyncCallback<CmsReturnLinkInfo> callback) Given a return code, returns the link to the page which corresponds to the return code.- Parameters:
returnCode
- the return codecallback
- the asynchronous callback
-
getResourceState
void getResourceState(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceState> callback) Gets the resource state of a resource.- Parameters:
structureId
- the structure id of the resourcecallback
- the callback which receives the result
-
getUniqueFileName
void getUniqueFileName(String parentFolder, String baseName, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Returns a unique filename for the given base name and the parent folder.This is executed in a synchronized request.
- Parameters:
parentFolder
- the parent folder of the filebaseName
- the proposed file namecallback
- the callback which receives the result
-
getUserInfo
Returns the user info.- Parameters:
callback
- the callback
-
getWorkplaceLink
void getWorkplaceLink(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) 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 workplacecallback
- the callback which receives the result
-
getWorkplaceLinkForPath
void getWorkplaceLinkForPath(String path, com.google.gwt.user.client.rpc.AsyncCallback<String> action) Gets the workplace link for the given path.- Parameters:
path
- the pathaction
- the callback for the result
-
loadUserSettings
Loads the user settings for the current user.- Parameters:
callback
- the callback to call with the result
-
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 lockcallback
- the async callback
-
lockIfExists
void lockIfExists(String sitePath, long loadTime, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) 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 loadedcallback
- the async callback
-
lockTemp
Locks the given resource with a temporary lock.- Parameters:
structureId
- the resource structure idcallback
- the async callback
-
lockTemp
void lockTemp(CmsUUID structureId, long loadTime, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) 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 loadedcallback
- the async callback
-
prefetch
Generates core data for prefetching in the host page.- Parameters:
callback
- the async callback
-
saveUserSettings
void saveUserSettings(Map<String, String> userSettings, Set<String> edited, com.google.gwt.user.client.rpc.AsyncCallback<Void> resultCallback) 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 editedresultCallback
- the callback to call when the operation has finished
-
setResourceCategories
void setResourceCategories(CmsUUID structureId, List<String> categories, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Sets the categories of the given resource. Will remove all other categories.- Parameters:
structureId
- the resource structure idcategories
- the categories to setcallback
- the callback which receives the result
-
setShowEditorHelp
void setShowEditorHelp(boolean showHelp, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Sets the show editor help flag.- Parameters:
showHelp
- the show help flagcallback
- the asynchronous callback
-
setToolbarVisible
void setToolbarVisible(boolean visible, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Writes the tool-bar visibility into the session cache.- Parameters:
visible
-true
if the tool-bar is visiblecallback
- the call-back executed on response
-
unlock
@SynchronizedRpcRequest void unlock(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Unlocks the given resource.- Parameters:
structureId
- the resource structure idcallback
- the async callback
-
unlock
@SynchronizedRpcRequest void unlock(String rootPath, com.google.gwt.user.client.rpc.AsyncCallback<String> callback) Unlocks the given resource.- Parameters:
rootPath
- the resource root pathcallback
- the async callback
-
validate
void validate(Map<String, CmsValidationQuery> validationQueries, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, CmsValidationResult>> callback) Performs a batch of validations and returns the results.- Parameters:
validationQueries
- a map from field names to validation queriescallback
- the asynchronous callback
-
validate
void validate(String formValidatorClass, Map<String, CmsValidationQuery> validationQueries, Map<String, String> values, String config, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, CmsValidationResult>> callback) 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 stringcallback
- the asynchronous callback
-