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_NAMEprivate static String__PLUGIN_NODE_NAMEstatic StringGLOSSARY_PAGE_TAGThe glossary page tag.
-
Constructor Summary
Constructors Modifier Constructor Description privateGlossaryHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetDefinitionQuery(String siteName, String language, Expression expression)Get the word definitions storage node.static ModifiableTraversableAmetysObjectgetDefinitionsNode(Site site, String language)Get the word definitions storage node.static StringgetDefinitionsNodePath(String siteName, String language)Get the word definitions storage node.static StringgetFirstLetterDefQuery(String siteName, String language, String letter)Get the word definitions storage node.static StringgetNonAlphaFirstLetterDefQuery(String siteName, String language)Get the word definitions storage node when first letter is not an alpha.private static ModifiableTraversableAmetysObjectgetOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType)static ModifiableTraversableAmetysObjectgetPluginNode(Site site)Get the root plugin storage object.static StringgetPluginNodePath(String siteName)Get the word definitions storage node.static StringgetWordExistsQuery(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
-
-