Esempio n. 1
0
  /** Adapts a DashboardItems to a SyndEntry. */
  private static SyndEntry adaptDashBoardItem(DashBoardItem item, HttpServletRequest req)
      throws ClientException {

    SyndEntry entry = new SyndEntryImpl();
    TaskModule taskModule = new TaskModuleImpl();

    taskModule.setDirective(item.getDirective());
    taskModule.setDueDate(item.getDueDate());
    taskModule.setStartDate(item.getStartDate());
    taskModule.setDescription(item.getDescription());
    taskModule.setName(item.getName());
    taskModule.setComment(item.getComment());

    List<TaskModule> modules = new ArrayList<TaskModule>();
    modules.add(taskModule);
    entry.setModules(modules);

    String docTitle = (String) item.getDocument().getProperty("dublincore", "title");
    entry.setTitle(docTitle);

    entry.setLink(
        DocumentModelFunctions.documentUrl(null, item.getDocument(), null, null, true, req));

    return entry;
  }
Esempio n. 2
0
 public String getVideoPosterLink() throws PropertyException, ClientException {
   String lastModification =
       "" + (((Calendar) doc.getPropertyValue("dc:modified")).getTimeInMillis());
   String url = uriInfo.getBaseUri().toASCIIString().replace("/site/", "/");
   url +=
       DocumentModelFunctions.fileUrl(
           "downloadPicture", doc, "StaticPlayerView:content", lastModification);
   return url;
 }
Esempio n. 3
0
 public String getIcon() {
   return DocumentModelFunctions.iconPath(documentModel);
 }