|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.scripting.condition.ScriptableCondition
public class ScriptableCondition
ScriptableCondition allows for custom actions. You set the script via setScript(String ) - it must contain a function matches(model, chunk, bindings) { return {true | false}; }
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_SCRIPT
Description of the Field |
| Constructor Summary | |
|---|---|
ScriptableCondition()
Constructor for the ScriptableCondition object |
|
ScriptableCondition(java.lang.String script)
Constructor for the ScriptableCondition object |
|
| Method Summary | |
|---|---|
int |
bind(IModel model,
java.util.Map<java.lang.String,java.lang.Object> variableBindings,
boolean isIterative)
Iteratively perform the resolution and binding for this condition. |
ScriptableCondition |
clone(IModel model,
java.util.Map<java.lang.String,java.lang.Object> bindings)
attempt to clone this condition before it will be bound in the instantiation phase. |
void |
dispose()
Description of the Method |
java.lang.String |
getScript()
Gets the script attribute of the ScriptableCondition object |
void |
setScriptString(java.lang.String str)
Sets the script attribute of the ScriptableCondition object |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_SCRIPT
| Constructor Detail |
|---|
public ScriptableCondition()
public ScriptableCondition(java.lang.String script)
script - Description of the Parameter| Method Detail |
|---|
public ScriptableCondition clone(IModel model,
java.util.Map<java.lang.String,java.lang.Object> bindings)
throws CannotMatchException
ICondition
clone in interface IConditionCannotMatchException - if there is no way this condition can be matchedpublic void dispose()
dispose in interface IConditionpublic java.lang.String getScript()
public void setScriptString(java.lang.String str)
str - The new script value
public int bind(IModel model,
java.util.Map<java.lang.String,java.lang.Object> variableBindings,
boolean isIterative)
throws CannotMatchException
ICondition
bind in interface IConditionCannotMatchException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||