Class SpellCheckerManager


  • public class SpellCheckerManager
    extends java.lang.Object
    Spell Checking manager
    Since:
    jcms-6.0
    Version:
    $Revision: 112717 $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpellCheckerManager

        public SpellCheckerManager()
    • 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 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.