Package ddf.security.permission.impl
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
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.
-
Field Summary
Fields inherited from class ddf.security.permission.impl.CollectionPermissionImpl
action, permissionListFields inherited from interface ddf.security.permission.CollectionPermission
CREATE_ACTION, DELETE_ACTION, PERMISSION_END_MSG, PERMISSION_IMPLIES_MSG, PERMISSION_NOT_IMPLIES_MSG, PERMISSION_START_MSG, READ_ACTION, UNKNOWN_ACTION, UPDATE_ACTION -
Constructor Summary
ConstructorsConstructorDescriptionMatchOneCollectionPermission(Collection<org.apache.shiro.authz.Permission> permissions) -
Method Summary
Modifier and TypeMethodDescriptionbooleanimplies(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.Methods inherited from class ddf.security.permission.impl.CollectionPermissionImpl
addAll, clear, getAction, getPermissionList, isEmpty, setAction, toString
-
Constructor Details
-
MatchOneCollectionPermission
-
-
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:
impliesin interfaceorg.apache.shiro.authz.Permission- Overrides:
impliesin classCollectionPermissionImpl- Parameters:
p- the permission to check for behavior/functionality comparison.- Returns:
trueif this current instance implies the specifiedPermissionargument,falseotherwise.
-