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