/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.apache.guacamole.net.auth;

import org.apache.guacamole.GuacamoleException;

/**
 * A user group of the Guacamole web application. Each user group may contain
 * any number of Guacamole users and other user groups, and defines the
 * permissions implicitly granted to its members.
 */
public interface UserGroup extends Identifiable, Attributes, Permissions {

    /**
     * Returns a set of all readable user groups that are members of this user
     * group. If permission is granted for the current user to modify the
     * members of this group, then the returned set will be mutable, and any
     * such modifications should be made through changes to the returned set.
     *
     * @return
     *     The set of all readable user groups that are members of this user
     *     group, which may be mutable.
     *
     * @throws GuacamoleException
     *     If an error occurs while retrieving the user groups.
     */
    RelatedObjectSet getUserGroups() throws GuacamoleException;

    /**
     * Returns a set of all readable users that are members of this user group.
     * If permission is granted for the current user to modify the members of
     * this group, then the returned set will be mutable, and any such
     * modifications should be made through changes to the returned set.
     *
     * @return
     *     The set all readable users that are members of this user group,
     *     which may be mutable.
     *
     * @throws GuacamoleException
     *     If an error occurs while retrieving the users.
     */
    RelatedObjectSet getMemberUsers() throws GuacamoleException;

    /**
     * Returns a set of all readable user groups that are members of this user
     * group. If permission is granted for the current user to modify the
     * members of this group, then the returned set will be mutable, and any
     * such modifications should be made through changes to the returned set.
     *
     * @return
     *     The set of all readable user groups that are members of this user
     *     group, which may be mutable.
     *
     * @throws GuacamoleException
     *     If an error occurs while retrieving the user groups.
     */
    RelatedObjectSet getMemberUserGroups() throws GuacamoleException;

}

@@ -1236,45 +1236,45 @@
 ups 
-that are members of this user
+of which this user group is a
 %0A     * 
 grou
@@ -1261,37 +1261,38 @@
 oup is a%0A     * 
-group
+member
 . If permission 
@@ -1343,32 +1343,35 @@
 e%0A     * members
+hip
  of this group, 
@@ -1355,32 +1355,37 @@
 bership of this 
+user 
 group, then the 
@@ -1409,32 +1409,39 @@
  be mutable,
+%0A     *
  and any
 %0A     * such
@@ -1420,39 +1420,32 @@
 ,%0A     * and any
-%0A     *
  such modificati
@@ -1477,32 +1477,39 @@
 h changes to the
+%0A     *
  returned set.%0A 
@@ -1580,76 +1580,55 @@
 ups 
-that are members of this user%0A     *     group, which may be mutable
+of which this user group is a%0A     *     member
 .%0A  

Correct documentation of getUserGroups() behavior.