public interface PolicyService
Policy instances.
 Each Policy is stored under a unique name, for which there may be
 several other Policy instances. Consumers can either check whether
 such a policy restriction is active via
 isRestricted(String, IObject) or let an exception be thrown by the
 Policy itself via checkRestriction(String, IObject).
 Further, the list of currently active restrictions can be provided in bulk to
 clients via listActiveRestrictions(IObject) so that restricted
 operations need not be called only to have an exception thrown.| Modifier and Type | Method and Description | 
|---|---|
| void | checkRestriction(String name,
                IObject obj)Give each configured  Policyinstance the chance to throw aSecurityViolationfrom itsPolicy.checkRestriction(IObject)method. | 
| boolean | isRestricted(String name,
            IObject obj) | 
| Set<String> | listActiveRestrictions(IObject obj)Return all identifier strings as would be passed as the first argument to
  isRestricted(String, IObject)orcheckRestriction(String, IObject)which considers
 itself active for the given argument. | 
| Set<String> | listAllRestrictions()Return all configured identifier strings as would be passed as the first
 argument to  isRestricted(String, IObject)orcheckRestriction(String, IObject). | 
boolean isRestricted(String name, IObject obj)
Policy instance with the given name argument
 if it considers the restriction active for the given IObject
 argument. If any are active, return true.name - non-null identifier of a class of Policy instances.obj - non-null "context" for this check.Policy returns true from
         Policy.isRestricted(IObject).void checkRestriction(String name, IObject obj) throws SecurityViolation
Policy instance the chance to throw a
 SecurityViolation from its
 Policy.checkRestriction(IObject) method.name - non-null identifier of a class of Policy instances.obj - non-null "context" for this check.SecurityViolationSet<String> listAllRestrictions()
isRestricted(String, IObject) or
 checkRestriction(String, IObject).Set<String> listActiveRestrictions(IObject obj)
isRestricted(String, IObject) or
 checkRestriction(String, IObject) which considers
 itself active for the given argument.obj - non-null context passed to each Policy instance.Permissions.copyExtendedRestrictions()
         .
                
                
Version: 5.2.1-ice35-b15
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.