public interface UserAdministration
Modifier and Type | Method and Description |
---|---|
void |
addUserToGroup(String aUser,
String aGroup)
Adds a user to a group.
|
boolean |
changePassword(String aUser,
String aOldPassword,
String aNewPassword)
Changes the password.
|
boolean |
checkGroup(String aGroup)
Check if a group exists.
|
boolean |
checkPassword(String aUser,
String aPassword)
Checks the password.
|
boolean |
checkUser(String aUser)
Checks if a user exists.
|
void |
createGroup(String aName)
Creates a new group.
|
void |
createUser(String aUser,
String aPassword)
Creates a new user.
|
int |
getGroupCount() |
List<String> |
getGroups()
Gets all groups.
|
List<String> |
getGroups(String aUser)
Gets all groups for a given user.
|
int |
getUserCount() |
List<String> |
getUsers()
Get the users.
|
List<String> |
getUsers(String aGroup)
Gets the users for a given group.
|
boolean |
isInGroup(String aUser,
String aGroup)
Checks if the user belongs to the given group.
|
void |
removeGroup(String aGroup)
Removes the group.
|
void |
removeUser(String aUser)
Removes the user.
|
void |
removeUserFromGroup(String aUser,
String aGroup)
Removes a user from a group.
|
void |
renameGroup(String aOldGroup,
String aGroupName)
Renames a group.
|
void |
renameUser(String aOldUserName,
String aUserName)
Renames a user.
|
void |
setPassword(String aUser,
String aPassword) |
void createUser(String aUser, String aPassword)
aUser
- Username.aPassword
- Password.UserMgtException
- In case there is a conflict with an existing user.void createGroup(String aName)
aName
- Group name.UserMgtException
- In case there is a conflict with an existing group.boolean checkUser(String aUser)
aUser
- User to check.boolean checkGroup(String aGroup)
aGroup
- Group.boolean checkPassword(String aUser, String aPassword)
aUser
- User to check password for.aPassword
- Password to check.UserMgtException
- In case user does not exist.boolean changePassword(String aUser, String aOldPassword, String aNewPassword)
aUser
- User.aOldPassword
- Old password.aNewPassword
- New password.UserMgtException
- Inc ase the user does not exist.void setPassword(String aUser, String aPassword)
aUser
- User.aPassword
- The password to set.UserMgtException
- Inc ase the user does not exist.boolean isInGroup(String aUser, String aGroup)
aUser
- UseraGroup
- Group.UserMgtException
- In case the user or group do not exist.int getUserCount()
int getGroupCount()
List<String> getUsers(String aGroup)
aGroup
- Group.List<String> getGroups(String aUser)
aUser
- user.void renameUser(String aOldUserName, String aUserName)
aOldUserName
- Current user name.aUserName
- New user name.UserMgtException
- In case the user is not known or the new user name is already
in use by another user.void renameGroup(String aOldGroup, String aGroupName)
aGroup
- Group to rename.aGroupName
- New name for the group.UserMgtException
- In case the new group name is already used by another group
of if the existing group is unknown.void removeUser(String aUser)
aUser
- User to remove.UserMgtException
- In case the user does not exist.void removeGroup(String aGroup)
aGroup
- Group to remove.UserMgtException
- In case there are still users that are in the given group.void addUserToGroup(String aUser, String aGroup)
aUser
- User.aGroup
- Group.UserMgtException
- In case the user or group or not known or if the user is
already part of the group.void removeUserFromGroup(String aUser, String aGroup)
aUser
- UseraGroup
- GroupUserMgtException
- In case the user or group are unknown or if the user is not
part of the group.Copyright © 2022. All rights reserved.