Package com.projity.pm.task

Examples of com.projity.pm.task.Task


        //dependencies
        //Set<DependencyKey> initialLinkIds=null;
        for (Iterator i=projectData.getTasks().iterator();i.hasNext();){
          TaskData successorssorData=(TaskData)i.next();
          if (successorssorData.getPredecessors()!=null){
            final Task successor=(Task)((Node)taskNodeMap.get(successorssorData)).getImpl();
            for (Iterator j=successorssorData.getPredecessors().iterator();j.hasNext();){
              LinkData linkData=(LinkData)j.next();
//            if (initialLinkIds==null){
//            initialLinkIds=new HashSet<DependencyKey>();
//            project.setInitialLinkIds(initialLinkIds);
//            }
//            initialLinkIds.add(new DependencyKey(linkData.getPredecessorId(),linkData.getSuccessorId()/*,externalId*/));
              Dependency dependency=(Dependency)deserialize(linkData,reindex);

              if (linkData.getPredecessor() == null) {
                System.out.println("null pred - this shouldn't happen. skipping"); // todo treat it
                continue;
              }
              final Task predecessor=(Task)((Node)taskNodeMap.get(linkData.getPredecessor())).getImpl();
              connectDependency(dependency,predecessor,successor);

              linkData.emtpy(); //why is this there?
            }
          }
View Full Code Here


  public static void cacheWbs(NodeModel nodeModel, Node parentNode) {
    Object parentImpl = parentNode.getImpl();
    List children = nodeModel.getChildren(parentNode);
    if (parentImpl instanceof Task && children != null && children.size() > 0) {
      Task parent = (Task) parentImpl;
      parent.setWbsChildrenNodes(children); // cached values
      Node child;
      for (Iterator i = children.iterator(); i.hasNext();) {
        child = (Node) i.next();
        Object impl = child.getImpl();
        if (impl instanceof Task) {
View Full Code Here

        if (obj instanceof VoidNodeImpl) {
          if (taskCount == 0) //TODO see why there is a void node at the beginning always
            continue;
          voidTasksQueue.add(obj);
        } else {
              Task task=(Task)obj; //ResourceImpl to have the EnterpriseResource link
//              task.setUniqueId(task.getId()); // set unique id and id to the same thing on export. Ensures unique id is unique
              net.sf.mpxj.Task taskData=(net.sf.mpxj.Task)taskLinker.getTransformationMap().get(task);
              projectData.putProjityTaskMap(taskData,task);
           
              for (Iterator j=task.getPredecessorList().iterator();j.hasNext();){
                Dependency dependency=(Dependency)j.next();
                Task pred=(Task)dependency.getPredecessor();
                net.sf.mpxj.Task predData=(net.sf.mpxj.Task)taskLinker.getTransformationMap().get(pred);
               
                Relation rel=taskData.addPredecessor(predData,RelationType.getInstance(dependency.getDependencyType()),MPXConverter.toMPXDuration(dependency.getLag())); //claur
              }
              taskCount++;
View Full Code Here

  }
 
  private void setDebugDependencyOrder() {
    int count = 0;
    Iterator i = list.iterator();
    Task task;
    TaskReference ref;
    while (i.hasNext()) {
      ref = (TaskReference)i.next();
      if (ref.getType() == TaskReference.PARENT_END)
        continue;
      task = ref.getTask();
      task.setDebugDependencyOrder(count++);
    }
  }
View Full Code Here

    // store off sentinels to put them back later
    TaskReference startSentinel = (TaskReference) list.removeFirst();
    TaskReference endSentinel = (TaskReference) list.removeLast();
    list = new LinkedList();
     
    Task task;
    Iterator i = oldList.iterator();
    toggleMarkerStatus();
    while (i.hasNext()) {
      task = ((TaskReference)i.next()).getTask();
      arrangeSingleTask(task);
View Full Code Here

   */
  void recalculateReverseScheduledCount() {
    numberOfReverseScheduledTasks = 0;
   
    Iterator i = list.iterator();
    Task task;
    while (i.hasNext()) {
      task = ((TaskReference)i.next()).getTask();
        if (task.isReverseScheduled())
        numberOfReverseScheduledTasks++;
    }
  }
View Full Code Here

      result = new int[2];
    else
      result = new int[1];
     
    Iterator i = list.iterator();
    Task task;
    int resultIndex = 0;
    int pos = 0;
    while (i.hasNext()) {
      task = ((TaskReference)i.next()).getTask();
      if (task == t) {
View Full Code Here

      }

    }else{
      for (Dependency dependency : predecessors) {
        if (successors.contains(dependency)){
          Task predecessor=(Task)implMap.get(dependency.getPredecessor());
          Task successor=(Task)implMap.get(dependency.getSuccessor());
          if (predecessor!=null&&successor!=null){
            Dependency d=Dependency.getInstance(predecessor, successor, dependency.getDependencyType(), dependency.getLag());
            d.setDirty(true);
            //Serializer.connectDependency(dependency, predecessor, successor);
            predecessor.getDependencyList(false).add(d);
            successor.getDependencyList(true).add(d);
          }
        }
      }

    }
View Full Code Here

  private Node cloneNode(Node oldNode,Node newParent,Map implMap,Set<Dependency> predecessors,Set<Dependency> successors){
    Object oldNodeImpl=oldNode.getImpl();
    Object newNodeImpl=cloneNodeImpl(oldNodeImpl);
    implMap.put(oldNodeImpl, newNodeImpl);
    if (oldNodeImpl instanceof Task){
      Task t=(Task)oldNodeImpl;
      predecessors.addAll(t.getDependencyList(true));
      successors.addAll(t.getDependencyList(false));
    }
    Object parentImpl = (newParent==null)?null:newParent.getImpl();
    NodeModelDataFactory factory = getFactory(parentImpl);

    factory.addUnvalidatedObject(newNodeImpl,this,parentImpl);
View Full Code Here

public abstract class TaskLinker extends Linker {
  public void initIterator(){
    iterator=((Project)getParent()).getTaskOutlineIterator();
  }
  public Object executeNext(){
        Task task=(Task)iterator.next();
        //if (globalIdsOnly) CommonDataObject.makeGlobal(task);
       return task;
  }
View Full Code Here

TOP

Related Classes of com.projity.pm.task.Task

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.