Class MatchOneCollectionPermission

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

public class MatchOneCollectionPermission extends CollectionPermissionImpl
Permission class handling the match one case. Shiro permissions always "match all" attributes. This class extends the CollectionPermission and overrides the implies method to perform the implies for a "match one" condition.
  • Constructor Details

    • MatchOneCollectionPermission

      public MatchOneCollectionPermission(Collection<org.apache.shiro.authz.Permission> permissions)
  • Method Details

    • implies

      public boolean implies(org.apache.shiro.authz.Permission p)
      Overrides the implies method to handle checking for the existence of one attribute - the "match one" scenario rather than the "match all" behavior of the overridden classes. Specifically, this permission will imply another permission if that permission matches at least one of our permission attributes.
      Specified by:
      implies in interface org.apache.shiro.authz.Permission
      Overrides:
      implies in class CollectionPermissionImpl
      Parameters:
      p - the permission to check for behavior/functionality comparison.
      Returns:
      true if this current instance implies the specified Permission argument, false otherwise.