コード例 #1
0
 /** @return true iff the object "passes" the predicate */
 public boolean execute(Object o) {
   if (o instanceof Task) {
     Task task = (Task) o;
     return (task.getVerb().equals(MonitoringUtils.Start_Publishing_Cmd));
   }
   return false;
 }
コード例 #2
0
  public boolean execute(Object o) {
    if (o instanceof PlanElement) {
      PlanElement p = (PlanElement) o;
      if (p instanceof Expansion) {
        Workflow wf = ((Expansion) p).getWorkflow();
        Enumeration e = wf.getTasks();
        Task t = (Task) e.nextElement();

        if (t.getPlanElement() == null) {
          // Returns true if the current task is a supply task
          if (t.getVerb().equals(myVerb)) {
            return true;
          }
        }
      }
    }
    return false;
  }