Class CmsAliasHelper

java.lang.Object
org.opencms.gwt.CmsAliasHelper

public class CmsAliasHelper extends Object
This class contains the real implementations of service methods related to aliases.

  • Constructor Details

  • Method Details

    • exportAliasesAsCsv

      Returns the comma separated alias data.

      Parameters:
      cms - the OpenCms context
      Returns:
      the comma separated alias data
      Throws:
      CmsException - if something goes wrong reading the alias data
    • saveAliases

      public void saveAliases(CmsUUID structureId, List<CmsAliasBean> aliasBeans) throws CmsException
      Saves aliases.

      Parameters:
      structureId - the structure id
      aliasBeans - the alias beans
      Throws:
      CmsException - if something goes wrong
    • setCms

      public void setCms(CmsObject cms)
      Sets the CMS object.

      Parameters:
      cms - the CMS object
    • checkValidAliasPath

      protected String checkValidAliasPath(String path, Locale locale)
      Checks whether a given string is a valid alias path.

      Parameters:
      path - the path to check
      locale - the locale to use for validation messages
      Returns:
      null if the string is a valid alias path, else an error message
    • convertAliasToBean

      Converts a server-side alias object to an alias bean.

      Parameters:
      alias - the server-side alias object
      Returns:
      the client-side alias bean
    • getAliasesForPage

      Implementation of the getAliasesForPage method.

      Parameters:
      uuid - the structure id of the page
      Returns:
      the aliases for the given page
      Throws:
      CmsException - if something goes wrong
    • validateAliases

      protected Map<String,String> validateAliases(CmsUUID uuid, Map<String,String> aliasPaths) throws CmsException
      The internal method used for validating aliases.

      Parameters:
      uuid - the structure id of the resource whose aliases are being validated
      aliasPaths - a map from (arbitrary) ids to alias paths
      Returns:
      a map from the same ids to validation error messages
      Throws:
      CmsException - if something goes wrong