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 String
DEFAULT_ALIAS_NAME
The alias default name
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getAliasNextUniqueName(TraversableAmetysObject rootNode)
Get the next unique name for aliasstatic ModifiableTraversableAmetysObject
getRootNode(Site site)
Get the alias root node for the given sitestatic String
getXPath(String siteName, String url)
Creates the XPath query corresponding to specified alias urlstatic String
getXPath(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
-
-
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
-
-