Package org.olat.commons.calendar.model

Examples of org.olat.commons.calendar.model.KalendarEventLink


    StringBuilder extLink = new StringBuilder();
    extLink.append(WebappHelper.getContextRoot()).append("/auth/repo/go?rid=");
    RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
    extLink.append(re.getKey()).append("&par=").append(courseNode.getIdent());
    String iconCssClass = CourseNodeFactory.getInstance().getCourseNodeConfiguration(courseNode.getType()).getIconCSSClass();
    KalendarEventLink link = new KalendarEventLink("COURSE", courseNode.getIdent(), courseNode.getShortTitle(), extLink.toString(), iconCssClass);
    kalendarEventLinks.clear();
    kalendarEventLinks.add(link);
  }
View Full Code Here


      StringBuilder extLink = new StringBuilder();
      extLink.append(Settings.getServerContextPathURI()).append("/auth/repo/go?rid=");
      ICourse course = CourseFactory.loadCourse(ores);
      RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
      extLink.append(re.getKey()).append("&par=").append(node.getIdent());
      KalendarEventLink link = new KalendarEventLink(COURSE_LINK_PROVIDER, node.getIdent(), node.getTitle(), extLink.toString(), node.getIconCssClass());
      kalendarEventLinks.add(link);
      node.setSelected(true);
    }
    for (int i = 0; i < node.getChildCount(); i++) {
      rebuildKalendarEventLinks((TreeNode)node.getChildAt(i), selectedNodeIDs, kalendarEventLinks);
View Full Code Here

  public void setKalendarEvent(KalendarEvent kalendarEvent) {
    this.kalendarEvent = kalendarEvent;
    clearSelection(selectionTree.getTreeModel().getRootNode());
    for (Iterator iter = kalendarEvent.getKalendarEventLinks().iterator(); iter.hasNext();) {
      KalendarEventLink link = (KalendarEventLink) iter.next();
      if (!link.getProvider().equals(COURSE_LINK_PROVIDER)) continue;
      String nodeId = link.getId();
      TreeNode node = selectionTree.getTreeModel().getNodeById(nodeId);
      if (node != null) {
        node.setSelected(true);
      }
    }
View Full Code Here

    List kalendarEventLinks = event.getKalendarEventLinks();
   
    if (kalendarEventLinks != null) {
      sb.append("<div class=\"o_cal_links\">");
      for (Iterator iter = kalendarEventLinks.iterator(); iter.hasNext();) {
        KalendarEventLink link = (KalendarEventLink) iter.next();
        sb.append("<br /><b>");       
        sb.append("<a href=\"javascript:top.o_openUriInMainWindow('").append(link.getURI()).append("')\" title=\"").append(StringEscapeUtils.escapeHtml(link.getDisplayName())).append("\" ");
        String iconCssClass = link.getIconCssClass();
        if (StringHelper.containsNonWhitespace(iconCssClass)) {
          sb.append("class=\"b_with_small_icon_left ").append(iconCssClass).append("\"");
        }
        sb.append(" onclick=\"return o2cl();\">").append(link.getDisplayName()).append("</a>");
        sb.append("</b>");
      }
      sb.append("</div>");
    }
  }
View Full Code Here

   
    // event links
    List kalendarEventLinks = kEvent.getKalendarEventLinks();
    if ((kalendarEventLinks != null) && !kalendarEventLinks.isEmpty()) {
      for (Iterator iter = kalendarEventLinks.iterator(); iter.hasNext();) {
        KalendarEventLink link = (KalendarEventLink) iter.next();
        StringBuilder linkEncoded = new StringBuilder(200);
        linkEncoded.append(link.getProvider());
        linkEncoded.append("§");
        linkEncoded.append(link.getId());
        linkEncoded.append("§");
        linkEncoded.append(link.getDisplayName());
        linkEncoded.append("§");
        linkEncoded.append(link.getURI());
        linkEncoded.append("§");
        linkEncoded.append(link.getIconCssClass());
        XProperty linkProperty = new XProperty(ICAL_X_OLAT_LINK, linkEncoded.toString());
        vEventProperties.add(linkProperty);
      }
    }
   
View Full Code Here

          String iconCss = "";
          // migration: iconCss has been added later, check if available first
          if (st.hasMoreElements()) {
            iconCss = st.nextToken();
          }
          KalendarEventLink eventLink = new KalendarEventLink(provider, id, displayName, uri, iconCss);
          kalendarEventLinks.add(eventLink);
        }
      }
    }
    calEvent.setKalendarEventLinks(kalendarEventLinks);
View Full Code Here

TOP

Related Classes of org.olat.commons.calendar.model.KalendarEventLink

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.