public interface PermissionCollection
With a PermissionCollection, you can:
add
method.
implies
method.
elements
method.
Permission
Modifier and Type | Method and Description |
---|---|
PermissionCollection |
add(Permission... permissions)
Adds a permission object to the current collection of permission objects.
|
PermissionCollection |
clone()
Creates an exact copy of this instance.
|
Collection<Permission> |
collection()
Returns all the Permission objects in the collection.
|
Permission |
get(String name)
Gets a permission object matching the specified name.
|
boolean |
implies(Permission permission)
Checks to see if the specified permission is implied by
the collection of Permission objects held in this PermissionCollection.
|
boolean |
impliesName(Permission permission)
It returns true provided this collection already contains a permission which implies by name
(See
Permission.impliesName(Permission) ) the permission passed as a parameter. |
PermissionCollection |
merge(PermissionCollection other,
int priority)
Get all the permissions from this collection and the given one and puts them
into a brand new collection instance.
|
PermissionCollection |
remove(Permission... permissions)
Removes a permission object from the current collection of permission objects.
|
PermissionCollection add(Permission... permissions)
permissions
- the Permission objects to add.PermissionCollection remove(Permission... permissions)
permissions
- the Permission objects to remove.Permission get(String name)
name
- The fully qualified name of the permission.Collection<Permission> collection()
boolean implies(Permission permission)
permission
- the Permission object to compare.boolean impliesName(Permission permission)
Permission.impliesName(Permission)
) the permission passed as a parameter.permission
- the permission to checkPermissionCollection merge(PermissionCollection other, int priority)
priority
parameter is taken into account in case
the same permission is present in both collections.other
- the collection to merge.priority
- integer indicating what to do if the same permission is found in both collections:
PermissionCollection clone()
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.