public class BinaryAccessPolicy extends BasePolicy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
This string can also be found in the Constants.ice file in the
blitz package.
|
types
Constructor and Description |
---|
BinaryAccessPolicy(java.util.Set<java.lang.Class<ome.model.IObject>> types,
ACLVoter voter) |
BinaryAccessPolicy(java.util.Set<java.lang.Class<ome.model.IObject>> types,
ACLVoter voter,
java.lang.String[] config) |
Modifier and Type | Method and Description |
---|---|
void |
checkRestriction(ome.model.IObject obj)
Like
Policy.isRestricted(IObject) but throws an appropriate
SecurityViolation subclass if the restriction is active. |
java.lang.String |
getName()
Unique name for a class of restrictions that this
Policy
will enforce. |
protected java.util.Set<java.lang.String> |
groupRestrictions(ome.model.IObject obj) |
boolean |
isRestricted(ome.model.IObject obj)
Checks whether or not this instance would throw a
SecurityViolation if the same instance were passed to
Policy.checkRestriction(IObject) . |
getTypes
public static final java.lang.String NAME
public BinaryAccessPolicy(java.util.Set<java.lang.Class<ome.model.IObject>> types, ACLVoter voter)
public BinaryAccessPolicy(java.util.Set<java.lang.Class<ome.model.IObject>> types, ACLVoter voter, java.lang.String[] config)
public java.lang.String getName()
Policy
Policy
will enforce. This string will be sent to clients via
Permissions.copyExtendedRestrictions()
in
order to prevent exceptions, and server-code will pass the same name
to the check method to potentially have an exception thrown.getName
in interface Policy
getName
in class BasePolicy
public boolean isRestricted(ome.model.IObject obj)
Policy
SecurityViolation
if the same instance were passed to
Policy.checkRestriction(IObject)
. This is likely determined by first
testing the type of the IObject
and then that the
current user context has access to the given context.isRestricted
in interface Policy
isRestricted
in class BasePolicy
obj
- a non-null IObject
instance.Policy
decides that a restriction should be
placed on the passed context.protected java.util.Set<java.lang.String> groupRestrictions(ome.model.IObject obj)
public void checkRestriction(ome.model.IObject obj)
Policy
Policy.isRestricted(IObject)
but throws an appropriate
SecurityViolation
subclass if the restriction is active.checkRestriction
in interface Policy
checkRestriction
in class BasePolicy