Examples of visitAll()


Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

            public void visit(INode node) {
              CourseEditorTreeNode cetn = (CourseEditorTreeNode)node;
              cetn.setDirty(true);
            }
          },moveCopyFrom,true);
          tv.visitAll();         
          CourseFactory.saveCourseEditorTreeModel(course.getResourceableId()); // TODO: pb: Review : Add by chg to FIX OLAT-1662
          this.showInfo("movecopynode.info.condmoved");

          ThreadLocalUserActivityLogger.log(CourseLoggingAction.COURSE_EDITOR_NODE_MOVED, getClass());
          fireEvent(ureq, Event.DONE_EVENT);
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

  private String formatThread(MessageNode mn, ForumFormatter forumFormatter, Map metaInfo){
    forumFormatter.setForumMetaInformation(metaInfo);
    StringBuilder formattedThread = new StringBuilder();
    forumFormatter.openThread();
    TreeVisitor tv = new TreeVisitor(forumFormatter, mn, false);
    tv.visitAll();
    return formattedThread.append(formattedThread.append(forumFormatter.closeThread())).toString();
  }
 
}
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

        }
      }
    };
    // not visit beginning at the root node
    TreeVisitor tv = new TreeVisitor(visitor, rootNode, false);
    tv.visitAll();

    return nodes;
  }

  /**
 
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

    File fExportedDataDir = new File(exportDirectory, EXPORTED_DATA_FOLDERNAME);
    fExportedDataDir.mkdirs();
    log.info("exportToFilesystem: exporting course "+this+": exporting all nodes...");
    Visitor visitor = new NodeExportVisitor(fExportedDataDir, this);
    TreeVisitor tv = new TreeVisitor(visitor, getEditorTreeModel().getRootNode(), true);
    tv.visitAll();
    log.info("exportToFilesystem: exporting course "+this+": exporting all nodes...done.");
   
    //OLAT-5368: do intermediate commit to avoid transaction timeout
    // discussion intermediatecommit vs increased transaction timeout:
    //  pro intermediatecommit: not much
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

    // however, for live it is absolutely mandatory to use depth first since using breadth first
    // the score accoutings local cache hash map will never be used. this can slow down things like
    // crazy (course with 10 tests, 300 users and some crazy score and passed calculations will have
    // 10 time performance differences)
    TreeVisitor tv = new TreeVisitor(this, root, true); // true=depth first
    tv.visitAll();
  }

  /**
   * FIXME:fj: cmp this method and evalCourseNode
   * Get the score evaluation for a given course node
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

     * itself does not delete or modify neither runstructure nor editor tree
     * model. The whole complexity of published is encapsulated in the visitor.
     */
    Visitor nodePublishV = new NodePublishVisitor(editorRoot, nodesIdsToPublish, existingCourseRun);
    TreeVisitor tv = new TreeVisitor(nodePublishV, editorRoot, visitChildrenFirst);
    tv.visitAll();
    /*
     *
     */

  }
 
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

    TreeVisitor tv = new TreeVisitor(new Visitor() {
      public void visit(INode node) {
        allSubTreeids.add(node.getIdent());
      }
    }, tn, true);
    tv.visitAll();
     //find all references pointing from outside the subtree into the subtree or
     //on the subtree root node.
    final Map<String, List<String>> allRefs = new HashMap<String, List<String>>();
    tv = new TreeVisitor(new Visitor() {
      public void visit(INode node) {
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

          allRefs.put(node.getIdent(), nodeNames);
        }
      }
    }, tn, true);
    // traverse all nodes from the deletion startpoint
    tv.visitAll();
    // allRefs contains now all references, or zero if ready for delete.
    return allRefs;
  }

  /**
 
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

    for (Iterator iterTop = topNodeList.iterator(); iterTop.hasNext();){
      MessageNode mn = (MessageNode) iterTop.next();
      //a new top thread starts, inform formatter
      forumFormatter.openThread();
      TreeVisitor tv = new TreeVisitor(forumFormatter, mn, false);
      tv.visitAll();
      //commit
      formattedForum.append(forumFormatter.closeThread());
    }
    return formattedForum.append(forumFormatter.closeForum().toString()).toString();
  }
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor.visitAll()

      refM.delete(ref);
    }
    // call cleanupOnDelet for nodes
    Visitor visitor = new NodeDeletionVisitor(course);
    TreeVisitor tv = new TreeVisitor(visitor, course.getRunStructure().getRootNode(), true);
    tv.visitAll();
    // delete assessment notifications
    CourseNode cn = course.getRunStructure().getRootNode();
    CourseEnvironment ce = course.getCourseEnvironment();
    SubscriptionContext sc = new SubscriptionContext(CourseModule.ORES_COURSE_ASSESSMENT, ce.getCourseResourceableId(), cn.getIdent());
    NotificationsManager.getInstance().delete(sc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.