Package com.projity.pm.assignment

Examples of com.projity.pm.assignment.Assignment


    completedThrough = Math.min(completedThrough,getEnd());
    if (completedThrough == getCompletedThrough())
      return;

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


    while (i.hasNext()) {
      task = (NormalTask)i.next();
      if (task.validateConstraints())
        addRepaired(task);
      if (task.getAssignments().isEmpty()) {
        Assignment ass = task.addDefaultAssignment();
        ass.setDirty(true);
        task.setDirty(true);
        ErrorLogger.logOnce("NoAssignment","Repaired task with no assignments",null);
        System.out.println("added default ass for " + task);
        addRepaired(task);
      }
View Full Code Here

    return globalResource.getScheduleStatusIndicator();
  }

  public boolean inProgress(){
    for (Iterator i=getAssignments().iterator();i.hasNext();){
      Assignment a=(Assignment)i.next();
      if (a.inProgress()) return true;
    }
    return false;
  }
View Full Code Here

    return false;
  }

  public boolean isUnstarted(){
    for (Iterator i=getAssignments().iterator();i.hasNext();){
      Assignment a=(Assignment)i.next();
      if (a.isUnstarted()) return true;
    }
    return false;
  }
View Full Code Here

    }
    return false;
  }
  public boolean isComplete(){
    for (Iterator i=getAssignments().iterator();i.hasNext();){
      Assignment a=(Assignment)i.next();
      if (!a.isComplete()) return false;
    }
    return true;
  }
View Full Code Here

  protected void importAssignments() {
    OpenprojAssignmentConverter converter=new OpenprojAssignmentConverter();
    for (Task task : plProject.getTasks()){
      NormalTask openprojTask=state.getOpenprojTask(task);
      for (com.projectlibre.pm.tasks.Assignment assignment : task.getAssignments()){
        Assignment openprojAssignment=converter.to(assignment, state);
        openprojTask.addAssignment(openprojAssignment);
      }
    }
  }
View Full Code Here

  /*
   * If you revise units, Duration is recalculated. They are inversely proportional
   */
  public void adjustRemainingUnits(Allocation allocation, double newRemainingUnits, double oldRemainingUnits, boolean doChildren, boolean conserveTotalUnits) {
    Assignment result;
    if (newRemainingUnits == 0.0) {// treat degenerate case.  Assigning 0 to units makes the task a milestone, but units becomes 1.0
      allocation.adjustRemainingDuration(0, doChildren);
      allocation.adjustRemainingUnits(1.0, oldRemainingUnits, doChildren, false);
    } else {
      if (oldRemainingUnits == 0.0) {// special case
View Full Code Here

* @param resource
* @param selectedTasks
*/  void remove(Resource resource) {
    Iterator t = selectedTasks.iterator();
    NormalTask task;
    Assignment assignment;
    while (t.hasNext()) {
      task = (NormalTask)t.next();
      assignment = task.findAssignment(resource);
      if (assignment != null)
        AssignmentService.getInstance().remove(assignment,this,true);
View Full Code Here

    if (!isEvent(actionType))
      return true;
//    try {
//      beginUpdate();
      if (node.getImpl() instanceof Assignment){
        Assignment assignment=(Assignment)node.getImpl();
//        if (cleanAssignment)
          AssignmentService.getInstance().remove(assignment,cleanAssignment,this,isUndo(actionType)); //LC 8/4/2006 - hk 7/8/2006 changed null to this so event will be fired
//        else if (assignment.getResource()!=ResourceImpl.getUnassignedInstance()){
//          assignment.getResource().removeAssignment(assignment);
//        }
View Full Code Here

  private void addAssignments(Node node){
    if (node.getImpl() instanceof HasAssignments){
      AssociationList assignments=((HasAssignments)node.getImpl()).getAssignments();
      if (assignments==null) return;
      for (ListIterator i=assignments.listIterator(assignments.size());i.hasPrevious();){
        Assignment assignment=(Assignment)i.previous();
        if (assignment.isDefault()) continue;
        Node assignmentNode=NodeFactory.getInstance().createNode(assignment);
        node.insert(assignmentNode,0);
      }
    }
  }
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.