Package com.projity.pm.assignment

Examples of com.projity.pm.assignment.Assignment


      return;
    stop = DateTime.closestDate(stop);
    stop = Math.min(stop,getEnd());

    Iterator i = getAssignments().iterator();
    Assignment assignment;
    long computedActualStart = Long.MAX_VALUE;
    long assignmentActualStart;
    while (i.hasNext()) {
      assignment = (Assignment)i.next();
      assignment.setStop(stop);
      assignmentActualStart = assignment.getActualStart();
      if (assignmentActualStart != 0 && assignmentActualStart < computedActualStart)
        computedActualStart = assignmentActualStart;
    }
    if (computedActualStart == Long.MAX_VALUE)
      computedActualStart = 0;
View Full Code Here


  /**
   * @return
   */
  public long getResume() {
    long resume = Long.MAX_VALUE;
    Assignment assignment;
    Iterator i = getAssignments().iterator();
    while (i.hasNext()) {
      assignment = (Assignment)i.next();
      resume = Math.min(resume,assignment.getResume());
    }
    return resume;
  }
View Full Code Here

  }
  /**
   * @param resume
   */
  public void setResume(long resume) {
    Assignment assignment;
    Iterator i = getAssignments().iterator();
    while (i.hasNext()) {
      assignment = (Assignment)i.next();
      assignment.setResume(resume);
    }
  }
View Full Code Here

//
//    This is an assignment based implementation

    Iterator i = getAssignments().iterator();
    long result;
    Assignment assignment;
    if (startDate < 0)
      result = ahead ? Long.MIN_VALUE : 0;
    else
      result = ahead ? 0 : Long.MAX_VALUE;
    while (i.hasNext()) {
      assignment = (Assignment)i.next();
      long offsetDate = assignment.calcOffsetFrom(startDate,dependencyDate,ahead,remainingOnly,useSooner);
      result = ahead ? Math.max(result,offsetDate) : Math.min(result,offsetDate);
    }
    return result;
  }
View Full Code Here

    date = getEffectiveWorkCalendar().adjustInsideCalendar(date,false);
    if (getActualStart() == 0L)
      setStart(date); // if not started, change start
    else if (inProgress()) {
      Iterator i = getAssignments().iterator();
      Assignment assignment;
      while (i.hasNext()) {
        assignment = (Assignment)i.next();
        assignment.moveRemainingToDate(date);
      }
    } // do nothing for completed tasks
  }
View Full Code Here

      long amount =cal.compare(end,oldInterval.getEnd(),false);
      if (amount == 0L) // skip if nothing moved
        return;

      Iterator i = getAssignments().iterator();
      Assignment assignment;
      while (i.hasNext()) {
        assignment = (Assignment)i.next();
        assignment.moveInterval(eventSource,start,end,oldInterval, true);
      }
    }
    setRawDuration(getDurationMillis()); // this fixes all sorts of pbs

    recalculate(eventSource); // need to recalculate
View Full Code Here

    if (from == to) { // if from is same as two, split one day
      to = getEffectiveWorkCalendar().add(from,CalendarOption.getInstance().getMillisPerDay(),false);
    }

    Iterator i = getAssignments().iterator();
    Assignment assignment;
    while (i.hasNext()) {
      assignment = (Assignment)i.next();
      assignment.split(eventSource,from,to);
    }
    recalculate(eventSource); // need to recalculate
    assignParentActualDatesFromChildren();

  }
View Full Code Here

       end = start;
    long oldEnd = getEnd();
    if (end != oldEnd) {
      super.setEnd(end);
      Iterator i = getAssignments().iterator();
      Assignment assignment;
      while (i.hasNext()) {
        assignment = (Assignment)i.next();
        assignment.setEnd(end);
      }
//      System.out.println("Old End"  + new Date(oldEnd) + " input end " + new Date(end )+ " resulting End " + new Date(getEnd()) + " duration " + DurationFormat.format(getDuration()));
      setRawDuration(getDurationMillis());
    }
    assignParentActualDatesFromChildren();
View Full Code Here

  public void setActualWork(long actualWork, FieldContext context) {

    if (FieldContext.hasInterval(context)) {
      Iterator i = getAssignments().iterator();
      while (i.hasNext()) {
        Assignment assignment = (Assignment) i.next();
        assignment.setActualWork(actualWork,context);
      }
    } else {
      long workValue = Duration.millis(actualWork);
      if (workValue == 0L) {
        setPercentComplete(0);
View Full Code Here

        stop = Math.min(stop,s.getEarliestStop());
      }
    } else {
      Iterator i = getAssignments().iterator();
      while (i.hasNext()) {
        Assignment ass = (Assignment)i.next();
        stop = Math.min(stop,ass.getEarliestStop());
      }
    }
    return stop;
  }
View Full Code Here

TOP

Related Classes of com.projity.pm.assignment.Assignment

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.