X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=security%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fusermgt%2FGroupSet.java;h=cc187a14d0d64a5f33a6d4c51866f70afc5cc498;hb=17775e14ecfb286e59f67117e5cee7e21e95ab1f;hp=e67d7bcf75f415a171f2b8f07876675a83e70a9b;hpb=162af365e45e54e5e8d656be276914df2005eaec;p=utils diff --git a/security/src/main/java/org/wamblee/usermgt/GroupSet.java b/security/src/main/java/org/wamblee/usermgt/GroupSet.java index e67d7bcf..cc187a14 100644 --- a/security/src/main/java/org/wamblee/usermgt/GroupSet.java +++ b/security/src/main/java/org/wamblee/usermgt/GroupSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2005 the original author or authors. + * Copyright 2005-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,59 +13,76 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.wamblee.usermgt; import java.util.Set; /** - * 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. + * 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 */ public interface GroupSet { - /** - * Must be called when the group has been modified to notify the group set. - * @param aGroup Group that was modified. + * Must be called when the group has been modified to notify the group set. + * + * @param aGroup + * Group that was modified. */ - void groupModified(Group aGroup); - + void groupModified(Group aGroup); + /** - * Finds the group by name. - * @param aName Group name. - * @return Group or null if not found. + * Finds the group by name. + * + * @param aName + * Group name. + * + * @return Group or null if not found. */ Group find(String aName); - + /** - * Determines if the group exists. - * @param aGroup Group. - * @return True iff the group exists. + * Determines if the group exists. + * + * @param aGroup + * Group. + * + * @return True iff the group exists. */ boolean contains(Group aGroup); - + /** - * Adds a group. If the group already exists, the existing group set - * is left unchanged. - * @param aGroup Group. + * Adds a group. If the group already exists, the existing group set is left + * unchanged. + * + * @param aGroup + * Group. + * */ boolean add(Group aGroup); - + /** - * Removes a group. If the group does not exist, this method is a no-op. - * @param aGroup Group to remove. - * @return True if the group was removed, false otherwise. + * Removes a group. If the group does not exist, this method is a no-op. + * + * @param aGroup + * Group to remove. + * + * @return True if the group was removed, false otherwise. */ boolean remove(Group aGroup); - + /** - * Returns the current groups. - * @return Groups. + * Returns the current groups. + * + * @return Groups. */ Set list(); /** - * @return The number of groups. + * + * @return The number of groups. */ - int size(); + int size(); }