Package org.ametys.web.alias
Class AliasHelper
- java.lang.Object
-
- org.ametys.web.alias.AliasHelper
-
public final class AliasHelper extends Object
Helper for alias
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_ALIAS_NAMEThe alias default name
-
Constructor Summary
Constructors Modifier Constructor Description privateAliasHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetAliasNextUniqueName(TraversableAmetysObject rootNode)Get the next unique name for aliasstatic ModifiableTraversableAmetysObjectgetRootNode(Site site)Get the alias root node for the given sitestatic StringgetXPath(String siteName, String url)Creates the XPath query corresponding to specified alias urlstatic StringgetXPath(String siteName, Date date)Creates the XPath query
-
-
-
Field Detail
-
DEFAULT_ALIAS_NAME
public static final String DEFAULT_ALIAS_NAME
The alias default name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AliasHelper
private AliasHelper()
-
-
Method Detail
-
getAliasNextUniqueName
public static String getAliasNextUniqueName(TraversableAmetysObject rootNode)
Get the next unique name for alias- Parameters:
rootNode- The alias root node- Returns:
- the next unique name
-
getRootNode
public static ModifiableTraversableAmetysObject getRootNode(Site site) throws AmetysRepositoryException
Get the alias root node for the given site- Parameters:
site- The site- Returns:
- The alias root node
- Throws:
AmetysRepositoryException- If an error occurs.
-
getXPath
public static String getXPath(String siteName, Date date)
Creates the XPath query- Parameters:
siteName- The site namedate- The expiration date- Returns:
- the XPath query
-
-