Package com.projity.pm.criticalpath

Examples of com.projity.pm.criticalpath.TaskSchedule


  }
 
  //call init to complete initialization
  public static TaskSnapshot deserialize(ObjectInputStream s,NormalTask hasAssignments) throws IOException, ClassNotFoundException  {
      TaskSnapshot t=new TaskSnapshot();
      TaskSchedule schedule=TaskSchedule.deserialize(s);
      schedule.setTask(hasAssignments);
      t.setCurrentSchedule(schedule);
      t.hasAssignments=new HasAssignmentsImpl();//(HasAssignments)s.readObject();
     
      t.setFixedCost(s.readDouble());
      t.setFixedCostAccrual(s.readInt());
View Full Code Here


//System.out.println("baseline " + baseline + " " + new Date(start) + " " + new Date(end) + " " + value);

        Assignment baselineAssignment = getBaselineAssignment(baseline, true); // get or create baseline assignment

        // update the task schedule too
        TaskSchedule schedule = baselineAssignment.getTaskScheduleOfAssignment();
        long baselineStart = schedule.getStart();
        long baselineFinish = schedule.getFinish();
        if (baselineStart == 0 || baselineStart > start)
          schedule.setStart(start);
        if (baselineFinish == 0 || baselineFinish < end)
          schedule.setEnd(end);

        baselineAssignment.setWorkInterval(start,end,value);
      }
    }
  }
View Full Code Here

* If the assignment is not started, use the task's dependency date if it's later than the start
* Add in any delay
*/
  public long getStart() {
    long delay = this.calcTotalDelay();
    TaskSchedule ts = getTaskSchedule();
    long s = ts.getStart();
    if (percentComplete == 0) { // if no completion, use task dependency date if needed
      long d = ts.getDependencyDate();
      if (d > s && !task.startsBeforeProject())
        s = d;
    }
    if (delay > 0)
      s = getEffectiveWorkCalendar().add(s,delay,false); // use later time
View Full Code Here

  public Task() {
    this(true);
  }
  public Task(boolean local) {
    hasKey = new HasKeyImpl(local,this);
    currentSchedule = new TaskSchedule();
    initializeTransientTaskObjects();
  }
View Full Code Here

  public boolean isReadOnly() {
    return isExternal() || isSubproject() || (getOwningProject() != null && getOwningProject().isReadOnly());
  }
  protected void initializeTransientTaskObjects() {
    currentSchedule.initSerialized(this,TaskSchedule.CURRENT);
    earlySchedule = new TaskSchedule(this,TaskSchedule.EARLY);
    lateSchedule = new TaskSchedule(this,TaskSchedule.LATE);
      snapshots = new SnapshottableImpl(Settings.numBaselines());
      dependencies = new HasDependenciesImpl(this);

    createSnapshot(CURRENT);
    ((TaskSnapshot)getCurrentSnapshot()).setCurrentSchedule(currentSchedule); // put the current schedule in the snapshot
View Full Code Here

    ((TaskSnapshot)getCurrentSnapshot()).setCurrentSchedule(currentSchedule); // put the current schedule in the snapshot
    setLastSavedStart(currentSchedule.getStart());
    setLastSavedFinish(currentSchedule.getFinish());
  }
  protected void initializeTransientTaskObjectsAfterDeserialization() {
    earlySchedule = new TaskSchedule(this,TaskSchedule.EARLY);
    lateSchedule = new TaskSchedule(this,TaskSchedule.LATE);
      dependencies = new HasDependenciesImpl(this);

      currentSchedule=((TaskSnapshot)getCurrentSnapshot()).getCurrentSchedule();
    currentSchedule.initSerialized(this,TaskSchedule.CURRENT);
View Full Code Here

    Assignment assignment = baselineSnapshot.findAssignment(resource);

    if (assignment == null && createIfDoesntExist) {
      assignment = Assignment.getInstance(this,resource,1.0,0);
      baselineSnapshot.addAssignment(assignment);
      TaskSchedule baselineSchedule = new TaskSchedule(this,TaskSchedule.CURRENT);
      //baselineSnapshot.set
      baselineSnapshot.setCurrentSchedule(baselineSchedule);
      assignment.setTaskSchedule(baselineSchedule);
      assignment.convertToBaselineAssignment(true);
    }
View Full Code Here

TOP

Related Classes of com.projity.pm.criticalpath.TaskSchedule

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.