Interface SettingsManager
-
public interface SettingsManager
This interface defines an OSGi service to manage the banned and reserved web user words within Webmanager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addBanned(int webId, String banned)
Adds a banned word for the given web id.void
addReserved(int webId, String reserved)
Adds a reserved word for the given web id.void
deleteBanned(int webId, String banned)
Deletes a banned word for the given web id.void
deleteReserved(int webId, String reserved)
Deletes a reserved word for the given web id.boolean
isClean(int webId, String word)
Determines if a given word is clean by checking it against banned and reserved words.List<String>
searchBanned(int webId, String word)
Searched banned words that contain the given string.List<String>
searchReserved(int webId, String word)
Searched reserved words that contain the given string.
-
-
-
Method Detail
-
addBanned
void addBanned(int webId, String banned) throws UserSettingsException
Adds a banned word for the given web id.- Parameters:
webId
- the web idbanned
- the banned word to add- Throws:
UserSettingsException
-
addReserved
void addReserved(int webId, String reserved) throws UserSettingsException
Adds a reserved word for the given web id.- Parameters:
webId
- the web idreserved
- the reserved word to add- Throws:
UserSettingsException
-
deleteBanned
void deleteBanned(int webId, String banned) throws UserSettingsException
Deletes a banned word for the given web id.- Parameters:
webId
- the web idbanned
- the banned word to delete- Throws:
UserSettingsException
-
deleteReserved
void deleteReserved(int webId, String reserved) throws UserSettingsException
Deletes a reserved word for the given web id.- Parameters:
webId
- the web idreserved
- 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 idword
- 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 idword
- 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 idword
- the word to look for- Returns:
- whether the word is clean
- Throws:
UserSettingsException
-
-