public interface Policy
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
addPermission(Permission permission)
Adds a permission to this policy.
|
java.util.List<Permission> |
getPermissions()
Gets the permissions associated to this policy
|
java.lang.String |
getPolicyName()
Gets the name of this policy
|
boolean |
hasPermissions(java.util.List<java.lang.String> permissions)
Checks whether this policy has ALL the given permissions
|
void |
removePermission(Permission permission)
Removes the given permission from this policy
|
void |
setPermissions(java.util.List<Permission> permissions)
Replaces the permissions associated to this policy
|
void |
setPolicyName(java.lang.String policyName)
Replaces the name of this policy
|
void addPermission(Permission permission)
permission
- the permission to addjava.util.List<Permission> getPermissions()
java.lang.String getPolicyName()
boolean hasPermissions(java.util.List<java.lang.String> permissions)
permissions
- the set of permissions to checktrue
or false
depending on wether ALL the
permissions were foundvoid removePermission(Permission permission)
permission
- the permission to removevoid setPermissions(java.util.List<Permission> permissions)
permissions
- the new set of permissionsvoid setPolicyName(java.lang.String policyName)
policyName
- the new name of this policy