Package org.opencms.db
Class CmsAlias
- java.lang.Object
-
- org.opencms.db.CmsAlias
-
public class CmsAlias extends java.lang.Object
This class represents an alias from a virtual path to a resource in the VFS.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.Pattern
ALIAS_PATTERN
The regular expression which describes valid alias paths: one or more segments, each consisting of a slash at the front followed by one or more 'unreserved characters' for URIs (see RFC 2396).protected java.lang.String
m_aliasPath
The alias path.protected CmsAliasMode
m_mode
The alias mode.protected java.lang.String
m_siteRoot
The site root for the alias.protected CmsUUID
m_structureId
The structure id of the aliased page.
-
Constructor Summary
Constructors Constructor Description CmsAlias(CmsUUID structureId, java.lang.String siteRoot, java.lang.String aliasPath, CmsAliasMode mode)
Creates a new alias.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
java.lang.String
getAliasPath()
Gets the alias path.CmsAliasMode
getMode()
Gets the alias mode.java.lang.String
getSiteRoot()
Gets the alias site root.CmsUUID
getStructureId()
Gets the structure id of the aliased resource.int
hashCode()
boolean
isPermanentRedirect()
Checks whether the mode of the alias is 'permanent redirect'.boolean
isRedirect()
Checks whether the mode of the alias is a redirect type (permanent or temporary).
-
-
-
Field Detail
-
ALIAS_PATTERN
public static final java.util.regex.Pattern ALIAS_PATTERN
The regular expression which describes valid alias paths: one or more segments, each consisting of a slash at the front followed by one or more 'unreserved characters' for URIs (see RFC 2396).
-
m_aliasPath
protected java.lang.String m_aliasPath
The alias path.
-
m_mode
protected CmsAliasMode m_mode
The alias mode.
-
m_siteRoot
protected java.lang.String m_siteRoot
The site root for the alias.
-
m_structureId
protected CmsUUID m_structureId
The structure id of the aliased page.
-
-
Constructor Detail
-
CmsAlias
public CmsAlias(CmsUUID structureId, java.lang.String siteRoot, java.lang.String aliasPath, CmsAliasMode mode)
Creates a new alias.- Parameters:
structureId
- the structure id of the aliased pagesiteRoot
- the site root of the aliasaliasPath
- the alias pathmode
- the alias mode
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getAliasPath
public java.lang.String getAliasPath()
Gets the alias path.- Returns:
- the alias path
-
getMode
public CmsAliasMode getMode()
Gets the alias mode.- Returns:
- the alias mode
-
getSiteRoot
public java.lang.String getSiteRoot()
Gets the alias site root.- Returns:
- the alias site root
-
getStructureId
public CmsUUID getStructureId()
Gets the structure id of the aliased resource.- Returns:
- the structure id of the aliased resource
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
isPermanentRedirect
public boolean isPermanentRedirect()
Checks whether the mode of the alias is 'permanent redirect'.- Returns:
- true if the mode of the alias is 'permanent redirect'
-
isRedirect
public boolean isRedirect()
Checks whether the mode of the alias is a redirect type (permanent or temporary).- Returns:
- true if the mode of the alias is a redirect type
-
-