Class CmsAlias

java.lang.Object
org.opencms.db.CmsAlias

public class CmsAlias extends Object
This class represents an alias from a virtual path to a resource in the VFS.

  • Field Details

    • ALIAS_PATTERN

      public static final Pattern ALIAS_PATTERN
      The regular expression which describes valid alias paths: one or more segments, each consisting of a slash at the front followed by one or more 'unreserved characters' for URIs (see RFC 2396).
    • m_aliasPath

      protected String m_aliasPath
      The alias path.
    • m_mode

      protected CmsAliasMode m_mode
      The alias mode.
    • m_siteRoot

      protected String m_siteRoot
      The site root for the alias.
    • m_structureId

      The structure id of the aliased page.
  • Constructor Details

    • CmsAlias

      public CmsAlias(CmsUUID structureId, String siteRoot, String aliasPath, CmsAliasMode mode)
      Creates a new alias.

      Parameters:
      structureId - the structure id of the aliased page
      siteRoot - the site root of the alias
      aliasPath - the alias path
      mode - the alias mode
  • Method Details

    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
      See Also:
    • getAliasPath

      public String getAliasPath()
      Gets the alias path.

      Returns:
      the alias path
    • getMode

      Gets the alias mode.

      Returns:
      the alias mode
    • getSiteRoot

      public String getSiteRoot()
      Gets the alias site root.

      Returns:
      the alias site root
    • getStructureId

      Gets the structure id of the aliased resource.

      Returns:
      the structure id of the aliased resource
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • isPermanentRedirect

      public boolean isPermanentRedirect()
      Checks whether the mode of the alias is 'permanent redirect'.

      Returns:
      true if the mode of the alias is 'permanent redirect'
    • isRedirect

      public boolean isRedirect()
      Checks whether the mode of the alias is a redirect type (permanent or temporary).

      Returns:
      true if the mode of the alias is a redirect type