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.MProcessableElementMProcessableElement.ExcludeMode
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected MethodInfobuildaplmethodThe method info for building apl.static java.lang.StringCONDITION_CONTEXTGoal context condition name.static java.lang.StringCONDITION_CREATIONGoal creation condition name.static java.lang.StringCONDITION_DROPGoal drop condition name.static java.lang.StringCONDITION_MAINTAINGoal maintain condition name.static java.lang.StringCONDITION_RECURGoal recur condition name.static java.lang.StringCONDITION_TARGETGoal target condition name.protected java.util.Map<java.lang.String,java.util.List<MCondition>>conditionsThe goal conditions.protected MDeliberationdeliberationThe deliberation.protected java.util.Set<java.lang.String>excludesThe unique parameter excludes.protected MethodInfofinishedmethodThe method info for the finished callback.protected booleanmetagoalThe metagoal flag.protected booleanorsuccessThe procedual success flag.protected java.lang.ObjectpojoresultreadaccessThe pojo result access (field or method).protected java.lang.Objectpojoresultwriteaccessprotected booleanrecurThe recur flag.protected longrecurdelayThe recur delay.protected java.util.List<MParameter>relevantsThe unique relevant attributesprotected booleanretryThe retry flag.protected longretrydelayThe retry delay.protected MethodInfoselectcandidatemethodThe method info for selecting (a) plan cadidate(s).protected java.util.Map<java.lang.String,MethodInfo>spmappingsThe goal service parameter mappings.protected java.util.Map<java.lang.String,MethodInfo>srmappingsThe goal service result mappings.protected MTriggertriggerThe trigger (other goals) if this goal is used as plan.protected booleanuniqueThe unique.- 
Fields inherited from class jadex.bdiv3.model.MClassBasedElementlastcl, target, targetclass
 - 
Fields inherited from class jadex.bdiv3.model.MProcessableElementexcludemode, exported, modes, posttoall, randomselection, rebuild
 - 
Fields inherited from class jadex.bdiv3.model.MParameterElementparameters
 - 
Fields inherited from class jadex.bdiv3.model.MElementCAPABILITY_SEPARATOR, description, name
 
- 
 - 
