Class AbstractUserGroup
- All Implemented Interfaces:
Attributes
,Disableable
,Identifiable
,Permissions
,ReadableAttributes
,UserGroup
- Direct Known Subclasses:
SimpleUserGroup
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new AbstractUserGroup that considers group names to be case-sensitive or case-insensitive based on the case sensitivity setting of an instance ofLocalEnvironment
, as returned byEnvironment.getCaseSensitivity()
.AbstractUserGroup
(boolean caseSensitive) Creates a new AbstractUserGroup that considers group names to be case-sensitive or case-insensitive based on the provided case sensitivity flag.AbstractUserGroup
(Environment environment) Creates a new AbstractUserGroup that considers group names to be case-sensitive or case-insensitive based on the case sensitivity setting of the providedEnvironment
, as returned byEnvironment.getCaseSensitivity()
. -
Method Summary
Modifier and TypeMethodDescriptionReturns all permissions given to this object regarding currently-active connections.Returns all attributes associated with this object.Returns all connection group permissions given to this object.Returns all connection permissions given to this object.Returns a set of all readable user groups that are members of this user group.Returns a set of all readable users that are members of this user group.Returns all sharing profile permissions given to this object.Returns all system-level permissions given to this object.Returns all user group permissions given to this object.Returns a set of all readable user groups of which this user group is a member.Returns all user permissions given to this object.void
setAttributes
(Map<String, String> attributes) Sets the given attributes.Methods inherited from class org.apache.guacamole.net.auth.AbstractIdentifiable
equals, getIdentifier, hashCode, setIdentifier
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.guacamole.net.auth.Disableable
isDisabled, setDisabled
Methods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifier
-
Constructor Details
-
AbstractUserGroup
public AbstractUserGroup(boolean caseSensitive) Creates a new AbstractUserGroup that considers group names to be case-sensitive or case-insensitive based on the provided case sensitivity flag.- Parameters:
caseSensitive
- true if group names should be considered case-sensitive, false otherwise.
-
AbstractUserGroup
Creates a new AbstractUserGroup that considers group names to be case-sensitive or case-insensitive based on the case sensitivity setting of the providedEnvironment
, as returned byEnvironment.getCaseSensitivity()
.- Parameters:
environment
- The Environment that should determine whether this AbstractUserGroup considers group names to be case-sensitive.
-
AbstractUserGroup
public AbstractUserGroup()Creates a new AbstractUserGroup that considers group names to be case-sensitive or case-insensitive based on the case sensitivity setting of an instance ofLocalEnvironment
, as returned byEnvironment.getCaseSensitivity()
.
-
-
Method Details
-
getAttributes
Returns all attributes associated with this object. The returned map may not be modifiable.This implementation simply an immutable, empty map. Implementations that wish to expose custom attributes should override this function.
- Specified by:
getAttributes
in interfaceReadableAttributes
- Returns:
- A map of all attribute identifiers to their corresponding values, for all attributes associated with this object, which may not be modifiable.
-
setAttributes
Sets the given attributes. If an attribute within the map is not supported, it will simply be dropped. Any attributes not within the given map will be left untouched. Attributes which are not declared within the associated UserContext MUST NOT be submitted, but other extensions may manipulate the declared attributes through decorate() and redecorate(). Implementations may optionally allow storage of unsupported attributes. Extensions which rely on other extensions to store their attribute values should verify that such storage is supported by first testing that the attribute value is retrievable via getAttributes() after being set.This implementation simply ignores all attributes given. Implementations that wish to support modification of custom attributes should override this function.
- Specified by:
setAttributes
in interfaceAttributes
- Parameters:
attributes
- A map of all attribute identifiers to their corresponding values.
-
getSystemPermissions
Returns all system-level permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getSystemPermissions
in interfacePermissions
- Returns:
- A SystemPermissionSet of all system-level permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getConnectionPermissions
public ObjectPermissionSet getConnectionPermissions() throws org.apache.guacamole.GuacamoleExceptionReturns all connection permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getConnectionPermissions
in interfacePermissions
- Returns:
- An ObjectPermissionSet of all connection permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getConnectionGroupPermissions
public ObjectPermissionSet getConnectionGroupPermissions() throws org.apache.guacamole.GuacamoleExceptionReturns all connection group permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getConnectionGroupPermissions
in interfacePermissions
- Returns:
- An ObjectPermissionSet of all connection group permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getUserPermissions
Returns all user permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getUserPermissions
in interfacePermissions
- Returns:
- An ObjectPermissionSet of all user permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getUserGroupPermissions
Returns all user group permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getUserGroupPermissions
in interfacePermissions
- Returns:
- An ObjectPermissionSet of all user group permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getActiveConnectionPermissions
public ObjectPermissionSet getActiveConnectionPermissions() throws org.apache.guacamole.GuacamoleExceptionReturns all permissions given to this object regarding currently-active connections.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getActiveConnectionPermissions
in interfacePermissions
- Returns:
- An ObjectPermissionSet of all active connection permissions granted to this object.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
getSharingProfilePermissions
Returns all sharing profile permissions given to this object.This implementation simply an immutable, empty permission set. Implementations that wish to expose permissions should override this function.
- Specified by:
getSharingProfilePermissions
in interfacePermissions
- Returns:
- An ObjectPermissionSet of all sharing profile permissions granted to this object.
-
getUserGroups
Returns a set of all readable user groups of which this user group is a member. If permission is granted for the current user to modify the membership of this user group, then the returned set will be mutable, and any such modifications should be made through changes to the returned set.This implementation simply an immutable, empty related object set. Implementations that wish to expose group membership should override this function.
- Specified by:
getUserGroups
in interfaceUserGroup
- Returns:
- The set of all readable user groups of which this user group is a member.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the user groups.
-
getMemberUsers
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.This implementation simply an immutable, empty related object set. Implementations that wish to expose group membership should override this function.
- Specified by:
getMemberUsers
in interfaceUserGroup
- Returns:
- The set all readable users that are members of this user group, which may be mutable.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the users.
-
getMemberUserGroups
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.This implementation simply an immutable, empty related object set. Implementations that wish to expose group membership should override this function.
- Specified by:
getMemberUserGroups
in interfaceUserGroup
- Returns:
- The set of all readable user groups that are members of this user group, which may be mutable.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the user groups.
-