jhomenet.server.auth
Class UserGroup

java.lang.Object
  extended by jhomenet.server.auth.UserGroup
All Implemented Interfaces:
Group

public class UserGroup
extends java.lang.Object
implements Group

A class that is used to encompass a group of users.

Note: this class is still under development.

Id: $Id: $

Author:
Dave Irwin (jhomenet at gmail dot com)

Constructor Summary
UserGroup(java.lang.String userGroupName)
          Constructor.
 
Method Summary
 boolean addMember(Principal userToAdd)
          Adds the specified member to the group.
 void addMembers(java.util.List<Principal> userListToAdd)
          Add a list of users to the user group.
 java.lang.String getName()
           
 boolean isMember(Principal user)
          Returns true if the passed principal is a member of the group.
 java.util.List<Principal> members()
          Returns an enumeration of the members in the group.
 void removeAllMembers()
          Remove all of the users from the user group.
 boolean removeMember(Principal user)
          Removes the specified member from the group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserGroup

public UserGroup(java.lang.String userGroupName)
Constructor.

Parameters:
userGroupName - The user group name
Method Detail

getName

public final java.lang.String getName()
Returns:
The user group name

isMember

public final boolean isMember(Principal user)
Description copied from interface: Group
Returns true if the passed principal is a member of the group.

Specified by:
isMember in interface Group
Returns:
See Also:
jhomenet.server.auth.Group#isMember(jhomenet.commons.auth.Principal)

addMember

public final boolean addMember(Principal userToAdd)
Description copied from interface: Group
Adds the specified member to the group.

Specified by:
addMember in interface Group
Returns:
See Also:
jhomenet.server.auth.Group#addMember(jhomenet.commons.auth.Principal)

addMembers

public final void addMembers(java.util.List<Principal> userListToAdd)
Add a list of users to the user group.

Parameters:
userListToAdd - The list of users to add to the user group

removeMember

public final boolean removeMember(Principal user)
Description copied from interface: Group
Removes the specified member from the group.

Specified by:
removeMember in interface Group
Returns:
See Also:
jhomenet.server.auth.Group#removeMember(jhomenet.commons.auth.Principal)

removeAllMembers

public final void removeAllMembers()
Remove all of the users from the user group.


members

public java.util.List<Principal> members()
Description copied from interface: Group
Returns an enumeration of the members in the group.

Specified by:
members in interface Group
Returns:
See Also:
Group.members()


Copyright © 2004-2007 David Irwin. All Rights Reserved.