Examples of DialogElement


Examples of org.olat.modules.dialog.DialogElement

        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

Examples of org.olat.modules.dialog.DialogElement

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