Interface I_CmsCoreService

    • Method Detail

      • changePassword

        java.lang.String changePassword​(java.lang.String oldPassword,
                                        java.lang.String newPassword,
                                        java.lang.String newPasswordConfirm)
                                 throws CmsRpcException
        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
        Returns:
        an error message if an error occurred, or null if the password was successfully changed
        Throws:
        CmsRpcException - if something goes wrong
      • getCategories

        java.util.List<CmsCategoryTreeEntrygetCategories​(java.lang.String fromCatPath,
                                                           boolean includeSubCats,
                                                           java.lang.String refVfsPath)
                                                    throws CmsRpcException
        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
        Returns:
        the resource categories
        Throws:
        CmsRpcException - if something goes wrong
      • getCategories

        java.util.List<CmsCategoryTreeEntrygetCategories​(java.lang.String fromCatPath,
                                                           boolean includeSubCats,
                                                           java.lang.String refVfsPath,
                                                           boolean withRepositories)
                                                    throws CmsRpcException
        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
        Returns:
        the resource categories
        Throws:
        CmsRpcException - if something goes wrong
      • getContextMenuEntries

        java.util.List<CmsContextMenuEntryBeangetContextMenuEntries​(CmsUUID structureId,
                                                                      CmsCoreData.AdeContext context,
                                                                      java.util.Map<java.lang.String,​java.lang.String> params)
                                                               throws CmsRpcException
        Returns the context menu entries for the given URI.

        Parameters:
        structureId - the currently requested structure id
        context - the ade context (sitemap or containerpage)
        params - additional context information the server side can use to determine menu item availability
        Returns:
        the context menu entries
        Throws:
        CmsRpcException - if something goes wrong
      • getLinkForReturnCode

        CmsReturnLinkInfo getLinkForReturnCode​(java.lang.String returnCode)
                                        throws CmsRpcException
        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
      • getUniqueFileName

        java.lang.String getUniqueFileName​(java.lang.String parentFolder,
                                           java.lang.String baseName)
                                    throws CmsRpcException
        Returns a unique filename for the given base name and the parent folder.

        Parameters:
        parentFolder - the parent folder of the file
        baseName - the proposed file name
        Returns:
        the unique file name
        Throws:
        CmsRpcException - if something goes wrong
      • getWorkplaceLink

        java.lang.String getWorkplaceLink​(CmsUUID structureId)
                                   throws CmsRpcException
        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

        java.lang.String getWorkplaceLinkForPath​(java.lang.String path)
                                          throws CmsRpcException
        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
      • lockIfExists

        java.lang.String lockIfExists​(java.lang.String sitePath)
                               throws CmsRpcException
        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

        java.lang.String lockIfExists​(java.lang.String sitePath,
                                      long loadTime)
                               throws CmsRpcException
        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
        Returns:
        null if successful, an error message if not
        Throws:
        CmsRpcException - if something goes wrong
      • lockTemp

        java.lang.String lockTemp​(CmsUUID structureId)
                           throws CmsRpcException
        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

        java.lang.String lockTemp​(CmsUUID structureId,
                                  long loadTime)
                           throws CmsRpcException
        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
        Returns:
        null if successful, an error message if not
        Throws:
        CmsRpcException - if something goes wrong
      • saveUserSettings

        void saveUserSettings​(java.util.Map<java.lang.String,​java.lang.String> userSettings,
                              java.util.Set<java.lang.String> edited)
                       throws CmsRpcException
        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
        Throws:
        CmsRpcException - if something goes wrong
      • setResourceCategories

        void setResourceCategories​(CmsUUID structureId,
                                   java.util.List<java.lang.String> categories)
                            throws CmsRpcException
        Sets the categories of the given resource. Will remove all other categories.

        Parameters:
        structureId - the resource structure id
        categories - the categories to set
        Throws:
        CmsRpcException - if something goes wrong
      • setToolbarVisible

        void setToolbarVisible​(boolean visible)
                        throws CmsRpcException
        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

        java.lang.String unlock​(CmsUUID structureId)
                         throws CmsRpcException
        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

        java.lang.String unlock​(java.lang.String rootPath)
                         throws CmsRpcException
        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

        java.util.Map<java.lang.String,​CmsValidationResultvalidate​(java.util.Map<java.lang.String,​CmsValidationQuery> validationQueries)
                                                                    throws CmsRpcException
        Performs 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

        java.util.Map<java.lang.String,​CmsValidationResultvalidate​(java.lang.String formValidatorClass,
                                                                           java.util.Map<java.lang.String,​CmsValidationQuery> validationQueries,
                                                                           java.util.Map<java.lang.String,​java.lang.String> values,
                                                                           java.lang.String config)
                                                                    throws CmsRpcException
        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
        Returns:
        a map from field names to validation results
        Throws:
        CmsRpcException - if the RPC call goes wrong