Class MGoal


public class MGoal extends MClassBasedElement
Goal model.
  • Field Details

    • CONDITION_CREATION

      public static final String CONDITION_CREATION
      Goal creation condition name.
      See Also:
    • CONDITION_DROP

      public static final String CONDITION_DROP
      Goal drop condition name.
      See Also:
    • CONDITION_TARGET

      public static final String CONDITION_TARGET
      Goal target condition name.
      See Also:
    • CONDITION_MAINTAIN

      public static final String CONDITION_MAINTAIN
      Goal maintain condition name.
      See Also:
    • CONDITION_CONTEXT

      public static final String CONDITION_CONTEXT
      Goal context condition name.
      See Also:
    • CONDITION_RECUR

      public static final String CONDITION_RECUR
      Goal recur condition name.
      See Also:
    • 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 Object pojoresultreadaccess
      The pojo result access (field or method).
    • pojoresultwriteaccess

      protected Object pojoresultwriteaccess
    • conditions

      protected Map<String,List<MCondition>> conditions
      The goal conditions.
    • spmappings

      protected Map<String,jadex.common.MethodInfo> spmappings
      The goal service parameter mappings.
    • srmappings

      protected Map<String,jadex.common.MethodInfo> srmappings
      The goal service result mappings.
    • buildaplmethod

      protected jadex.common.MethodInfo buildaplmethod
      The method info for building apl.
    • selectcandidatemethod

      protected jadex.common.MethodInfo selectcandidatemethod
      The method info for selecting (a) plan cadidate(s).
    • finishedmethod

      protected jadex.common.MethodInfo finishedmethod
      The method info for the finished callback.
    • relevants

      protected List<MParameter> relevants
      The unique relevant attributes
    • excludes

      protected Set<String> 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

      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 Object getPojoResultReadAccess(ClassLoader cl)
      Get the pojo result access, i.e. the method or field annotated with @GoalResult.
    • getPojoResultWriteAccess

      public Object getPojoResultWriteAccess(ClassLoader cl)
      Get the pojo result write access, i.e. the method or field annotated with @GoalResult.
    • createPojoInstance

      public Object createPojoInstance(RGoal parent)
      Create a pojo goal instance.
    • addCondition

      public void addCondition(String type, MCondition cond)
      Add a condition to the goal.
    • getConditions

      public List<MCondition> getConditions(String type)
      Get the conditions of a type.
    • getConditions

      public Map<String,List<MCondition>> getConditions()
      Get all conditions.
    • addServiceParameterMapping

      public void addServiceParameterMapping(String name, jadex.common.MethodInfo m)
    • getServiceParameterMapping

      public jadex.common.MethodInfo getServiceParameterMapping(String name)
    • addServiceResultMapping

      public void addServiceResultMapping(String name, jadex.common.MethodInfo m)
    • getServiceResultMapping

      public jadex.common.MethodInfo getServiceResultMapping(String name)
      Get the service result mapping.
    • getServiceParameterMappings

      public Map<String,jadex.common.MethodInfo> getServiceParameterMappings()
      Get the spmappings.
      Returns:
      The spmappings.
    • getServiceResultMappings

      public Map<String,jadex.common.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 jadex.common.MethodInfo getBuildAPLMethod(ClassLoader cl)
      Get the build apl method.
    • getSelectCandidateMethod

      public jadex.common.MethodInfo getSelectCandidateMethod(ClassLoader cl)
      Get the select candiate method.
    • getFinishedMethod

      public jadex.common.MethodInfo getFinishedMethod(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 List<MParameter> getRelevantParameters()
      Get the parameters which are relevant for comparing goals.
    • getExcludes

      public Set<String> getExcludes()
      Get the excludes. Parameters not used in unique checks.
      Returns:
      The excludes
    • setExcludes

      public void setExcludes(Set<String> excludes)
      The excludes to set. Parameters not used in unique checks.
      Parameters:
      excludes - The excludes to set
    • addExclude

      public void addExclude(String paramname)
      Add an excluded parameter