Package org.opencms.site.xmlsitemap
Class CmsPathIncludeExcludeSet
java.lang.Object
org.opencms.site.xmlsitemap.CmsPathIncludeExcludeSet
A helper class used for calculating which paths need to be included or excluded from the XML sitemap generation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExclude
(String exclude) Adds an excluded path.void
addInclude
(String include) Adds an included path.Gets the root include paths, i.e.boolean
isExcluded
(String path) Checks if the given path is excluded by the include/exclude configuration.protected String
normalizePath
(String path) Converts a path to a normalized form.
-
Constructor Details
-
CmsPathIncludeExcludeSet
public CmsPathIncludeExcludeSet()
-
-
Method Details
-
addExclude
Adds an excluded path.- Parameters:
exclude
- the path to add
-
addInclude
Adds an included path.- Parameters:
include
- the path to add
-
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
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
Converts a path to a normalized form.- Parameters:
path
- the path to normalize- Returns:
- the normalized path
-