Package org.olat.ims.cp

Examples of org.olat.ims.cp.CPManager.writeToFile()


    } else {
      CPManager cpMgm = CPManager.getInstance();
      String path = treeModel.getPath(identifier);
      treeCtr.removePath(path);
      cpMgm.removeElement(cp, identifier, deleteResource);
      cpMgm.writeToFile(cp);
    }
  }

  /**
   * copies the page with given nodeID
View Full Code Here


  private String copyPage(CPPage page) {
    String newIdentifier = null;
    if (page != null) {
      CPManager cpMgm = CPManager.getInstance();
      newIdentifier = cpMgm.copyElement(cp, page.getIdentifier());
      cpMgm.writeToFile(cp);
    }
    return newIdentifier;
  }

  /**
 
View Full Code Here

      // adds new page as child of currentPage
      newNodeID = cpMgm.addBlankPage(cp, page.getTitle(), currentPage.getIdentifier());
    }
    setCurrentPage(new CPPage(newNodeID, cp));

    cpMgm.writeToFile(cp);
    // treeCtr.getInitialComponent().setDirty(true);
    return newNodeID;
  }

  /**
 
View Full Code Here

   */
  protected void updatePage(CPPage page) {
    setCurrentPage(page);
    CPManager cpMgm = CPManager.getInstance();
    cpMgm.updatePage(cp, page);
    cpMgm.writeToFile(cp);
    if (page.isOrgaPage()) {
      // TODO:GW Shall the repo entry title be updated when the organization
      // title changes?
      // // If the organization title changed, also update the repo entry
      // // title.
View Full Code Here

   */
  private boolean movePage(MoveTreeNodeEvent event) {
    CPManager cpMgm = CPManager.getInstance();
    String movedNodeId = event.getNodeId();
    cpMgm.moveElement(cp, movedNodeId, event.getNewParentNodeId(), event.getPosition());
    cpMgm.writeToFile(cp);
    selectTreeNodeById(movedNodeId);
    return true;
  }

  /**
 
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.