@Portable public class DefaultPermissionCollection extends Object implements PermissionCollection
| Constructor and Description |
|---|
DefaultPermissionCollection() |
| Modifier and Type | Method and Description |
|---|---|
PermissionCollection |
add(Permission... permissions)
Adds a permission object to the current collection of permission objects.
|
DefaultPermissionCollection |
clone()
Creates an exact copy of this instance.
|
Collection<Permission> |
collection()
Returns all the Permission objects in the collection.
|
protected boolean |
equalsName(String s1,
String s2) |
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 |
invert(Permission target) |
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.
|
String |
toString() |
public Collection<Permission> collection()
PermissionCollectioncollection in interface PermissionCollectionpublic PermissionCollection add(Permission... permissions)
PermissionCollectionadd in interface PermissionCollectionpermissions - the Permission objects to add.public PermissionCollection remove(Permission... permissions)
PermissionCollectionremove in interface PermissionCollectionpermissions - the Permission objects to remove.public Permission get(String name)
PermissionCollectionget in interface PermissionCollectionname - The fully qualified name of the permission.public boolean implies(Permission permission)
PermissionCollectionimplies in interface PermissionCollectionpermission - the Permission object to compare.public boolean impliesName(Permission permission)
PermissionCollectionPermission.impliesName(Permission)) the permission passed as a parameter.impliesName in interface PermissionCollectionpermission - the permission to checkpublic PermissionCollection merge(PermissionCollection other, int priority)
PermissionCollectionpriority parameter is taken into account in case
the same permission is present in both collections.merge in interface PermissionCollectionother - the collection to merge.priority - integer indicating what to do if the same permission is found in both collections:
public DefaultPermissionCollection clone()
PermissionCollectionclone in interface PermissionCollectionclone in class Objectpublic PermissionCollection invert(Permission target)
Copyright © 2012–2016 JBoss by Red Hat. All rights reserved.