Class CmsPathIncludeExcludeSet


  • public class CmsPathIncludeExcludeSet
    extends java.lang.Object
    A helper class used for calculating which paths need to be included or excluded from the XML sitemap generation.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addExclude​(java.lang.String exclude)
      Adds an excluded path.
      void addInclude​(java.lang.String include)
      Adds an included path.
      java.util.Set<java.lang.String> getIncludeRoots()
      Gets the root include paths, i.e.
      boolean isExcluded​(java.lang.String path)
      Checks if the given path is excluded by the include/exclude configuration.
      protected java.lang.String normalizePath​(java.lang.String path)
      Converts a path to a normalized form.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addExclude

        public void addExclude​(java.lang.String exclude)
        Adds an excluded path.

        Parameters:
        exclude - the path to add
      • addInclude

        public void addInclude​(java.lang.String include)
        Adds an included path.

        Parameters:
        include - the path to add
      • getIncludeRoots

        public java.util.Set<java.lang.String> getIncludeRoots()
        Gets the root include paths, i.e. those include paths which don't have an ancestor path which is also an include path.

        Returns:
        the list of root include paths
      • isExcluded

        public boolean isExcluded​(java.lang.String path)
        Checks if the given path is excluded by the include/exclude configuration.

        Parameters:
        path - the path to check
        Returns:
        true if the path is excluded
      • normalizePath

        protected java.lang.String normalizePath​(java.lang.String path)
        Converts a path to a normalized form.

        Parameters:
        path - the path to normalize
        Returns:
        the normalized path