Package com.acelet.s.chore

Examples of com.acelet.s.chore.Chore


   
    long now = System.currentTimeMillis();
    Enumeration enumeration = Registry.choreHashtable.elements();
    while (enumeration.hasMoreElements()) {
      Chore chore = (Chore) enumeration.nextElement();
      long duration = chore.duration;
      WorkingChore workingChore = null;
      if (chore.duration > 0) {
       
       
        for (int i = 0; i < Registry.workingChoreVector.size(); i++) {
          workingChore = (WorkingChore) Registry.workingChoreVector.elementAt(i);
          if (chore.getId() == workingChore.getId0()) {
            if (workingChore.status == WorkingChore.STATUS_STARTED) {
             
             
             
             
View Full Code Here


      }
    }
  }

  public static void executeNow(String name) throws Exception {
    Chore chore = Delegate.selectChore(name);
    Chore tmpChore = chore.createTemporaryCopyForNow();
    WatchTimerTask.createExecutorTimerTask(tmpChore, null);
  }
View Full Code Here

  private static void processChore(Chore comingChore) throws Exception {
    if (isDoer == false)
      return;

    Long comingId = new Long(comingChore.getId());
    Chore existingChore = (Chore) Registry.choreHashtable.get(comingId);
    if (existingChore == null) { 
      WatchTimerTask.createWatchTimerTask(comingChore);
    } else
      if (!existingChore.equals(comingChore)) {
        updateTimerTask(comingChore)
      }
    }
  }
View Full Code Here

        return;
     
      Vector allComingChores = Delegate.selectAllChores();
      int choreSize = allComingChores.size();
      for (int i = 0; i < choreSize; i++) {
        Chore comingChore = (Chore) allComingChores.elementAt(i);
        Long comingChoreId = new Long(comingChore.getId());
        try {
          processChore(comingChore);
        } catch (Exception ex) {
          if (comingChore.status != Chore.STATUS_ERROR) {
           
View Full Code Here

    Vector allCandidateChores = Delegate.selectAllCandidateChores();
    for (int i = 0; i < allCandidateChores.size(); i++) {
      try {
        CandidateChore candidateChore =
          (CandidateChore) allCandidateChores.elementAt(i);
        Chore originalChore = Delegate.selectChore(candidateChore.name);
        if (originalChore == null) {
          Delegate.deleteCandidateChore(candidateChore.id);
          String message = Phrase.get("ER_CANNOT_FIND_TASK") + ": " + candidateChore.name +
            ". " + Phrase.get("TX_REQUEST_IS_DELETED");
          Delegate.sendAlarmEmailForChoreError(originalChore.alarmEmail,
View Full Code Here

  protected boolean prepareData() throws Exception {
    if (isCallerSuperWatchdog) {
      Vector allComingChores = com.acelet.s.watchdog.Delegate.selectAllChores();
      int choreSize = allComingChores.size();
      for (int i = 0; i < choreSize; i++) {
        Chore chore = (Chore) allComingChores.elementAt(i);
        String choreName = chore.name;
        String brief = chore.getBrief();
        String description = chore.description;
       
        Vector rowVector = new Vector();
        rowVector.add(choreName);
        rowVector.add(brief);
View Full Code Here

TOP

Related Classes of com.acelet.s.chore.Chore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.