Package org.opencms.site
Class CmsAlternativeSiteRootMapping
- java.lang.Object
-
- org.opencms.site.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()
-
-
-
Field Detail
-
N_ALTERNATIVE_SITE_ROOT_MAPPING
public static final java.lang.String N_ALTERNATIVE_SITE_ROOT_MAPPING
Node name for the alternative site root mapping.- See Also:
- Constant Field Values
-
N_PATH
public static final java.lang.String N_PATH
Node name for mapped paths.- See Also:
- Constant Field Values
-
A_TITLE_SUFFIX
public static final java.lang.String A_TITLE_SUFFIX
Suffix to append to the title of the site.- See Also:
- Constant Field Values
-
-
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 rootprefixes
- the prefixestitleSuffix
- 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 classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getPrefixes
public java.util.List<CmsPath> getPrefixes()
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 classjava.lang.Object
- See Also:
Object.hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-