Package org.olat.modules.dialog

Examples of org.olat.modules.dialog.DialogElement


    DialogPropertyElements elements = dialogElmsMgr.findDialogElements(coursePropMgr, courseNode);
    List<DialogElement> list = new ArrayList<DialogElement>();
    if (elements != null) list = elements.getDialogPropertyElements();
    // loop over all dialog elements
    for (Iterator<DialogElement> iter = list.iterator(); iter.hasNext();) {
      DialogElement element = iter.next();
      element.getAuthor();
      element.getDate();
      Forum forum = forumMgr.loadForum(element.getForumKey());
      // do IndexForum
      doIndexAllMessages(courseNodeResourceContext, forum, indexWriter );
      // do Index File
      doIndexFile(element.getFilename(), element.getForumKey(), courseNodeResourceContext, indexWriter);
    }   
   
    // go further, index my child nodes
    courseNodeIndexer.doIndexCourse(repositoryResourceContext, course, courseNode, indexWriter);
  }
View Full Code Here


    DialogPropertyElements elements = depm.findDialogElements(course.getCourseEnvironment().getCoursePropertyManager(), this);
    List list = new ArrayList();
    if (elements != null) list = elements.getDialogPropertyElements();

    for (Iterator iter = list.iterator(); iter.hasNext();) {
      DialogElement element = (DialogElement) iter.next();
      doArchiveElement(element, exportDirectory);
    }
  }
View Full Code Here

    } else if (source == uploadButton) {
      Forum forum = ForumManager.getInstance().addAForum();
      OlatRootFolderImpl forumContainer = DialogElementsController.getForumContainer(forum.getKey());
      fileUplCtr = new FileUploadController(getWindowControl(),forumContainer, ureq, (int)FolderConfig.getLimitULKB(), Quota.UNLIMITED, null, false);     
      this.listenTo(fileUplCtr);
      recentElement = new DialogElement();
      recentElement.setForumKey(forum.getKey());
      recentElement.setAuthor(ureq.getIdentity().getName());
      content.contextPut("overview", Boolean.FALSE);
      content.put("upload", fileUplCtr.getInitialComponent());
    }
View Full Code Here

        recentElement = null;
        showOverviewTable(ureq);
      } else if (event.getCommand().equals(FolderEvent.UPLOAD_EVENT)) {

        // new dialog element
        DialogElement element = new DialogElement();
        element.setAuthor(recentElement.getAuthor());
        element.setDate(new Date());
        final String filename = ((FolderEvent) event).getFilename();
        element.setFilename(filename);
        element.setForumKey(recentElement.getForumKey());
        element.setFileSize(DialogElementsController.getFileSize(recentElement.getForumKey()));

        // save property
        DialogElementsPropertyManager.getInstance().addDialogElement(course.getCourseEnvironment().getCoursePropertyManager(), courseNode, element);

        // do logging
View Full Code Here

      Property prop = (Property) iterator.next();
      DialogPropertyElements dialogPropertyElements = (DialogPropertyElements) XStreamHelper.fromXML(prop.getTextValue());
      // loop over all elements
      List list = dialogPropertyElements.getDialogPropertyElements();
      for (Iterator iterator2 = list.iterator(); iterator2.hasNext();) {
        DialogElement dialogElement = (DialogElement) iterator2.next();
        counterDialogElement++;
        try {
          String author = dialogElement.getAuthor();
          Identity identity = ManagerFactory.getManager().findIdentityByName(author);
          if (identity == null) {
            // Did not found username => try to find as deleted username <TIMESTAMP>_bks_<USERNAME>
            identity = findDeletedIdentityByName(author);
            if (identity != null) {
              log.audit("migrateAllDialogElementsProperty setIdentityId for author=" + author + " with IdentityId=" + identity.getKey());
              dialogElement.setAuthorIdentityId(identity.getKey().toString());
              counter++;
            } else {
              log.warn("migrateAllDialogElementsProperty: Could not found username=" + author);
            }
          } else {
            dialogElement.setAuthor(author);
            counterSetAuthor++;
          }
          if (counterDialogElement % 10 == 0) {
            DBFactory.getInstance().intermediateCommit();
          }
View Full Code Here

TOP

Related Classes of org.olat.modules.dialog.DialogElement

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.