Class CmsAlternativeSiteRootMapping

  • All Implemented Interfaces:
    java.io.Serializable

    public class CmsAlternativeSiteRootMapping
    extends java.lang.Object
    implements java.io.Serializable
    Describes a mapping rule that selects a different site root based on whether the requested path matches a set of prefixes or not.

    The path prefixes must be non-trivial, they can't just be the empty string or '/' - these values will be ignored.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String A_TITLE_SUFFIX
      Suffix to append to the title of the site.
      static java.lang.String N_ALTERNATIVE_SITE_ROOT_MAPPING
      Node name for the alternative site root mapping.
      static java.lang.String N_PATH
      Node name for mapped paths.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsAlternativeSiteRootMapping​(java.lang.String siteRoot, java.util.List<java.lang.String> prefixes, java.lang.String titleSuffix)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendXml​(org.dom4j.Element parent)
      Appends configuration data to the given parent element.
      boolean equals​(java.lang.Object obj)  
      java.util.List<CmsPath> getPrefixes()
      Gets the path prefixes.
      CmsPath getSiteRoot()
      Gets the site root as a CmsPath.
      java.lang.String getTitleSuffix()
      Gets the suffix to append to the site title.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CmsAlternativeSiteRootMapping

        public CmsAlternativeSiteRootMapping​(java.lang.String siteRoot,
                                             java.util.List<java.lang.String> prefixes,
                                             java.lang.String titleSuffix)
        Creates a new instance.
        Parameters:
        siteRoot - the site root
        prefixes - the prefixes
        titleSuffix - the title suffix
    • Method Detail

      • appendXml

        public void appendXml​(org.dom4j.Element parent)
        Appends configuration data to the given parent element.
        Parameters:
        parent - the parent element
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • getPrefixes

        public java.util.List<CmsPathgetPrefixes()
        Gets the path prefixes.
        Returns:
        the path prefixes
      • getSiteRoot

        public CmsPath getSiteRoot()
        Gets the site root as a CmsPath.
        Returns:
        the site root as a CmsPath
      • getTitleSuffix

        public java.lang.String getTitleSuffix()
        Gets the suffix to append to the site title.
        Returns:
        the suffix to append to the site title
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()