public class MGoal extends MClassBasedElement
Modifier and Type | Field and Description |
---|---|
static String |
CONDITION_CONTEXT
Goal context condition name.
|
static String |
CONDITION_CREATION
Goal creation condition name.
|
static String |
CONDITION_DROP
Goal drop condition name.
|
static String |
CONDITION_MAINTAIN
Goal maintain condition name.
|
static String |
CONDITION_RECUR
Goal recur condition name.
|
static String |
CONDITION_TARGET
Goal target condition name.
|
static String |
EXCLUDE_NEVER
Never exclude plan candidates from apl.
|
static String |
EXCLUDE_WHEN_FAILED
Exclude failed plan candidates from apl.
|
static String |
EXCLUDE_WHEN_SUCCEEDED
Exclude succeeded plan candidates from apl.
|
static String |
EXCLUDE_WHEN_TRIED
Exclude tried plan candidates from apl.
|
CAPABILITY_SEPARATOR
Constructor and Description |
---|
MGoal(String name,
String target,
boolean posttoall,
boolean randomselection,
String excludemode,
boolean retry,
boolean recur,
long retrydelay,
long recurdelay,
boolean orsuccess,
boolean unique,
MDeliberation deliberation,
List<MParameter> parameters,
Map<String,MethodInfo> spmappings,
Map<String,MethodInfo> srmappings,
List<ClassInfo> triggergoals)
Create a new goal model element.
|
Modifier and Type | Method and Description |
---|---|
void |
addCondition(String type,
MCondition cond)
Add a condition to the goal.
|
void |
addServiceParameterMapping(String name,
MethodInfo m) |
void |
addServiceResultMapping(String name,
MethodInfo m) |
Object |
createPojoInstance(BDIAgentInterpreter ip,
RGoal parent)
Create a pojo goal instance.
|
Map<String,List<MCondition>> |
getConditions()
Get all conditions.
|
List<MCondition> |
getConditions(String type)
Get the conditions of a type.
|
MDeliberation |
getDeliberation()
Get the deliberation.
|
MParameter |
getParameter(String name)
Get a parameter by name.
|
List<MParameter> |
getParameters()
Get the parameters.
|
Object |
getPojoResultReadAccess(ClassLoader cl)
Get the pojo result access, i.e.
|
Object |
getPojoResultWriteAccess(ClassLoader cl)
Get the pojo result write access, i.e.
|
long |
getRecurDelay()
Get the retry delay.
|
long |
getRetryDelay()
Get the retry delay.
|
MethodInfo |
getServiceParameterMapping(String name) |
Map<String,MethodInfo> |
getServiceParameterMappings()
Get the spmappings.
|
MethodInfo |
getServiceResultMapping(String name)
Get the service result mapping.
|
Map<String,MethodInfo> |
getServiceResultMappings()
Get the srmappings.
|
List<ClassInfo> |
getTriggerGoals()
Get the triggergoals.
|
List<MGoal> |
getTriggerMGoals(MCapability mcapa)
Get the triggergoals.
|
boolean |
hasParameter(String name)
Test if goal has a parameter.
|
boolean |
isDeclarative()
Get the declarative.
|
boolean |
isOrSuccess()
Get the flag if is or success.
|
boolean |
isRecur()
Test if is recur.
|
boolean |
isRetry()
Test if is retry.
|
boolean |
isUnique()
Get the unique.
|
void |
setOrSuccess(boolean orsuccess)
Set the or success.
|
void |
setParameters(List<MParameter> parameters)
Set the parameters.
|
void |
setTriggerGoals(List<ClassInfo> triggergoals)
Set the triggergoals.
|
void |
setUnique(boolean unique)
Set the unique.
|
equals, getTarget, getTargetClass, hashCode, setTarget
getExcludeMode, isPostToAll, isRandomSelection, isRebuild, setExcludeMode, setPostToAll, setRandomSelection, setRebuild
getCapabilityName, getName, setName
public static final String CONDITION_CREATION
public static final String CONDITION_DROP
public static final String CONDITION_TARGET
public static final String CONDITION_MAINTAIN
public static final String CONDITION_CONTEXT
public static final String CONDITION_RECUR
public static final String EXCLUDE_NEVER
public static final String EXCLUDE_WHEN_TRIED
public static final String EXCLUDE_WHEN_FAILED
public static final String EXCLUDE_WHEN_SUCCEEDED
public MGoal(String name, String target, boolean posttoall, boolean randomselection, String excludemode, boolean retry, boolean recur, long retrydelay, long recurdelay, boolean orsuccess, boolean unique, MDeliberation deliberation, List<MParameter> parameters, Map<String,MethodInfo> spmappings, Map<String,MethodInfo> srmappings, List<ClassInfo> triggergoals)
public boolean isRetry()
public long getRetryDelay()
public boolean isRecur()
public long getRecurDelay()
public boolean isOrSuccess()
public void setOrSuccess(boolean orsuccess)
orsuccess
- The or success flag..public boolean isUnique()
public void setUnique(boolean unique)
unique
- The unique to set.public MDeliberation getDeliberation()
public boolean isDeclarative()
public Object getPojoResultReadAccess(ClassLoader cl)
public Object getPojoResultWriteAccess(ClassLoader cl)
public Object createPojoInstance(BDIAgentInterpreter ip, RGoal parent)
public void addCondition(String type, MCondition cond)
public List<MCondition> getConditions(String type)
public Map<String,List<MCondition>> getConditions()
public List<MParameter> getParameters()
public MParameter getParameter(String name)
public boolean hasParameter(String name)
public void setParameters(List<MParameter> parameters)
parameters
- The parameters to set.public void addServiceParameterMapping(String name, MethodInfo m)
public MethodInfo getServiceParameterMapping(String name)
public void addServiceResultMapping(String name, MethodInfo m)
public MethodInfo getServiceResultMapping(String name)
public Map<String,MethodInfo> getServiceParameterMappings()
public Map<String,MethodInfo> getServiceResultMappings()
public List<ClassInfo> getTriggerGoals()
public void setTriggerGoals(List<ClassInfo> triggergoals)
triggergoals
- The triggergoals to set.public List<MGoal> getTriggerMGoals(MCapability mcapa)
Copyright © 2015. All Rights Reserved.