public interface AbstractPolicy extends Cloneable, Comparable<AbstractPolicy>
Modifier and Type | Method and Description |
---|---|
StatusObject<List<Object>> |
apply(PolicyAgentInterface agent,
Status status,
Vector<AbstractPolicy> policyContext,
Event event,
Map<String,LispObject> map,
Object eventInstanceInfo) |
AbstractPolicy |
clone() |
EventDescriptor |
getAntecedent() |
String |
getDoc() |
int |
getID() |
String |
getName()
Equivalent to getName(false)
|
String |
getName(boolean longVersion)
Returns either the long or short form of the name.
short form:name long form: name ({performative|*}:{act|*}) |
String |
getSourceFile() |
String |
getType() |
Status |
isApplicable(PolicyAgentInterface agent,
Event event,
Map<String,LispObject> map) |
boolean |
isGhost()
A ghost policy is a policy that shouldn't be counted as being applied.
|
void |
setGhost()
Declares this policy a ghost.
|
void |
setSourceFile(String source) |
String |
toString() |
String |
toString(int indent) |
Object |
updateAntecedent(PolicyAgentInterface agent,
Map<String,LispObject> map)
if there is an unevaluated antecedent, and the evaluation is a
EventDescriptor
then place this EventDescriptor in the antecedent. |
compareTo
String getName(boolean longVersion)
short form: | name |
long form: | name ({performative|*}:{act|*}) |
longVersion
- true indicates to long form is returnedint getID()
boolean isGhost()
void setGhost()
isGhost()
String getName()
String getType()
Status isApplicable(PolicyAgentInterface agent, Event event, Map<String,LispObject> map)
Object updateAntecedent(PolicyAgentInterface agent, Map<String,LispObject> map)
EventDescriptor
then place this EventDescriptor
in the antecedent. The return
value is not particularly meaningful, but it can be used to avoid performing
the evaluation multiple times as it is guaranteed to be the result of an
evaluation of the unevaluated antecedent if there is one.agent
- map
- symbols to be placed in the lisp environment during any evaluation.StatusObject<List<Object>> apply(PolicyAgentInterface agent, Status status, Vector<AbstractPolicy> policyContext, Event event, Map<String,LispObject> map, Object eventInstanceInfo) throws Exception, Throwable
String toString(int indent)
EventDescriptor getAntecedent()
void setSourceFile(String source)
String getSourceFile()
String getDoc()
AbstractPolicy clone()