Package org.silverpeas.core.web.glossary
Class HighlightGlossaryTerms
- java.lang.Object
-
- org.silverpeas.core.web.glossary.HighlightGlossaryTerms
-
public class HighlightGlossaryTerms extends Object
- Author:
- David Derigent
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HighlightGlossaryTerms()
default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
searchReplace(String publicationContent, String className, String axisId, boolean onlyFirst, String language)
Search all the term contained in the given glossary and highlight, one or all of the occurrences found in the given text.
-
-
-
Method Detail
-
searchReplace
public String searchReplace(String publicationContent, String className, String axisId, boolean onlyFirst, String language)
Search all the term contained in the given glossary and highlight, one or all of the occurrences found in the given text. The regular expression used to retrieve the occurrence works only in HTML code, not in plain text. This code is designed to parse HTML code.- Parameters:
publicationContent
- the publication text used to perform the highlight operationclassName
- the css class name used to "mark" the highlighted term and format his displayingaxisId
- The pdc axis identifier used to load the glossaryonlyFirst
- indicates if all the occurrence of a term must be highlight or only the firstlanguage
- indicates the language use to load information from glossary- Returns:
- a String which contain given publication with highlight term.
-
-