Interface SettingsManager


  • public interface SettingsManager
    This interface defines an OSGi service to manage the banned and reserved web user words within Webmanager.
    • Method Detail

      • deleteReserved

        void deleteReserved​(int webId,
                            String reserved)
                     throws UserSettingsException
        Deletes a reserved word for the given web id.
        Parameters:
        webId - the web id
        reserved - the reserved word to delete
        Throws:
        UserSettingsException
      • searchBanned

        List<String> searchBanned​(int webId,
                                  String word)
                           throws UserSettingsException
        Searched banned words that contain the given string.
        Parameters:
        webId - the web id
        word - the word to look for, if null or empty then all words are returned
        Returns:
        a list of strings that contain the given word
        Throws:
        UserSettingsException
      • searchReserved

        List<String> searchReserved​(int webId,
                                    String word)
                             throws UserSettingsException
        Searched reserved words that contain the given string.
        Parameters:
        webId - the web id
        word - the word to look for, if null or empty then all words are returned
        Returns:
        a list of strings that contain the given word
        Throws:
        UserSettingsException
      • isClean

        boolean isClean​(int webId,
                        String word)
                 throws UserSettingsException
        Determines if a given word is clean by checking it against banned and reserved words. If banned and reserved words do not appear as substring in the word, then it is considered clean.
        Parameters:
        webId - the web id
        word - the word to look for
        Returns:
        whether the word is clean
        Throws:
        UserSettingsException