com.inet.jortho
Interface UserDictionaryProvider

All Known Implementing Classes:
FileUserDictionary

public interface UserDictionaryProvider

Interface to be implemented by a user dictionary. Adding a new word via addWord(String) must trigger a storing of the dictionary


Method Summary
 void addWord(java.lang.String word)
          Adds a new word to the current user dictionary.
 java.lang.String getUserWords(java.util.Locale locale)
          Gets the list of user words for this locale.
 void setUserWords(java.lang.String wordList)
          Set a completely new word list
 

Method Detail

getUserWords

java.lang.String getUserWords(java.util.Locale locale)
Gets the list of user words for this locale. The implementation can decide if there is a user dictionary for each available language or only one. This method is called before the language change event is fired if the language is changed and the dictionary is loaded.

Parameters:
locale - The locale of the selected language.
Returns:
A list of words delimited with line breaks. It can be null.

addWord

void addWord(java.lang.String word)
Adds a new word to the current user dictionary. The implementor must save this word in its own backend.

Parameters:
word - the new word.

setUserWords

void setUserWords(java.lang.String wordList)
Set a completely new word list

Parameters:
wordList - the new word list. Can be empty but not null.


Copyright © 2005 - 2007 i-net software. All Rights Reserved.