Examples of loadForum()


Examples of org.olat.modules.fo.ForumManager.loadForum()

    Property forumKeyProp = cpm.findCourseNodeProperty(thisCourseNode, null, null, FORUM_KEY);
    //System.out.println("System.out.println - findCourseNodeProperty");
    if(forumKeyProp!=null) {
      // Forum does already exist, load forum with key from properties
      Long forumKey = forumKeyProp.getLongValue();
      theForum = fom.loadForum(forumKey);
      if (theForum == null) { throw new OLATRuntimeException(FOCourseNode.class, "Tried to load forum with key " + forumKey.longValue() + " in course "
        + userCourseEnv.getCourseEnvironment().getCourseResourceableId() + " for node " + thisCourseNode.getIdent()
        + " as defined in course node property but forum manager could not load forum.", null); }
    } else {
      //creates resourceable from FOCourseNode.class and the current node id as key
View Full Code Here

Examples of org.olat.modules.fo.ForumManager.loadForum()

          cpm.saveProperty(forumKeyProperty)
          //System.out.println("Forum added");
        } else {
          // Forum does already exist, load forum with key from properties
          forumKey = forumKeyProperty.getLongValue();
          forum = fom.loadForum(forumKey);
          if (forum == null) { throw new OLATRuntimeException(FOCourseNode.class, "Tried to load forum with key " + forumKey.longValue() + " in course "
              + userCourseEnv.getCourseEnvironment().getCourseResourceableId() + " for node " + thisCourseNode.getIdent()
              + " as defined in course node property but forum manager could not load forum.", null); }
          }
        //System.out.println("Forum already exists");
View Full Code Here

Examples of org.olat.modules.fo.ForumManager.loadForum()

  private List convertToThreadTrees(long forumId, ForumCallback forumCallback){
    List messages;
    List topNodeList = new ArrayList();
    ForumManager fm = ForumManager.getInstance();
    Long l = new Long(forumId);
    Forum f = fm.loadForum(l);
    messages = fm.getMessagesByForum(f);
   
    for (Iterator iterTop = messages.iterator(); iterTop.hasNext();) {
      Message msg = (Message) iterTop.next();
      if (msg.getParent() == null) {
View Full Code Here

Examples of org.olat.modules.fo.ForumManager.loadForum()

    Property forumKeyProperty = npm.findProperty(null, null, CollaborationTools.PROP_CAT_BG_COLLABTOOLS, CollaborationTools.KEY_FORUM);
    // Check if forum-property exist
    if (forumKeyProperty != null) {
      Long forumKey = forumKeyProperty.getLongValue();
      Forum forum = fom.loadForum(forumKey);
      SearchResourceContext forumSearchResourceContext = new SearchResourceContext(parentResourceContext);
      forumSearchResourceContext.setBusinessControlFor(BusinessGroupMainRunController.ORES_TOOLFORUM);
      forumSearchResourceContext.setDocumentType(TYPE);
      forumSearchResourceContext.setDocumentContext(businessGroup.getKey() + " " + forumKey);
      forumSearchResourceContext.setParentContextType(GroupDocument.TYPE);
View Full Code Here

Examples of org.olat.modules.fo.ForumManager.loadForum()

    Property forumKeyProperty = cpm.findCourseNodeProperty(courseNode, null, null, FOCourseNode.FORUM_KEY);
    // Check if forum-property exist
    if (forumKeyProperty != null) {
      Long forumKey = forumKeyProperty.getLongValue();
      Forum forum = fom.loadForum(forumKey);
//      SearchResourceContext forumSearchResourceContext = new SearchResourceContext(parentResourceContext);
//      forumSearchResourceContext.setBusinessControlFor(BusinessGroupMainRunController.ORES_TOOLFORUM); // TODO:chg: Must be an other Class e.g. CourseRunMainController
      parentResourceContext.setDocumentType(TYPE);
      parentResourceContext.setDocumentContext(course.getResourceableId() + " " + courseNode.getIdent() + " " + forumKey);
      doIndexAllMessages(parentResourceContext, forum, indexWriter );
View Full Code Here

Examples of org.olat.modules.fo.ForumManager.loadForum()

          forumKeyProperty = npm.createPropertyInstance(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_FORUM, null, forumKey, null, null);
          npm.saveProperty(forumKeyProperty);
        } else {
          // Forum does already exist, load forum with key from properties
          forumKey = forumKeyProperty.getLongValue();
          aforum = fom.loadForum(forumKey);
          if (aforum == null) { throw new AssertException("Unable to load forum with key " + forumKey.longValue() + " for ores "
              + ores.getResourceableTypeName() + " with key " + ores.getResourceableId()); }
          if (log.isDebug()) {
            log.debug("loading forum in collab tools from properties: foid::" + forumKey.longValue() + " for ores::"
                + ores.getResourceableTypeName() + "/" + ores.getResourceableId());
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.