Interface SecurityService
- 
- All Superinterfaces:
- com.google.gwt.user.client.rpc.RemoteService
 - All Known Implementing Classes:
- SecurityServiceImpl
 
 @RemoteServiceRelativePath("security") public interface SecurityService extends com.google.gwt.user.client.rpc.RemoteServiceThe client side stub for the Security Service. This service gives all needed methods to handle user sessions.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classSecurityService.Instance
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddUserToGroup(long groupId, long userId)Adds a user to a groupvoidapplyRights(GUIMenu menu)Applies all security settings to menuintchangePassword(Long requestorUserId, long userId, String oldPassword, String newPassword, boolean notify)Changes the password of a uservoiddeleteGroup(long groupId)Deletes a given groupvoiddeleteUser(long userId)Deletes a given userGUIGroupgetGroup(long groupId)Loads a given group from the databaseGUIMenugetMenu(long id)Retrieves the specified menuGUISessiongetSession(String locale)Logs-in a user by an existing session ID (session reuse)GUIUsergetUser(long userId)Loads a given user from the databasevoidkill(String sid)Kill the session with the given sidGUISequence[]loadBlockedEntities()Retrieves the list of actually blocked usernames and IPs detected as Brute Force AttackGUISecuritySettingsloadSettings()Loads security settingsvoidlogout()Logs out the current uservoidremoveBlockedEntities(long[] id)Removes blocked entries detected as Brute Force AttackvoidremoveFromGroup(long groupId, long[] userIds)Removes users from a groupGUIGroupsaveGroup(GUIGroup group)Creates or updates a groupGUIUsersaveProfile(GUIUser user)Saves the profile data onlybooleansaveSettings(GUISecuritySettings settings)Saves security settingsGUIUsersaveUser(GUIUser user, GUIInfo info)Creates or updates a userGUIUser[]searchUsers(String username, String groupId)Searches for users
 
- 
- 
- 
Method Detail- 
getSessionGUISession getSession(String locale) Logs-in a user by an existing session ID (session reuse)- Parameters:
- locale- the currently used language specification
- Returns:
- session informations
 
 - 
changePasswordint changePassword(Long requestorUserId, long userId, String oldPassword, String newPassword, boolean notify) Changes the password of a user- Parameters:
- requestorUserId- The user Identifier of the requestor
- userId- The user Identifier
- oldPassword- can be null
- newPassword- the new password
- notify- If the new credentials have to be notified
- Returns:
- 0 if all is ok, 1 if the password is incorrect, 2 if the new password cannot be notified, otherwise a positive number grater than 2
 
 - 
logoutvoid logout() Logs out the current user
 - 
deleteUservoid deleteUser(long userId) throws ServerExceptionDeletes a given user- Parameters:
- userId- identifier of the user
- Throws:
- ServerException- error generated in the server application
 
 - 
saveUserGUIUser saveUser(GUIUser user, GUIInfo info) throws ServerException Creates or updates a user- Parameters:
- user- the user to save
- info- informations about the User Interface
- Returns:
- the saved user
- Throws:
- ServerException- error generated in the server application
 
 - 
saveProfileGUIUser saveProfile(GUIUser user) throws ServerException Saves the profile data only- Parameters:
- user- the user to save
- Returns:
- the updated user
- Throws:
- ServerException- error generated in the server application
 
 - 
getUserGUIUser getUser(long userId) throws ServerException Loads a given user from the database- Parameters:
- userId- identifier of the user
- Returns:
- the user retrieved from the server application
- Throws:
- ServerException- error generated in the server application
 
 - 
getGroupGUIGroup getGroup(long groupId) throws ServerException Loads a given group from the database- Parameters:
- groupId- identifier of the group
- Returns:
- group retrieved from the server application
- Throws:
- ServerException- error generated in the server application
 
 - 
saveGroupGUIGroup saveGroup(GUIGroup group) throws ServerException Creates or updates a group- Parameters:
- group- the group to save
- Returns:
- the updated group
- Throws:
- ServerException- error generated in the server application
 
 - 
deleteGroupvoid deleteGroup(long groupId) throws ServerExceptionDeletes a given group- Parameters:
- groupId- identifier of the group
- Throws:
- ServerException- error generated in the server application
 
 - 
removeFromGroupvoid removeFromGroup(long groupId, long[] userIds) throws ServerExceptionRemoves users from a group- Parameters:
- groupId- identifier of the group
- userIds- array of user identifiers
- Throws:
- ServerException- error generated in the server application
 
 - 
addUserToGroupvoid addUserToGroup(long groupId, long userId) throws ServerExceptionAdds a user to a group- Parameters:
- groupId- identifier of the group
- userId- identifier of the user
- Throws:
- ServerException- error generated in the server application
 
 - 
saveSettingsboolean saveSettings(GUISecuritySettings settings) throws ServerException Saves security settings- Parameters:
- settings- settings about security
- Returns:
- True if the application has to be restarted
- Throws:
- ServerException- error generated in the server application
 
 - 
loadSettingsGUISecuritySettings loadSettings() throws ServerException Loads security settings- Returns:
- the security settings
- Throws:
- ServerException- error generated in the server application
 
 - 
killvoid kill(String sid) throws ServerException Kill the session with the given sid- Parameters:
- sid- identifier of the session
- Throws:
- ServerException- error generated in the server application
 
 - 
applyRightsvoid applyRights(GUIMenu menu) throws ServerException Applies all security settings to menu- Parameters:
- menu- the menu
- Throws:
- ServerException- error generated in the server application
 
 - 
getMenuGUIMenu getMenu(long id) throws ServerException Retrieves the specified menu- Parameters:
- id- identifier of the menu
- Returns:
- the menu retrieved from the server application
- Throws:
- ServerException- error generated in the server application
 
 - 
searchUsersGUIUser[] searchUsers(String username, String groupId) throws ServerException Searches for users- Parameters:
- username- The username used in the like operator (optional)
- groupId- The group ID (optional)
- Returns:
- Array of found users
- Throws:
- ServerException- error generated in the server application
 
 - 
loadBlockedEntitiesGUISequence[] loadBlockedEntities() throws ServerException Retrieves the list of actually blocked usernames and IPs detected as Brute Force Attack- Returns:
- the array of blocked usernames and IPs
- Throws:
- ServerException- error generated in the server application
 
 - 
removeBlockedEntitiesvoid removeBlockedEntities(long[] id) throws ServerExceptionRemoves blocked entries detected as Brute Force Attack- Parameters:
- id- identifiers of entities from the BFA list
- Throws:
- ServerException- error generated in the server application
 
 
- 
 
-