public class SimpleSystemPermissionSet extends Object implements SystemPermissionSet
| Constructor and Description |
|---|
SimpleSystemPermissionSet()
Creates a new empty SimpleSystemPermissionSet.
|
SimpleSystemPermissionSet(Set<SystemPermission> permissions)
Creates a new SimpleSystemPermissionSet which contains the permissions
within the given Set.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPermission(SystemPermission.Type permission)
Adds the specified permission.
|
void |
addPermissions(Set<SystemPermission> permissions)
Adds the specified permissions, if not already granted.
|
Set<SystemPermission> |
getPermissions()
Returns a Set which contains all permissions granted within this
permission set.
|
boolean |
hasPermission(SystemPermission.Type permission)
Tests whether the permission of the given type is granted.
|
void |
removePermission(SystemPermission.Type permission)
Removes the specified permission.
|
void |
removePermissions(Set<SystemPermission> permissions)
Removes each of the specified permissions, if granted.
|
protected void |
setPermissions(Set<SystemPermission> permissions)
Sets the Set which backs this SimpleSystemPermissionSet.
|
public SimpleSystemPermissionSet()
public SimpleSystemPermissionSet(Set<SystemPermission> permissions)
permissions - The Set of permissions this SimpleSystemPermissionSet should
contain.protected void setPermissions(Set<SystemPermission> permissions)
permissions - The Set of permissions this SimpleSystemPermissionSet should
contain.public Set<SystemPermission> getPermissions()
PermissionSetgetPermissions in interface PermissionSet<SystemPermission>getPermissions in interface SystemPermissionSetpublic boolean hasPermission(SystemPermission.Type permission) throws org.glyptodon.guacamole.GuacamoleException
SystemPermissionSethasPermission in interface SystemPermissionSetpermission - The permission to check.org.glyptodon.guacamole.GuacamoleException - If an error occurs while checking permissions, or if permissions
cannot be checked due to lack of permissions to do so.public void addPermission(SystemPermission.Type permission) throws org.glyptodon.guacamole.GuacamoleException
SystemPermissionSetaddPermission in interface SystemPermissionSetpermission - The permission to add.org.glyptodon.guacamole.GuacamoleException - If an error occurs while adding the permission, or if permission to
add permissions is denied.public void removePermission(SystemPermission.Type permission) throws org.glyptodon.guacamole.GuacamoleException
SystemPermissionSetremovePermission in interface SystemPermissionSetpermission - The permission to remove.org.glyptodon.guacamole.GuacamoleException - If an error occurs while removing the permission, or if permission
to remove permissions is denied.public void addPermissions(Set<SystemPermission> permissions) throws org.glyptodon.guacamole.GuacamoleException
PermissionSetaddPermissions in interface PermissionSet<SystemPermission>addPermissions in interface SystemPermissionSetpermissions - The permissions to add.org.glyptodon.guacamole.GuacamoleException - If an error occurs while adding the permissions, or if permission to
add permissions is denied.public void removePermissions(Set<SystemPermission> permissions) throws org.glyptodon.guacamole.GuacamoleException
PermissionSetremovePermissions in interface PermissionSet<SystemPermission>removePermissions in interface SystemPermissionSetpermissions - The permissions to remove.org.glyptodon.guacamole.GuacamoleException - If an error occurs while removing the permissions, or if permission
to remove permissions is denied.Copyright © 2015. All rights reserved.