Class SpellCheckerManager

java.lang.Object
com.jalios.jcms.spellchecker.SpellCheckerManager

public class SpellCheckerManager extends Object
Spell Checking manager
Since:
jcms-6.0
  • Constructor Details

    • SpellCheckerManager

      public SpellCheckerManager()
  • Method Details

    • getLanguageList

      public static List<String> getLanguageList()
      Returns a list of available languages for spell-checking.
      Returns:
      a List of ISO-639 language code
    • spellCheck

      public static List<SpellCheckResult> spellCheck(String text, String lang)
      Spell-check the specified text in the specified language and return a list of SpellCheckResult.
      Parameters:
      text - the text to check
      lang - 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.