private void writeLinks(List<GroupWorkspaceProjectPageFileSystemLink> links, JspWriter out)
     throws IOException {
   String basePath = TagUtil.getPageContextPath((PageContext) getJspContext()) + "/";
   for (GroupWorkspaceProjectPageFileSystemLink l : links) {
     out.write("<li><span>");
     out.write(
         "<img  alt=\"link\" src=\"" + basePath + "page-resources/images/all-images/link.gif\"/>");
     out.write("<a href=\"" + l.getUrl() + "\">");
     out.write(l.getName());
     out.write("</a>");
     if (l.getDescription() != null && !l.getDescription().trim().equals("")) {
       out.write(" - " + l.getDescription());
     }
     out.write("</span></li>");
   }
 }
  private void writeFiles(List<GroupWorkspaceProjectPageFile> files, JspWriter out)
      throws IOException {

    String basePath = TagUtil.getPageContextPath((PageContext) getJspContext()) + "/";
    for (GroupWorkspaceProjectPageFile f : files) {

      out.write("<li><span>");
      String extension = f.getIrFile().getFileInfo().getExtension();
      if (extension != null) {
        if (extension.equals("doc")) {
          out.write("<span class=\"wordFileImg\">&nbsp;</span>");
        } else if (extension.equals("pdf")) {
          out.write("<span class=\"pdfFileImg\">&nbsp;</span>");
        } else if (extension.equals("ppt") || extension.equals("pptx")) {
          out.write("<span class=\"powerPointFileImg\">&nbsp;</span>");
        } else if (extension.equals("xls") || extension.equals("xlsx")) {
          out.write("<span class=\"excelFileImg\">&nbsp;</span>");
        } else if (extension.equals("txt")) {
          out.write("<span class=\"textFileImg\">&nbsp;</span>");
        } else if (extension.equals("zip")) {
          out.write("<span class=\"compressedFileImg\">&nbsp;</span>");
        } else if (extension.equals("jpg")) {
          out.write("<span class=\"imgFileImg\">&nbsp;</span>");
        } else if (extension.equalsIgnoreCase("mp3")
            || extension.equalsIgnoreCase("wav")
            || extension.equalsIgnoreCase("mp4")
            || extension.equalsIgnoreCase("aac")) {
          out.write("<span class=\"musicFileImg\"></span>");
        } else {
          out.write("<span class=\"whiteFileImg\">&nbsp;</span>");
        }
      }
      out.write(
          "<a href=\""
              + basePath
              + "groupWorkspaceProjectPageFileDownload.action?groupWorkspaceProjectPageFileId="
              + f.getId()
              + "\">");
      out.write(f.getNameWithExtension());
      out.write("</a>");
      if (f.getDescription() != null && !f.getDescription().trim().equals("")) {
        out.write(" - " + f.getDescription());
      }

      out.write("</span></li>");
    }
  }
 private void writeItems(List<GroupWorkspaceProjectPageInstitutionalItem> items, JspWriter out)
     throws IOException {
   String basePath = TagUtil.getPageContextPath((PageContext) getJspContext()) + "/";
   for (GroupWorkspaceProjectPageInstitutionalItem i : items) {
     out.write("<li><span>");
     out.write("<span class=\"packageBtnImg\">&nbsp;</span>");
     out.write(
         "<a href=\""
             + basePath
             + "institutionalPublicationPublicView.action?institutionalItemId="
             + i.getInstitutionalItem().getId()
             + "\">");
     out.write(i.getName());
     out.write("</a>");
     if (i.getDescription() != null && !i.getDescription().trim().equals("")) {
       out.write(" - " + i.getDescription());
     }
     out.write("</span></li>");
   }
 }
  private void writePublications(
      List<GroupWorkspaceProjectPagePublication> publicaitons, JspWriter out) throws IOException {
    String basePath = TagUtil.getPageContextPath((PageContext) getJspContext()) + "/";
    for (GroupWorkspaceProjectPagePublication p : publicaitons) {
      out.write("<li><span>");
      out.write("<span class=\"scriptImg\">&nbsp;</span>");
      out.write(
          "<a href=\""
              + basePath
              + "groupWorkspaceProjectPagePublicationView.action?groupWorkspaceProjectPagePublicationId="
              + p.getId()
              + "\">");
      out.write(p.getName());
      out.write("</a>");

      if (p.getDescription() != null && !p.getDescription().trim().equals("")) {
        out.write(" - " + p.getDescription());
      }
      out.write("</span></li>");
    }
  }