Package com.projity.pm.task

Examples of com.projity.pm.task.TaskLinkReference


    }

    //rebuild dependencies
    if (Environment.isKeepExternalLinks()){
      for (Dependency dependency : successors) {
        TaskLinkReference pt=(TaskLinkReference)dependency.getPredecessor();
        TaskLinkReference st=(TaskLinkReference)dependency.getSuccessor();

        HasDependencies predecessor=(Task)implMap.get(pt);
        HasDependencies successor=(Task)implMap.get(st);

        if (predecessor==null) predecessor=new TaskLinkReferenceImpl(pt.getUniqueId(),pt.getProject());
        if (successor==null) successor=new TaskLinkReferenceImpl(st.getUniqueId(),st.getProject());
        Dependency d=Dependency.getInstance(predecessor, successor, dependency.getDependencyType(), dependency.getLag());
        d.setDirty(true);
        predecessor.getDependencyList(false).add(d);
        successor.getDependencyList(true).add(d);
        predecessors.remove(d);
      }
      for (Dependency dependency : predecessors) {
        TaskLinkReference pt=(TaskLinkReference)dependency.getPredecessor();
        TaskLinkReference st=(TaskLinkReference)dependency.getSuccessor();

        TaskLinkReference predecessor=(TaskLinkReference)implMap.get(pt);
        TaskLinkReference successor=(TaskLinkReference)implMap.get(st);

        if (predecessor==null) predecessor=new TaskLinkReferenceImpl(pt.getUniqueId(),pt.getProject());
        if (successor==null) successor=new TaskLinkReferenceImpl(st.getUniqueId(),st.getProject());
        Dependency d=Dependency.getInstance(predecessor, successor, dependency.getDependencyType(), dependency.getLag());
        d.setDirty(true);
        predecessor.getDependencyList(false).add(d);
        successor.getDependencyList(true).add(d);
        //successors.remove(d);
      }

    }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


            if (pdeps!=null&&pdeps.size()>0){
              if (Environment.isKeepExternalLinks()){
                for (Iterator k=pdeps.iterator();k.hasNext();){
                  Dependency d=(Dependency)k.next();
                  if (!(d.getPredecessor() instanceof Task)){
                    TaskLinkReference ref=(TaskLinkReference)d.getPredecessor();
                    Task t=taskMap.get(ref.getUniqueId());
                    if (t==null){
                      k.remove();
                      continue;
                    } else{
                      d.setPredecessor(t);
                      t.getSuccessorList().add(d);
                      //DependencyService.getInstance().updateSentinels(d);
                      //DependencyService.getInstance().connect(d, this);
                    }
                  }
                  depsSet.add(d);
                }
               }
            }
            List sdeps=task.getDependencyList(false);
            if (sdeps!=null&&sdeps.size()>0){
              if (Environment.isKeepExternalLinks()){
                for (Iterator k=sdeps.iterator();k.hasNext();){
                  Dependency d=(Dependency)k.next();
                  if (!(d.getSuccessor() instanceof Task)){
                    TaskLinkReference ref=(TaskLinkReference)d.getSuccessor();
                    Task t=taskMap.get(ref.getUniqueId());
                    if (t==null){
                      k.remove();
                      continue;
                    } else{
                      d.setSuccessor(t);
View Full Code Here

TOP

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

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.