Package org.olat.course.nodes

Examples of org.olat.course.nodes.CourseNode.removeAllChildren()


    }

    CourseNode clonedCourseNode = (CourseNode) ObjectCloner.deepCopy(resultingCourseRun.getRootNode());
    CourseEditorTreeNode clonedRoot = new CourseEditorTreeNode(clonedCourseNode);
    convertInCourseEditorTreeNode(clonedRoot, clonedCourseNode);
    clonedCourseNode.removeAllChildren(); // Do remove all children after convertInCourseEditorTreeNode
    CourseEditorTreeModel cloneCETM = new CourseEditorTreeModel();
    cloneCETM.setRootNode(clonedRoot);

    /*
     * now we have the cloned editor tree synchronized with the pre-published
View Full Code Here


    for (int i = 0; i < childCnt; i++) {
      CourseNode childNode = (CourseNode) node.getChildAt(i);
      CourseEditorTreeNode newEditorNode = new CourseEditorTreeNode(childNode);
      courseEditorTreeNode.addChild(newEditorNode);
      convertInCourseEditorTreeNode(newEditorNode, childNode);
      childNode.removeAllChildren(); // remove all children after calling convertInCourseEditorTreeNode
    }
  }

 
 
View Full Code Here

     * @param newRunStruct
     * @param cetn
     */
    private void addNodeTo(final Structure newRunStruct, CourseEditorTreeNode cetn) {
      CourseNode clone = (CourseNode) XStreamHelper.xstreamClone(cetn.getCourseNode());
      clone.removeAllChildren();// children get also visited
      // parent in the course editor model
      CourseEditorTreeNode parentCetn = (CourseEditorTreeNode) cetn.getParent();
      CourseNode parent = parentCetn.getCourseNode();
      CourseNode parentClone = newRunStruct.getNode(parent.getIdent());
      parentClone.addChild(clone);
View Full Code Here

     * @param newRunStruct
     * @param cetn
     */
    private void addNodeTo(final Structure newRunStruct, CourseNode courseNode, CourseEditorTreeNode cetn) {
      CourseNode clone = (CourseNode) XStreamHelper.xstreamClone(courseNode);
      clone.removeAllChildren();// children get also visited
      // parent in the course editor model
      CourseEditorTreeNode parentCetn = (CourseEditorTreeNode) cetn.getParent();
      CourseNode parent = parentCetn.getCourseNode();
      CourseNode parentClone = newRunStruct.getNode(parent.getIdent());
      parentClone.addChild(clone);
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.