Package com.jalios.jcms.spellchecker
Class SpellCheckerManager
- java.lang.Object
-
- com.jalios.jcms.spellchecker.SpellCheckerManager
-
public class SpellCheckerManager extends java.lang.Object
Spell Checking manager- Since:
- jcms-6.0
-
-
Constructor Summary
Constructors Constructor Description SpellCheckerManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
getLanguageList()
Returns a list of available languages for spell-checking.static SpellChecker
getSpellChecker()
Retrieve the SpellChecker instance (initialized it if needed).static void
reloadSpellChecker()
Reload the SpellChecker from properties.static void
setSpellChecker(SpellChecker spellChecker)
Change the SpellChecker already initialized by this manager.static java.util.List<SpellCheckResult>
spellCheck(java.lang.String text, java.lang.String lang)
Spell-check the specified text in the specified language and return a list of SpellCheckResult.
-
-
-
Method Detail
-
getLanguageList
public static java.util.List<java.lang.String> getLanguageList()
Returns a list of available languages for spell-checking.- Returns:
- a List of ISO-639 language code
-
spellCheck
public static java.util.List<SpellCheckResult> spellCheck(java.lang.String text, java.lang.String lang)
Spell-check the specified text in the specified language and return a list of SpellCheckResult.- Parameters:
text
- the text to checklang
- the language of the text (ISO-639 code)- Returns:
- a List of SpellCheckResult
-
getSpellChecker
public static SpellChecker getSpellChecker()
Retrieve the SpellChecker instance (initialized it if needed).- Returns:
- the SpellChecker instance as defined by property "spellchecker.class" or
replaced by
setSpellChecker(SpellChecker)
.
-
setSpellChecker
public static void setSpellChecker(SpellChecker spellChecker)
Change the SpellChecker already initialized by this manager.- Parameters:
spellChecker
- a SpellChecker instance, must not be null.
-
reloadSpellChecker
public static void reloadSpellChecker()
Reload the SpellChecker from properties.
-
-