|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wamblee.usermgt.UserAdministrationImpl
public class UserAdministrationImpl
Administration of users and groups.
| Constructor Summary | |
|---|---|
UserAdministrationImpl(UserSet aUsers,
GroupSet aGroups,
NameValidator aUserValidator,
NameValidator aGroupValidator)
Constructs empty user administration. |
|
| Method Summary | |
|---|---|
void |
addUserToGroup(User aUser,
Group aGroup)
Adds a user to a group. |
Group |
createGroup(java.lang.String aName)
Creates a new group. |
User |
createUser(java.lang.String aUser,
java.lang.String aPassword,
Group aGroup)
Creates a new user. |
Group |
getGroup(java.lang.String aName)
Gets the group for a given group name. |
int |
getGroupCount()
|
java.util.Set<Group> |
getGroups()
Gets all known groups. |
User |
getUser(java.lang.String aName)
Gets the user for a given name. |
int |
getUserCount()
|
java.util.Set<User> |
getUsers()
Get the users. |
java.util.Set<User> |
getUsers(Group aGroup)
Gets the users for a given group. |
void |
groupModified(Group aGroup)
Must be called when the group is modified. |
void |
removeGroup(Group aGroup)
Removes the group. |
void |
removeUser(User aUser)
Removes the user. |
void |
removeUserFromGroup(User aUser,
Group aGroup)
Removes a user from a group. |
void |
renameGroup(Group aGroup,
java.lang.String aGroupName)
Renames a group. |
void |
renameUser(User aUser,
java.lang.String aUserName)
Renames a user. |
void |
userModified(User aUser)
Must be called when the user is modified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserAdministrationImpl(UserSet aUsers,
GroupSet aGroups,
NameValidator aUserValidator,
NameValidator aGroupValidator)
| Method Detail |
|---|
public User createUser(java.lang.String aUser,
java.lang.String aPassword,
Group aGroup)
throws UserMgtException
UserAdministration
createUser in interface UserAdministrationaUser - Username.aPassword - Password.aGroup - Group.
UserMgtException - In case there is a conflict with an existing user.
public Group createGroup(java.lang.String aName)
throws UserMgtException
UserAdministration
createGroup in interface UserAdministrationaName - Group name.
UserMgtException - In case there is a conflict with an existing group.public void userModified(User aUser)
UserAdministration
userModified in interface UserAdministrationaUser - User.public void groupModified(Group aGroup)
UserAdministration
groupModified in interface UserAdministrationaGroup - Group.public User getUser(java.lang.String aName)
UserAdministration
getUser in interface UserAdministrationaName - User name.
public Group getGroup(java.lang.String aName)
UserAdministration
getGroup in interface UserAdministrationaName - Group name.
public java.util.Set<User> getUsers()
UserAdministration
getUsers in interface UserAdministrationpublic java.util.Set<User> getUsers(Group aGroup)
UserAdministration
getUsers in interface UserAdministrationaGroup - Group.
public java.util.Set<Group> getGroups()
UserAdministration
getGroups in interface UserAdministration
public void removeUser(User aUser)
throws UserMgtException
UserAdministration
removeUser in interface UserAdministrationaUser - User to remove.
UserMgtException - In case the user does not exist.
public void removeGroup(Group aGroup)
throws UserMgtException
UserAdministration
removeGroup in interface UserAdministrationaGroup - Group to remove.
UserMgtException - In case there are still users that are in the given group.
public void renameUser(User aUser,
java.lang.String aUserName)
throws UserMgtException
UserAdministration
renameUser in interface UserAdministrationaUser - User object for which user name must be changed.aUserName - New user name.
UserMgtException - In case the user is not known or the new user
name is already in use by another user.
public void renameGroup(Group aGroup,
java.lang.String aGroupName)
throws UserMgtException
UserAdministration
renameGroup in interface UserAdministrationaGroup - 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.
public void addUserToGroup(User aUser,
Group aGroup)
throws UserMgtException
UserAdministration
addUserToGroup in interface UserAdministrationaUser - User.aGroup - Group.
UserMgtException - In case the user or group or not known or if the user
is already part of the group.
public void removeUserFromGroup(User aUser,
Group aGroup)
throws UserMgtException
UserAdministration
removeUserFromGroup in interface UserAdministrationaUser - UseraGroup - Group
UserMgtException - In case the user or group are unknown or if the user
is not part of the group.public int getUserCount()
getUserCount in interface UserAdministrationpublic int getGroupCount()
getGroupCount in interface UserAdministration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||