Interface I_CmsCoreServiceAsync


public interface I_CmsCoreServiceAsync
Provides general core services.

Since:
8.0.0
See Also:
  • 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 password
      newPassword - the value entered for the new password
      newPasswordConfirm - the value entered for the confirmation of the new password
      callback - the callback for the result
    • createUUID

      void createUUID(com.google.gwt.user.client.rpc.AsyncCallback<CmsUUID> callback)
      Creates a new UUID.

      Parameters:
      callback - the async callback
    • getBroadcast

      void getBroadcast(com.google.gwt.user.client.rpc.AsyncCallback<List<CmsBroadcastMessage>> callback)
      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 be null or empty to use the root
      includeSubCats - if to include all categories, or first level child categories only
      refVfsPath - the reference path (site-relative path according to which the available category repositories are determined), can be null to only use the system repository
      withRepositories - flag, indicating if also the category repositories should be returned as category
      selected - 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-path
      callback - 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 id
      callback - the callback which receives the result
    • getContextMenuEntries

      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.

      Parameters:
      structureId - the structure id of the resource for which to get the context menu
      context - the ade context (sitemap or containerpage)
      callback - the asynchronous callback
    • getContextMenuEntries

      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.

      Parameters:
      structureId - the structure id of the resource for which to get the context menu
      context - the ade context (sitemap or containerpage)
      params - additional context information that the server side can use to decide menu item availability
      callback - the asynchronous callback
    • 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 code
      callback - 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 resource
      callback - 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 file
      baseName - the proposed file name
      callback - the callback which receives the result
    • getUserInfo

      void getUserInfo(com.google.gwt.user.client.rpc.AsyncCallback<CmsCoreData.UserInfo> callback)
      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 workplace
      callback - 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 path
      action - the callback for the result
    • loadUserSettings

      void loadUserSettings(com.google.gwt.user.client.rpc.AsyncCallback<CmsUserSettingsBean> callback)
      Loads the user settings for the current user.

      Parameters:
      callback - the callback to call with the result
    • lockIfExists

      void lockIfExists(String sitePath, 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 lock
      callback - 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 lock
      loadTime - the time when the requested resource was loaded
      callback - the async callback
    • lockTemp

      void lockTemp(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<String> callback)
      Locks the given resource with a temporary lock.

      Parameters:
      structureId - the resource structure id
      callback - 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 id
      loadTime - the time when the requested resource was loaded
      callback - the async callback
    • prefetch

      void prefetch(com.google.gwt.user.client.rpc.AsyncCallback<CmsCoreData> callback)
      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 settings
      edited - the keys of the user settings which were actually edited
      resultCallback - 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 id
      categories - the categories to set
      callback - 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 flag
      callback - 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 visible
      callback - 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 id
      callback - 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 path
      callback - 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 queries
      callback - 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 validator
      validationQueries - a map from field names to validation queries
      values - the map of all field values
      config - the form validator configuration string
      callback - the asynchronous callback