public class Action extends Object
Operation
on an ObjectType
with certain properties, stored in a Map
.
The operation and object should be an allowable combination, based on the ObjectType.isAllowed(Operation)
method of the object, which is exposed as the isAllowed()
method here. The internal #propertiesMatch(Map)
and #valueMatches(String, String) methods are used to determine wildcarded matching of properties, with
the empty string or "*" matching all values, and "*" at the end of a rule value indicating prefix matching.
The matches(Action)
method is intended to be used when determining precedence of rules, and
equals(Object)
and hashCode()
are intended for use in maps. This is due to the wildcard matching
described above.
Constructor and Description |
---|
Action(Operation operation) |
Action(Operation operation,
ObjectType object) |
Action(Operation operation,
ObjectType object,
ObjectProperties properties) |
Action(Operation operation,
ObjectType object,
String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ObjectType |
getObjectType() |
Operation |
getOperation() |
ObjectProperties |
getProperties() |
int |
hashCode() |
boolean |
isAllowed() |
boolean |
matches(Action a) |
String |
toString() |
public Action(Operation operation)
public Action(Operation operation, ObjectType object, String name)
public Action(Operation operation, ObjectType object)
public Action(Operation operation, ObjectType object, ObjectProperties properties)
public Operation getOperation()
public ObjectType getObjectType()
public ObjectProperties getProperties()
public boolean isAllowed()
public boolean matches(Action a)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.