Package jadex.bdi.model
Class MGoal
Goal model.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.common.MethodInfo
The method info for building apl.static final String
Goal context condition name.static final String
Goal creation condition name.static final String
Goal drop condition name.static final String
Goal maintain condition name.static final String
Goal recur condition name.static final String
Goal target condition name.protected Map
<String, List<MCondition>> The goal conditions.protected MDeliberation
The deliberation.The unique parameter excludes.protected jadex.common.MethodInfo
The method info for the finished callback.protected boolean
The metagoal flag.protected boolean
The procedual success flag.protected Object
The pojo result access (field or method).protected Object
protected boolean
The recur flag.protected long
The recur delay.protected List
<MParameter> The unique relevant attributesprotected boolean
The retry flag.protected long
The retry delay.protected jadex.common.MethodInfo
The method info for selecting (a) plan cadidate(s).The goal service parameter mappings.The goal service result mappings.protected MTrigger
The trigger (other goals) if this goal is used as plan.protected boolean
The unique.Fields inherited from class jadex.bdi.model.MClassBasedElement
lastcl, target, targetclass
Fields inherited from class jadex.bdi.model.MProcessableElement
excludemode, exported, posttoall, randomselection, rebuild
Fields inherited from class jadex.bdi.model.MParameterElement
parameters
Fields inherited from class jadex.bdi.model.MElement
CAPABILITY_SEPARATOR, description, name
-
Constructor Summary
ConstructorsConstructorDescriptionMGoal()
Bean Constructor.MGoal
(String name, String target, boolean posttoall, boolean rebuild, boolean randomselection, ExcludeMode excludemode, boolean retry, boolean recur, long retrydelay, long recurdelay, boolean orsuccess, boolean unique, MDeliberation deliberation, List<MParameter> parameters, Map<String, jadex.common.MethodInfo> spmappings, Map<String, jadex.common.MethodInfo> srmappings, MTrigger trigger) Create a new goal model element. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCondition
(String type, MCondition cond) Add a condition to the goal.void
addExclude
(String paramname) Add an excluded parametervoid
addServiceParameterMapping
(String name, jadex.common.MethodInfo m) void
addServiceResultMapping
(String name, jadex.common.MethodInfo m) createPojoInstance
(RGoal parent) Create a pojo goal instance.jadex.common.MethodInfo
Get the build apl method.Get all conditions.getConditions
(String type) Get the conditions of a type.Get the deliberation.Get the excludes.jadex.common.MethodInfo
Get the goal finished callback method.Get the pojo result access, i.e.Get the pojo result write access, i.e.long
Get the retry delay.Get the parameters which are relevant for comparing goals.long
Get the retry delay.jadex.common.MethodInfo
Get the select candiate method.jadex.common.MethodInfo
Get the spmappings.jadex.common.MethodInfo
Get the service result mapping.Get the srmappings.Get the trigger.boolean
Get the declarative.boolean
Get the metagoal.boolean
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
setDeliberation
(MDeliberation deliberation) The deliberation to set.void
setExcludes
(Set<String> excludes) The excludes to set.void
setMetagoal
(boolean metagoal) The metagoal to set.void
setOrSuccess
(boolean orsuccess) Set the or success.void
setRecur
(boolean recur) The recur to set.void
setRecurdelay
(long recurdelay) The recurdelay to set.void
setRetry
(boolean retry) The retry to set.void
setRetrydelay
(long retrydelay) The retrydelay to set.void
setTrigger
(MTrigger trigger) Set the trigger.void
setUnique
(boolean unique) Set the unique.Methods inherited from class jadex.bdi.model.MClassBasedElement
equals, getTarget, getTargetClass, hashCode, setTarget
Methods inherited from class jadex.bdi.model.MProcessableElement
getExcludeMode, isExported, isPostToAll, isRandomSelection, isRebuild, setExcludeMode, setExported, setPostToAll, setRandomSelection, setRebuild
Methods inherited from class jadex.bdi.model.MParameterElement
addParameter, getParameter, getParameters, hasParameter, hasParameterIgnoreCase, setParameters
Methods inherited from class jadex.bdi.model.MElement
getCapabilityName, getDescription, getElementName, getName, internalName, setDescription, setFlatName, setName, toString
-
Field Details
-
CONDITION_CREATION
Goal creation condition name.- See Also:
-
CONDITION_DROP
Goal drop condition name.- See Also:
-
CONDITION_TARGET
Goal target condition name.- See Also:
-
CONDITION_MAINTAIN
Goal maintain condition name.- See Also:
-
CONDITION_CONTEXT
Goal context condition name.- See Also:
-
CONDITION_RECUR
Goal recur condition name.- See Also:
-
retry
protected boolean retryThe retry flag. -
recur
protected boolean recurThe recur flag. -
retrydelay
protected long retrydelayThe retry delay. -
recurdelay
protected long recurdelayThe recur delay. -
orsuccess
protected boolean orsuccessThe procedual success flag. -
unique
protected boolean uniqueThe unique. -
metagoal
protected boolean metagoalThe metagoal flag. -
deliberation
The deliberation. -
trigger
The trigger (other goals) if this goal is used as plan. -
pojoresultreadaccess
The pojo result access (field or method). -
pojoresultwriteaccess
-
conditions
The goal conditions. -
spmappings
The goal service parameter mappings. -
srmappings
The goal service result mappings. -
buildaplmethod
protected jadex.common.MethodInfo buildaplmethodThe method info for building apl. -
selectcandidatemethod
protected jadex.common.MethodInfo selectcandidatemethodThe method info for selecting (a) plan cadidate(s). -
finishedmethod
protected jadex.common.MethodInfo finishedmethodThe method info for the finished callback. -
relevants
The unique relevant attributes -
excludes
The unique parameter excludes.
-
-
Constructor Details
-
MGoal
public MGoal()Bean Constructor. -
MGoal
public MGoal(String name, String target, boolean posttoall, boolean rebuild, boolean randomselection, ExcludeMode excludemode, boolean retry, boolean recur, long retrydelay, long recurdelay, boolean orsuccess, boolean unique, MDeliberation deliberation, List<MParameter> parameters, Map<String, jadex.common.MethodInfo> spmappings, Map<String, jadex.common.MethodInfo> srmappings, MTrigger trigger) Create a new goal model element.
-
-
Method Details
-
isRetry
public boolean isRetry()Test if is retry.- Returns:
- True, if is retry.
-
setRetry
public void setRetry(boolean retry) The retry to set.- Parameters:
retry
- The retry to set
-
getRetryDelay
public long getRetryDelay()Get the retry delay.- Returns:
- The retry delay.
-
setRetrydelay
public void setRetrydelay(long retrydelay) The retrydelay to set.- Parameters:
retrydelay
- The retrydelay to set
-
isRecur
public boolean isRecur()Test if is recur.- Returns:
- True, if is recur.
-
setRecur
public void setRecur(boolean recur) The recur to set.- Parameters:
recur
- The recur to set
-
getRecurDelay
public long getRecurDelay()Get the retry delay.- Returns:
- The retry delay.
-
setRecurdelay
public void setRecurdelay(long recurdelay) The recurdelay to set.- Parameters:
recurdelay
- The recurdelay to set
-
isOrSuccess
public boolean isOrSuccess()Get the flag if is or success.- Returns:
- The or success flag..
-
setOrSuccess
public void setOrSuccess(boolean orsuccess) Set the or success.- Parameters:
orsuccess
- The or success flag..
-
isUnique
public boolean isUnique()Get the unique.- Returns:
- The unique.
-
setUnique
public void setUnique(boolean unique) Set the unique.- Parameters:
unique
- The unique to set.
-
getDeliberation
Get the deliberation.- Returns:
- The deliberation.
-
setDeliberation
The deliberation to set.- Parameters:
deliberation
- The deliberation to set
-
isDeclarative
public boolean isDeclarative()Get the declarative.- Returns:
- The declarative.
-
getPojoResultReadAccess
Get the pojo result access, i.e. the method or field annotated with @GoalResult. -
getPojoResultWriteAccess
Get the pojo result write access, i.e. the method or field annotated with @GoalResult. -
createPojoInstance
Create a pojo goal instance. -
addCondition
Add a condition to the goal. -
getConditions
Get the conditions of a type. -
getConditions
Get all conditions. -
addServiceParameterMapping
-
getServiceParameterMapping
-
addServiceResultMapping
-
getServiceResultMapping
Get the service result mapping. -
getServiceParameterMappings
Get the spmappings.- Returns:
- The spmappings.
-
getServiceResultMappings
Get the srmappings.- Returns:
- The srmappings.
-
getTrigger
Get the trigger.- Returns:
- The trigger.
-
setTrigger
Set the trigger.- Parameters:
trigger
- The trigger to set.
-
getBuildAPLMethod
Get the build apl method. -
getSelectCandidateMethod
Get the select candiate method. -
getFinishedMethod
Get the goal finished callback method. -
isMetagoal
public boolean isMetagoal()Get the metagoal.- Returns:
- The metagoal
-
setMetagoal
public void setMetagoal(boolean metagoal) The metagoal to set.- Parameters:
metagoal
- The metagoal to set
-
getRelevantParameters
Get the parameters which are relevant for comparing goals. -
getExcludes
Get the excludes. Parameters not used in unique checks.- Returns:
- The excludes
-
setExcludes
The excludes to set. Parameters not used in unique checks.- Parameters:
excludes
- The excludes to set
-
addExclude
Add an excluded parameter
-