Package org.ametys.plugins.glossary
Class GlossaryHelper
java.lang.Object
org.ametys.plugins.glossary.GlossaryHelper
Glossary helper.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDefinitionQuery(String siteName, String language, Expression expression) Creates the XPath query for glossary words corresponding to specifiedExpressionandSortCriteria.static StringgetDefinitionQuery(String siteName, String language, Expression expression, SortCriteria sortCriteria) Creates the XPath query for glossary words corresponding to specifiedExpressionandSortCriteria.getDefinitionsNode(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.getPluginNode(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 Details
-
GLOSSARY_PAGE_TAG
The glossary page tag.- See Also:
-
-
Method Details
-
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
Get the word definitions storage node.- Parameters:
siteName- the site name.- Returns:
- the word definitions storage node.
-
getDefinitionsNodePath
Get the word definitions storage node.- Parameters:
siteName- the site name.language- the language.- Returns:
- the word definitions storage node.
-
getDefinitionQuery
Creates the XPath query for glossary words corresponding to specifiedExpressionandSortCriteria.- Parameters:
siteName- the site name.language- the languageexpression- the query predicates. Can be null.- Returns:
- the created XPath query
-
getDefinitionQuery
public static String getDefinitionQuery(String siteName, String language, Expression expression, SortCriteria sortCriteria) Creates the XPath query for glossary words corresponding to specifiedExpressionandSortCriteria.- Parameters:
siteName- the site name.language- the languageexpression- the query predicates. Can be null.sortCriteria- criteria for sorting results. Can be null.- Returns:
- the created XPath query
-
getWordExistsQuery
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
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
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.
-