Package org.olat.ims.cp

Examples of org.olat.ims.cp.CPManagerImpl


   * @param cp
   */
  public CPPage(String identifier, ContentPackage cp) {
    this.log = Logger.getLogger(CPPage.class.getName());
    this.identifier = identifier;
    CPManagerImpl cpMgm = (CPManagerImpl) CPManager.getInstance();
    DefaultElement ele = cpMgm.getElementByIdentifier(cp, identifier);
    if (ele instanceof CPItem) {
      CPItem pageItem = (CPItem) ele;
      this.cpRoot = false;
      this.idRef = pageItem.getIdentifierRef();
      this.title = pageItem.getTitle();
      this.rootDir = cp.getRootDir();
      this.metadata = pageItem.getMetadata();
      if (metadata != null) metadata.setTitle(title);
      this.cp = cp;
      String filePath = cpMgm.getPageByItemId(cp, identifier);
      if (filePath != null && filePath != "") {
        LocalFileImpl f = (LocalFileImpl) cp.getRootDir().resolve(filePath);
        this.pageFile = f;
      }
    } else if(ele instanceof CPOrganization){
View Full Code Here


  public void transactionAborted() {
    // Don't do nothing!
  }

  public boolean transactionFinishBeforeCreate() {
    CPManagerImpl cpMmg = (CPManagerImpl) CPManager.getInstance();
    String initialPageTitle = translate("cptreecontroller.newpage.title");
    cpMmg.createNewCP(newCPResource, initialPageTitle);
    return true;
  }
View Full Code Here

    previewLink.setCustomEnabledLinkCSS("o_cpeditor_preview");
    previewLink.setTooltip(translate("contentcontroller.previewlink_title"), false);

    this.putInitialPanel(contentVC);

    CPManagerImpl cpMgm = (CPManagerImpl) CPManager.getInstance();
    currentPage = cpMgm.getFirstPageToDisplay(cp);
    displayPage(ureq, currentPage.getIdentifier());
  }
View Full Code Here

   * Displays the correct edit page when node with the given id is selected.
   *
   * @param nodeID
   */
  protected void displayPage(UserRequest ureq, String nodeID) {
    CPManagerImpl cpMgm = (CPManagerImpl) CPManager.getInstance();

    currentPage = new CPPage(nodeID, cp);

    String filePath = cpMgm.getPageByItemId(cp, currentPage.getIdentifier());
    logInfo("I display the page with id: " + currentPage.getIdentifier(), null);

    VFSItem f = cp.getRootDir().resolve(filePath);
    if (filePath == null) {
      displayInfoPage();
View Full Code Here

TOP

Related Classes of org.olat.ims.cp.CPManagerImpl

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.