Package org.opencms.site.xmlsitemap
Class CmsXmlSeoConfiguration
- java.lang.Object
-
- org.opencms.site.xmlsitemap.CmsXmlSeoConfiguration
-
public class CmsXmlSeoConfiguration extends java.lang.Object
Configuration bean which represents the options which are configurable from a 'seo-file' resource.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>
m_excludes
The exclude paths.protected java.util.List<java.lang.String>
m_includes
The include paths.protected java.lang.String
m_mode
The mode.protected java.lang.String
m_robotsTxtText
Text to be included in robots.txt after the sitemap references.static java.lang.Object
MODE_ROBOTS_TXT
Mode name constant.static java.lang.Object
MODE_XML_SITEMAP
Mode name constant.static java.lang.String
N_CACHE
Node name.static java.lang.String
N_COMPUTE_CONTAINER_PAGE_DATES
Node name.static java.lang.String
N_EXCLUDE
Node name.static java.lang.String
N_GENERATOR_CLASS
Node name.static java.lang.String
N_INCLUDE
Node name.static java.lang.String
N_MODE
Node name.static java.lang.String
N_ROBOTS_TXT_TEXT
Node name.static java.lang.String
N_SERVER_URL
Node name.static java.lang.String
SEO_FILE_TYPE
The file type used for generating XML sitemaps or robots.txt files.
-
Constructor Summary
Constructors Constructor Description CmsXmlSeoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getExcludes()
Gets the list of exclude paths.java.util.List<java.lang.String>
getIncludes()
Gets the list of include paths.java.lang.String
getMode()
Gets the mode.java.lang.String
getRobotsTxtText()
Gets the text which should be inserted in robots.txt mode.java.lang.String
getServerUrl()
Gets the configured server URL.java.lang.String
getSitemapGeneratorClassName()
Gets the class name for the sitemap generator class (may return null if none is explicitly configured).boolean
isXmlSitemapMode()
Returns true if this configuration is configured as robots.txt mode.void
load(CmsObject cms, CmsResource resource)
Loads the bean data from the given resource.boolean
shouldComputeContainerPageModificationDates()
Returns true if container page modification dates should be computed.boolean
usesCache()
True if caching should be used for the generated XML sitemap.
-
-
-
Field Detail
-
MODE_ROBOTS_TXT
public static final java.lang.Object MODE_ROBOTS_TXT
Mode name constant.
-
MODE_XML_SITEMAP
public static final java.lang.Object MODE_XML_SITEMAP
Mode name constant.
-
N_COMPUTE_CONTAINER_PAGE_DATES
public static final java.lang.String N_COMPUTE_CONTAINER_PAGE_DATES
Node name.- See Also:
- Constant Field Values
-
N_EXCLUDE
public static final java.lang.String N_EXCLUDE
Node name.- See Also:
- Constant Field Values
-
N_CACHE
public static final java.lang.String N_CACHE
Node name.- See Also:
- Constant Field Values
-
N_SERVER_URL
public static final java.lang.String N_SERVER_URL
Node name.- See Also:
- Constant Field Values
-
N_GENERATOR_CLASS
public static final java.lang.String N_GENERATOR_CLASS
Node name.- See Also:
- Constant Field Values
-
N_INCLUDE
public static final java.lang.String N_INCLUDE
Node name.- See Also:
- Constant Field Values
-
N_MODE
public static final java.lang.String N_MODE
Node name.- See Also:
- Constant Field Values
-
N_ROBOTS_TXT_TEXT
public static final java.lang.String N_ROBOTS_TXT_TEXT
Node name.- See Also:
- Constant Field Values
-
SEO_FILE_TYPE
public static final java.lang.String SEO_FILE_TYPE
The file type used for generating XML sitemaps or robots.txt files.- See Also:
- Constant Field Values
-
m_excludes
protected java.util.List<java.lang.String> m_excludes
The exclude paths.
-
m_includes
protected java.util.List<java.lang.String> m_includes
The include paths.
-
m_mode
protected java.lang.String m_mode
The mode.
-
m_robotsTxtText
protected java.lang.String m_robotsTxtText
Text to be included in robots.txt after the sitemap references.
-
-
Constructor Detail
-
CmsXmlSeoConfiguration
public CmsXmlSeoConfiguration()
-
-
Method Detail
-
getExcludes
public java.util.List<java.lang.String> getExcludes()
Gets the list of exclude paths.- Returns:
- the list of exclude paths
-
getIncludes
public java.util.List<java.lang.String> getIncludes()
Gets the list of include paths.- Returns:
- the list of include paths
-
getMode
public java.lang.String getMode()
Gets the mode.- Returns:
- the mode
-
getRobotsTxtText
public java.lang.String getRobotsTxtText()
Gets the text which should be inserted in robots.txt mode.- Returns:
- the text to insert in robots.txt mode
-
getServerUrl
public java.lang.String getServerUrl()
Gets the configured server URL.This, if set, replaces the host/port used by getOnlineLink() for the URLs in the XML sitemap.
- Returns:
- the server URL
-
getSitemapGeneratorClassName
public java.lang.String getSitemapGeneratorClassName()
Gets the class name for the sitemap generator class (may return null if none is explicitly configured).- Returns:
- the sitemap generator class name
-
isXmlSitemapMode
public boolean isXmlSitemapMode()
Returns true if this configuration is configured as robots.txt mode.- Returns:
- true if the mode is set to the robots.txt mode
-
load
public void load(CmsObject cms, CmsResource resource) throws CmsException
Loads the bean data from the given resource.- Parameters:
cms
- the CMS context to useresource
- the resource from which to load the data- Throws:
CmsException
- if something goes wrong
-
shouldComputeContainerPageModificationDates
public boolean shouldComputeContainerPageModificationDates()
Returns true if container page modification dates should be computed.- Returns:
- true if container page modification dates should be computed
-
usesCache
public boolean usesCache()
True if caching should be used for the generated XML sitemap.- Returns:
- true if caching should be used for the generated XML sitemap
-
-