001
014
015 package com.liferay.portal.kernel.words;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.jazzy.InvalidWord;
020 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
021
022 import java.util.List;
023 import java.util.Set;
024
025
028 @ProviderType
029 public class WordsUtil {
030
031 public static List<InvalidWord> checkSpelling(String text) {
032 return getWords().checkSpelling(text);
033 }
034
035 public static List<String> getDictionaryList() {
036 return getWords().getDictionaryList();
037 }
038
039 public static Set<String> getDictionarySet() {
040 return getWords().getDictionarySet();
041 }
042
043 public static String getRandomWord() {
044 return getWords().getRandomWord();
045 }
046
047 public static Words getWords() {
048 PortalRuntimePermission.checkGetBeanProperty(WordsUtil.class);
049
050 return _words;
051 }
052
053 public static boolean isDictionaryWord(String word) {
054 return getWords().isDictionaryWord(word);
055 }
056
057 public void setWords(Words words) {
058 PortalRuntimePermission.checkSetBeanProperty(getClass());
059
060 _words = words;
061 }
062
063 private static Words _words;
064
065 }