Package org.apache.guacamole.net.auth
Class DelegatingUserGroup
java.lang.Object
org.apache.guacamole.net.auth.DelegatingUserGroup
- All Implemented Interfaces:
Attributes
,Disableable
,Identifiable
,Permissions
,ReadableAttributes
,UserGroup
UserGroup implementation which simply delegates all function calls to an
underlying UserGroup.
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingUserGroup
(UserGroup userGroup) Wraps the given UserGroup such that all function calls against this DelegatingUserGroup will be delegated to it. -
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.protected UserGroup
Returns the underlying UserGroup wrapped by this DelegatingUserGroup.Returns the unique identifier assigned 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.boolean
Returns true if this object is disabled, otherwise false.void
setAttributes
(Map<String, String> attributes) Sets the given attributes.void
setDisabled
(boolean disabled) Set the disabled status of this object to the boolean value provided, true if the object should be disabled, otherwise false.void
setIdentifier
(String identifier) Sets the identifier assigned to this object.
-
Constructor Details
-
DelegatingUserGroup
Wraps the given UserGroup such that all function calls against this DelegatingUserGroup will be delegated to it.- Parameters:
userGroup
- The UserGroup to wrap.
-
-
Method Details
-
getDelegateUserGroupGroup
Returns the underlying UserGroup wrapped by this DelegatingUserGroup.- Returns:
- The UserGroup wrapped by this DelegatingUserGroup.
-
getIdentifier
Description copied from interface:Identifiable
Returns the unique identifier assigned to this object. All identifiable objects must have a deterministic, unique identifier which may not be null.- Specified by:
getIdentifier
in interfaceIdentifiable
- Returns:
- The unique identifier assigned to this object, which may not be null.
-
setIdentifier
Description copied from interface:Identifiable
Sets the identifier assigned to this object.- Specified by:
setIdentifier
in interfaceIdentifiable
- Parameters:
identifier
- The identifier to assign.
-
isDisabled
public boolean isDisabled()Description copied from interface:Disableable
Returns true if this object is disabled, otherwise false.- Specified by:
isDisabled
in interfaceDisableable
- Returns:
- True if this object is disabled, otherwise false.
-
setDisabled
public void setDisabled(boolean disabled) Description copied from interface:Disableable
Set the disabled status of this object to the boolean value provided, true if the object should be disabled, otherwise false.- Specified by:
setDisabled
in interfaceDisableable
- Parameters:
disabled
- True if the object should be disabled, otherwise false.
-
getAttributes
Description copied from interface:ReadableAttributes
Returns all attributes associated with this object. The returned map may not be modifiable.- 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
Description copied from interface:Attributes
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.- Specified by:
setAttributes
in interfaceAttributes
- Parameters:
attributes
- A map of all attribute identifiers to their corresponding values.
-
getSystemPermissions
Description copied from interface:Permissions
Returns all system-level permissions given to this object.- 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.GuacamoleExceptionDescription copied from interface:Permissions
Returns all connection permissions given to this object.- 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.GuacamoleExceptionDescription copied from interface:Permissions
Returns all connection group permissions given to this object.- 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.
-
getSharingProfilePermissions
public ObjectPermissionSet getSharingProfilePermissions() throws org.apache.guacamole.GuacamoleExceptionDescription copied from interface:Permissions
Returns all sharing profile permissions given to this object.- Specified by:
getSharingProfilePermissions
in interfacePermissions
- Returns:
- An ObjectPermissionSet of all sharing profile 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.GuacamoleExceptionDescription copied from interface:Permissions
Returns all permissions given to this object regarding currently-active connections.- 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.
-
getUserPermissions
Description copied from interface:Permissions
Returns all user permissions given to this object.- 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
Description copied from interface:Permissions
Returns all user group permissions given to this object.- 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.
-
getUserGroups
Description copied from interface:UserGroup
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.- 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
Description copied from interface:UserGroup
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.- 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
Description copied from interface:UserGroup
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.- 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.
-