public class APIPermissionSet extends Object
Constructor and Description |
---|
APIPermissionSet()
Creates a new permission set which contains no granted permissions.
|
APIPermissionSet(User user)
Creates a new permission set containing all permissions currently
granted to the given user.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Set<ObjectPermission.Type>> |
getActiveConnectionPermissions()
Returns a map of active connection IDs to the set of permissions granted
for that active connection.
|
Map<String,Set<ObjectPermission.Type>> |
getConnectionGroupPermissions()
Returns a map of connection group IDs to the set of permissions granted
for that connection group.
|
Map<String,Set<ObjectPermission.Type>> |
getConnectionPermissions()
Returns a map of connection IDs to the set of permissions granted for
that connection.
|
Set<SystemPermission.Type> |
getSystemPermissions()
Returns the set of granted system-level permissions.
|
Map<String,Set<ObjectPermission.Type>> |
getUserPermissions()
Returns a map of user IDs to the set of permissions granted for that
user.
|
void |
setActiveConnectionPermissions(Map<String,Set<ObjectPermission.Type>> activeConnectionPermissions)
Replaces the current map of active connection permissions with the give
map, which must map active connection ID to its corresponding set of
granted permissions.
|
void |
setConnectionGroupPermissions(Map<String,Set<ObjectPermission.Type>> connectionGroupPermissions)
Replaces the current map of connection group permissions with the given
map, which must map connection group ID to its corresponding set of
granted permissions.
|
void |
setConnectionPermissions(Map<String,Set<ObjectPermission.Type>> connectionPermissions)
Replaces the current map of connection permissions with the given map,
which must map connection ID to its corresponding set of granted
permissions.
|
void |
setSystemPermissions(Set<SystemPermission.Type> systemPermissions)
Replaces the current set of system-level permissions with the given set.
|
void |
setUserPermissions(Map<String,Set<ObjectPermission.Type>> userPermissions)
Replaces the current map of user permissions with the given map, which
must map user ID to its corresponding set of granted permissions.
|
public APIPermissionSet()
public APIPermissionSet(User user) throws GuacamoleException
user
- The user whose permissions should be stored within this permission
set.GuacamoleException
- If an error occurs while retrieving the user's permissions.public Map<String,Set<ObjectPermission.Type>> getConnectionPermissions()
public Map<String,Set<ObjectPermission.Type>> getConnectionGroupPermissions()
public Map<String,Set<ObjectPermission.Type>> getActiveConnectionPermissions()
public Map<String,Set<ObjectPermission.Type>> getUserPermissions()
public Set<SystemPermission.Type> getSystemPermissions()
public void setConnectionPermissions(Map<String,Set<ObjectPermission.Type>> connectionPermissions)
connectionPermissions
- The map which must replace the currently-stored map of permissions.public void setConnectionGroupPermissions(Map<String,Set<ObjectPermission.Type>> connectionGroupPermissions)
connectionGroupPermissions
- The map which must replace the currently-stored map of permissions.public void setActiveConnectionPermissions(Map<String,Set<ObjectPermission.Type>> activeConnectionPermissions)
activeConnectionPermissions
- The map which must replace the currently-stored map of permissions.public void setUserPermissions(Map<String,Set<ObjectPermission.Type>> userPermissions)
userPermissions
- The map which must replace the currently-stored map of permissions.public void setSystemPermissions(Set<SystemPermission.Type> systemPermissions)
systemPermissions
- The set which must replace the currently-stored set of permissions.Copyright © 2016. All rights reserved.