Package org.ametys.plugins.glossary
Class GlossaryHelper
- java.lang.Object
-
- org.ametys.plugins.glossary.GlossaryHelper
-
public final class GlossaryHelper extends Object
Glossary helper.
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__DEFINITIONS_NODE_NAME
private static String
__PLUGIN_NODE_NAME
static String
GLOSSARY_PAGE_TAG
The glossary page tag.
-
Constructor Summary
Constructors Modifier Constructor Description private
GlossaryHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getDefinitionQuery(String siteName, String language, Expression expression)
Get the word definitions storage node.static ModifiableTraversableAmetysObject
getDefinitionsNode(Site site, String language)
Get the word definitions storage node.static String
getDefinitionsNodePath(String siteName, String language)
Get the word definitions storage node.static String
getFirstLetterDefQuery(String siteName, String language, String letter)
Get the word definitions storage node.static String
getNonAlphaFirstLetterDefQuery(String siteName, String language)
Get the word definitions storage node when first letter is not an alpha.private static ModifiableTraversableAmetysObject
getOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType)
static ModifiableTraversableAmetysObject
getPluginNode(Site site)
Get the root plugin storage object.static String
getPluginNodePath(String siteName)
Get the word definitions storage node.static String
getWordExistsQuery(String siteName, String language, String word)
Get the word definitions storage node.
-
-
-
Field Detail
-
GLOSSARY_PAGE_TAG
public static final String GLOSSARY_PAGE_TAG
The glossary page tag.- See Also:
- Constant Field Values
-
__PLUGIN_NODE_NAME
private static final String __PLUGIN_NODE_NAME
- See Also:
- Constant Field Values
-
__DEFINITIONS_NODE_NAME
private static final String __DEFINITIONS_NODE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GlossaryHelper
private GlossaryHelper()
-
-
Method Detail
-
getPluginNode
public static ModifiableTraversableAmetysObject getPluginNode(Site site) throws AmetysRepositoryException
Get the root plugin storage object.- Parameters:
site
- the site.- Returns:
- the root plugin storage object.
- Throws:
AmetysRepositoryException
- if a repository error occurs.
-
getDefinitionsNode
public static ModifiableTraversableAmetysObject getDefinitionsNode(Site site, String language) throws AmetysRepositoryException
Get the word definitions storage node.- Parameters:
site
- the sitelanguage
- the language.- Returns:
- the word definitions storage node.
- Throws:
AmetysRepositoryException
- if a repository error occurs.
-
getPluginNodePath
public static String getPluginNodePath(String siteName)
Get the word definitions storage node.- Parameters:
siteName
- the site name.- Returns:
- the word definitions storage node.
-
getDefinitionsNodePath
public static String getDefinitionsNodePath(String siteName, String language)
Get the word definitions storage node.- Parameters:
siteName
- the site name.language
- the language.- Returns:
- the word definitions storage node.
-
getDefinitionQuery
public static String getDefinitionQuery(String siteName, String language, Expression expression)
Get the word definitions storage node.- Parameters:
siteName
- the site name.language
- the language.expression
- the expression of the repository querys- Returns:
- the word definitions storage node.
-
getWordExistsQuery
public static String getWordExistsQuery(String siteName, String language, String word)
Get the word definitions storage node.- Parameters:
siteName
- the site name.language
- the language.word
- the searched word- Returns:
- the word definitions storage node.
-
getFirstLetterDefQuery
public static String getFirstLetterDefQuery(String siteName, String language, String letter)
Get the word definitions storage node.- Parameters:
siteName
- the site name.language
- the language.letter
- the first letter.- Returns:
- the word definitions storage node.
-
getNonAlphaFirstLetterDefQuery
public static String getNonAlphaFirstLetterDefQuery(String siteName, String language)
Get the word definitions storage node when first letter is not an alpha.- Parameters:
siteName
- the site name.language
- the language.- Returns:
- the word definitions storage node.
-
getOrCreateNode
private static ModifiableTraversableAmetysObject getOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType) throws AmetysRepositoryException
- Throws:
AmetysRepositoryException
-
-