public class KeyValueCollectionPermission extends CollectionPermission
action, CREATE_ACTION, DELETE_ACTION, PERMISSION_END_MSG, PERMISSION_IMPLIES_MSG, PERMISSION_NOT_IMPLIES_MSG, PERMISSION_START_MSG, permissionList, READ_ACTION, UNKNOWN_ACTION, UPDATE_ACTION
Constructor and Description |
---|
KeyValueCollectionPermission()
Creates an empty collection that can hold KeyValuePermission objects.
|
KeyValueCollectionPermission(String action)
Creates an empty collection with an associated action
|
KeyValueCollectionPermission(String action,
Collection<KeyValuePermission> permissions)
Creates a new collection of KeyValuePermission objects from an existing collection of
KeyValuePermission objects.
|
KeyValueCollectionPermission(String action,
KeyValuePermission... permissions)
Creates a new collection of KeyValuePermission objects and adds the provided permissions to the
newly created collection.
|
KeyValueCollectionPermission(String action,
Map<String,? extends Collection<String>> map)
Creates a new collection of KeyValuePermission objects from an existing map of keys and values.
|
Modifier and Type | Method and Description |
---|---|
void |
addAll(Map<String,? extends Collection<String>> map)
Adds all of the incoming key value map entries to this KeyValueCollectionPermission.
|
<T> List<T> |
getKeyValuePermissionList()
Returns the KeyValuePermission collection as a List of KeyValuePermission objects.
|
addAll, clear, getAction, getPermissionList, implies, isEmpty, setAction, toString
public KeyValueCollectionPermission()
public KeyValueCollectionPermission(String action)
action
- public KeyValueCollectionPermission(String action, KeyValuePermission... permissions)
action
- Action associated with this collection of permissionspermissions
- KeyValuePermission objects to be added to the newly created collectionpublic KeyValueCollectionPermission(String action, Map<String,? extends Collection<String>> map)
action
- Action associated with this collection of permissionsmap
- collection of keys and their associated list of values to be added to the newly
created collectionpublic KeyValueCollectionPermission(String action, Collection<KeyValuePermission> permissions)
action
- Action associated with this collection of permissionspermissions
- existing collection of KeyValuePermission objectspublic <T> List<T> getKeyValuePermissionList()
T
- specified by the type of the calling object - should be KeyValuePermission to avoid
class cast exceptionspublic void addAll(Map<String,? extends Collection<String>> map)
map
- collection of keys and their associated list of values to be added to the newly
created collectionThis work is licensed under a Creative Commons Attribution 4.0 International License.