Constructor SummaryConstructors 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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCondition(java.lang.String type, MCondition cond)Add a condition to the goal.voidaddExclude(java.lang.String paramname)Add an excluded parametervoidaddServiceParameterMapping(java.lang.String name, MethodInfo m)voidaddServiceResultMapping(java.lang.String name, MethodInfo m)java.lang.ObjectcreatePojoInstance(IInternalAccess ip, jadex.bdiv3.runtime.impl.RGoal parent)Create a pojo goal instance.MethodInfogetBuildAPLMethod(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.MDeliberationgetDeliberation()Get the deliberation.java.util.Set<java.lang.String>getExcludes()Get the excludes.MethodInfogetFinishedMethod(java.lang.ClassLoader cl)Get the goal finished callback method.java.lang.ObjectgetPojoResultReadAccess(java.lang.ClassLoader cl)Get the pojo result access, i.e.java.lang.ObjectgetPojoResultWriteAccess(java.lang.ClassLoader cl)Get the pojo result write access, i.e.longgetRecurDelay()Get the retry delay.java.util.List<MParameter>getRelevantParameters()Get the parameters which are relevant for comparing goals.longgetRetryDelay()Get the retry delay.MethodInfogetSelectCandidateMethod(java.lang.ClassLoader cl)Get the select candiate method.MethodInfogetServiceParameterMapping(java.lang.String name)java.util.Map<java.lang.String,MethodInfo>getServiceParameterMappings()Get the spmappings.MethodInfogetServiceResultMapping(java.lang.String name)Get the service result mapping.java.util.Map<java.lang.String,MethodInfo>getServiceResultMappings()Get the srmappings.MTriggergetTrigger()Get the trigger.booleanisDeclarative()Get the declarative.booleanisMetagoal()Get the metagoal.booleanisOrSuccess()Get the flag if is or success.booleanisRecur()Test if is recur.booleanisRetry()Test if is retry.booleanisUnique()Get the unique.voidsetDeliberation(MDeliberation deliberation)The deliberation to set.voidsetExcludes(java.util.Set<java.lang.String> excludes)The excludes to set.voidsetMetagoal(boolean metagoal)The metagoal to set.voidsetOrSuccess(boolean orsuccess)Set the or success.voidsetRecur(boolean recur)The recur to set.voidsetRecurdelay(long recurdelay)The recurdelay to set.voidsetRetry(boolean retry)The retry to set.voidsetRetrydelay(long retrydelay)The retrydelay to set.voidsetTrigger(MTrigger trigger)Set the trigger.voidsetUnique(boolean unique)Set the unique.- 
Methods inherited from class jadex.bdiv3.model.MClassBasedElementequals, getTarget, getTargetClass, hashCode, setTarget
 - 
Methods inherited from class jadex.bdiv3.model.MProcessableElementgetExcludeMode, isExported, isPostToAll, isRandomSelection, isRebuild, setExcludeMode, setExported, setPostToAll, setRandomSelection, setRebuild
 - 
Methods inherited from class jadex.bdiv3.model.MParameterElementaddParameter, getParameter, getParameters, hasParameter, hasParameterIgnoreCase, setParameters
 - 
Methods inherited from class jadex.bdiv3.model.MElementgetCapabilityName, getDescription, getElementName, getName, internalName, setDescription, setFlatName, setName, toString
 
- 
 
- 
- 
- 
Field Detail- 
CONDITION_CREATIONpublic static final java.lang.String CONDITION_CREATION Goal creation condition name.- See Also:
- Constant Field Values
 
 - 
CONDITION_DROPpublic static final java.lang.String CONDITION_DROP Goal drop condition name.- See Also:
- Constant Field Values
 
 - 
CONDITION_TARGETpublic static final java.lang.String CONDITION_TARGET Goal target condition name.- See Also:
- Constant Field Values
 
 - 
CONDITION_MAINTAINpublic static final java.lang.String CONDITION_MAINTAIN Goal maintain condition name.- See Also:
- Constant Field Values
 
 - 
CONDITION_CONTEXTpublic static final java.lang.String CONDITION_CONTEXT Goal context condition name.- See Also:
- Constant Field Values
 
 - 
CONDITION_RECURpublic static final java.lang.String CONDITION_RECUR Goal recur condition name.- See Also:
- Constant Field Values
 
 - 
retryprotected boolean retry The retry flag.
 - 
recurprotected boolean recur The recur flag.
 - 
retrydelayprotected long retrydelay The retry delay.
 - 
recurdelayprotected long recurdelay The recur delay.
 - 
orsuccessprotected boolean orsuccess The procedual success flag.
 - 
uniqueprotected boolean unique The unique.
 - 
metagoalprotected boolean metagoal The metagoal flag.
 - 
deliberationprotected MDeliberation deliberation The deliberation.
 - 
triggerprotected MTrigger trigger The trigger (other goals) if this goal is used as plan.
 - 
pojoresultreadaccessprotected java.lang.Object pojoresultreadaccess The pojo result access (field or method).
 - 
pojoresultwriteaccessprotected java.lang.Object pojoresultwriteaccess 
 - 
conditionsprotected java.util.Map<java.lang.String,java.util.List<MCondition>> conditions The goal conditions.
 - 
spmappingsprotected java.util.Map<java.lang.String,MethodInfo> spmappings The goal service parameter mappings.
 - 
srmappingsprotected java.util.Map<java.lang.String,MethodInfo> srmappings The goal service result mappings.
 - 
buildaplmethodprotected MethodInfo buildaplmethod The method info for building apl.
 - 
selectcandidatemethodprotected MethodInfo selectcandidatemethod The method info for selecting (a) plan cadidate(s).
 - 
finishedmethodprotected MethodInfo finishedmethod The method info for the finished callback.
 - 
relevantsprotected java.util.List<MParameter> relevants The unique relevant attributes
 - 
excludesprotected java.util.Set<java.lang.String> excludes The unique parameter excludes.
 
- 
 - 
Constructor Detail- 
MGoalpublic MGoal() Bean Constructor.
 - 
MGoalpublic 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- 
isRetrypublic boolean isRetry() Test if is retry.- Returns:
- True, if is retry.
 
 - 
setRetrypublic void setRetry(boolean retry) The retry to set.- Parameters:
- retry- The retry to set
 
 - 
getRetryDelaypublic long getRetryDelay() Get the retry delay.- Returns:
- The retry delay.
 
 - 
setRetrydelaypublic void setRetrydelay(long retrydelay) The retrydelay to set.- Parameters:
- retrydelay- The retrydelay to set
 
 - 
isRecurpublic boolean isRecur() Test if is recur.- Returns:
- True, if is recur.
 
 - 
setRecurpublic void setRecur(boolean recur) The recur to set.- Parameters:
- recur- The recur to set
 
 - 
getRecurDelaypublic long getRecurDelay() Get the retry delay.- Returns:
- The retry delay.
 
 - 
setRecurdelaypublic void setRecurdelay(long recurdelay) The recurdelay to set.- Parameters:
- recurdelay- The recurdelay to set
 
 - 
isOrSuccesspublic boolean isOrSuccess() Get the flag if is or success.- Returns:
- The or success flag..
 
 - 
setOrSuccesspublic void setOrSuccess(boolean orsuccess) Set the or success.- Parameters:
- orsuccess- The or success flag..
 
 - 
isUniquepublic boolean isUnique() Get the unique.- Returns:
- The unique.
 
 - 
setUniquepublic void setUnique(boolean unique) Set the unique.- Parameters:
- unique- The unique to set.
 
 - 
getDeliberationpublic MDeliberation getDeliberation() Get the deliberation.- Returns:
- The deliberation.
 
 - 
setDeliberationpublic void setDeliberation(MDeliberation deliberation) The deliberation to set.- Parameters:
- deliberation- The deliberation to set
 
 - 
isDeclarativepublic boolean isDeclarative() Get the declarative.- Returns:
- The declarative.
 
 - 
getPojoResultReadAccesspublic java.lang.Object getPojoResultReadAccess(java.lang.ClassLoader cl) Get the pojo result access, i.e. the method or field annotated with @GoalResult.
 - 
getPojoResultWriteAccesspublic java.lang.Object getPojoResultWriteAccess(java.lang.ClassLoader cl) Get the pojo result write access, i.e. the method or field annotated with @GoalResult.
 - 
createPojoInstancepublic java.lang.Object createPojoInstance(IInternalAccess ip, jadex.bdiv3.runtime.impl.RGoal parent) Create a pojo goal instance.
 - 
addConditionpublic void addCondition(java.lang.String type, MCondition cond)Add a condition to the goal.
 - 
getConditionspublic java.util.List<MCondition> getConditions(java.lang.String type) Get the conditions of a type.
 - 
getConditionspublic java.util.Map<java.lang.String,java.util.List<MCondition>> getConditions() Get all conditions.
 - 
addServiceParameterMappingpublic void addServiceParameterMapping(java.lang.String name, MethodInfo m)
 - 
getServiceParameterMappingpublic MethodInfo getServiceParameterMapping(java.lang.String name) 
 - 
addServiceResultMappingpublic void addServiceResultMapping(java.lang.String name, MethodInfo m)
 - 
getServiceResultMappingpublic MethodInfo getServiceResultMapping(java.lang.String name) Get the service result mapping.
 - 
getServiceParameterMappingspublic java.util.Map<java.lang.String,MethodInfo> getServiceParameterMappings() Get the spmappings.- Returns:
- The spmappings.
 
 - 
getServiceResultMappingspublic java.util.Map<java.lang.String,MethodInfo> getServiceResultMappings() Get the srmappings.- Returns:
- The srmappings.
 
 - 
getTriggerpublic MTrigger getTrigger() Get the trigger.- Returns:
- The trigger.
 
 - 
setTriggerpublic void setTrigger(MTrigger trigger) Set the trigger.- Parameters:
- trigger- The trigger to set.
 
 - 
getBuildAPLMethodpublic MethodInfo getBuildAPLMethod(java.lang.ClassLoader cl) Get the build apl method.
 - 
getSelectCandidateMethodpublic MethodInfo getSelectCandidateMethod(java.lang.ClassLoader cl) Get the select candiate method.
 - 
getFinishedMethodpublic MethodInfo getFinishedMethod(java.lang.ClassLoader cl) Get the goal finished callback method.
 - 
isMetagoalpublic boolean isMetagoal() Get the metagoal.- Returns:
- The metagoal
 
 - 
setMetagoalpublic void setMetagoal(boolean metagoal) The metagoal to set.- Parameters:
- metagoal- The metagoal to set
 
 - 
getRelevantParameterspublic java.util.List<MParameter> getRelevantParameters() Get the parameters which are relevant for comparing goals.
 - 
getExcludespublic java.util.Set<java.lang.String> getExcludes() Get the excludes. Parameters not used in unique checks.- Returns:
- The excludes
 
 - 
setExcludespublic 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
 
 - 
addExcludepublic void addExclude(java.lang.String paramname) Add an excluded parameter
 
- 
 
-