Class KeyValueCollectionPermissionImpl

java.lang.Object
ddf.security.permission.impl.CollectionPermissionImpl
ddf.security.permission.impl.KeyValueCollectionPermissionImpl
All Implemented Interfaces:
ddf.security.permission.CollectionPermission, ddf.security.permission.KeyValueCollectionPermission, org.apache.shiro.authz.Permission

public class KeyValueCollectionPermissionImpl extends CollectionPermissionImpl implements ddf.security.permission.KeyValueCollectionPermission
An extension of ColectionPermission that exclusively holds KeyValuePermission objects.
  • Constructor Details

    • KeyValueCollectionPermissionImpl

      public KeyValueCollectionPermissionImpl()
      Creates an empty collection that can hold KeyValuePermission objects.
    • KeyValueCollectionPermissionImpl

      public KeyValueCollectionPermissionImpl(String action)
      Creates an empty collection with an associated action
      Parameters:
      action -
    • KeyValueCollectionPermissionImpl

      public KeyValueCollectionPermissionImpl(String action, ddf.security.permission.KeyValuePermission... permissions)
      Creates a new collection of KeyValuePermission objects and adds the provided permissions to the newly created collection.
      Parameters:
      action - Action associated with this collection of permissions
      permissions - KeyValuePermission objects to be added to the newly created collection
    • KeyValueCollectionPermissionImpl

      public KeyValueCollectionPermissionImpl(String action, Map<String,? extends Collection<String>> map)
      Creates a new collection of KeyValuePermission objects from an existing map of keys and values. Each key and associated list of values is turned into a KeyValuePermission and added to the newly created collection.
      Parameters:
      action - Action associated with this collection of permissions
      map - collection of keys and their associated list of values to be added to the newly created collection
    • KeyValueCollectionPermissionImpl

      public KeyValueCollectionPermissionImpl(String action, Collection<ddf.security.permission.KeyValuePermission> permissions)
      Creates a new collection of KeyValuePermission objects from an existing collection of KeyValuePermission objects. All KeyValuePermission objects in the provided collection are added to the newly created collection.
      Parameters:
      action - Action associated with this collection of permissions
      permissions - existing collection of KeyValuePermission objects
  • Method Details

    • getKeyValuePermissionList

      public <T> List<T> getKeyValuePermissionList()
      Returns the KeyValuePermission collection as a List of KeyValuePermission objects.
      Specified by:
      getKeyValuePermissionList in interface ddf.security.permission.KeyValueCollectionPermission
      Type Parameters:
      T - specified by the type of the calling object - should be KeyValuePermission to avoid class cast exceptions
      Returns:
      List of KeyValuePermission that represent the permission in this collection
    • addAll

      public void addAll(Map<String,? extends Collection<String>> map)
      Adds all of the incoming key value map entries to this KeyValueCollectionPermission. Each key and associated list of values is turned into a KeyValuePermission and added to the newly created collection.
      Specified by:
      addAll in interface ddf.security.permission.KeyValueCollectionPermission
      Parameters:
      map - collection of keys and their associated list of values to be added to the newly created collection