org.wamblee.security.authentication
Interface GroupSet

All Known Implementing Classes:
InMemoryGroupSet, JpaGroupSet

public interface GroupSet

Represents a set of groups. A typical implemnetation would be, a readonly implementation defined in a configuration file or a list of groups defined in a database.

Author:
Erik Brakkee

Method Summary
 boolean add(Group aGroup)
          Adds a group.
 boolean contains(Group aGroup)
          Determines if the group exists.
 Group find(java.lang.String aName)
          Finds the group by name.
 void groupModified(Group aGroup)
          Must be called when the group has been modified to notify the group set.
 java.util.Set<Group> list()
          Returns the current groups.
 boolean remove(Group aGroup)
          Removes a group.
 int size()
           
 

Method Detail

groupModified

void groupModified(Group aGroup)
Must be called when the group has been modified to notify the group set.

Parameters:
aGroup - Group that was modified.

find

Group find(java.lang.String aName)
Finds the group by name.

Parameters:
aName - Group name.
Returns:
Group or null if not found.

contains

boolean contains(Group aGroup)
Determines if the group exists.

Parameters:
aGroup - Group.
Returns:
True iff the group exists.

add

boolean add(Group aGroup)
Adds a group. If the group already exists, the existing group set is left unchanged.

Parameters:
aGroup - Group.

remove

boolean remove(Group aGroup)
Removes a group. If the group does not exist, this method is a no-op.

Parameters:
aGroup - Group to remove.
Returns:
True if the group was removed, false otherwise.

list

java.util.Set<Group> list()
Returns the current groups.

Returns:
Groups.

size

int size()
Returns:
The number of groups.


Copyright © 2022. All Rights Reserved.