Package com.sun.syndication.feed.synd

Examples of com.sun.syndication.feed.synd.SyndContentImpl


                atomEntry.setTitle(child.getTextTrim());
            }
            else if (child.getName().equals("content"))
            {
                List<SyndContent> contents = new LinkedList<SyndContent>();
                SyndContent content = new SyndContentImpl();
                content.setValue(child.getTextTrim());
                contents.add(content);
                atomEntry.setContents(contents);
            }
            else if (child.getName().equals("link"))
            {
                atomEntry.setLink(child.getAttributeValue("href"));
            }
            else if (child.getName().equals("summary"))
            {
                SyndContent content = new SyndContentImpl();
                content.setValue(child.getTextTrim());
                atomEntry.setDescription(content);
            }
            else if (child.getName().equals("object-type"))
            {
                try
View Full Code Here


                    String link = baseUrl + linkPrefix + activity.getDestinationStream().getUniqueIdentifier()
                            + "?activityId=" + activity.getId();
                    entry.setLink(link);
                    entry.setUri(link);
                    entry.setPublishedDate(activity.getPostedTime());
                    description = new SyndContentImpl();
                    description.setType("text/plain");
                    description.setValue(title);
                    entry.setDescription(description);
                    entries.add(entry);
                }
View Full Code Here

      entry = new SyndEntryImpl();
      entry.setTitle(entryTitle.toString());
      entry.setLink(entryUrl.toString());
      entry.setPublishedDate(new Date(report.getTime()));

      SyndContent description = new SyndContentImpl();
      description.setType("text/html");
      description.setValue(entryDesc.toString());
      entry.setDescription(description);
      entries.add(entry);
    }

    return SUCCESS;
View Full Code Here

      entry = new SyndEntryImpl();
      entry.setTitle(entryTitle.toString());
      entry.setLink(entryUrl.toString());
      entry.setPublishedDate(new Date(report.getTime()));

      SyndContent description = new SyndContentImpl();
      description.setType("text/html");
      description.setValue(entryDesc.toString());
      entry.setDescription(description);
      entries.add(entry);
    }

    return SUCCESS;
View Full Code Here

            DispatchUtils.sendInternalError(request, response);
          } catch (IOException e) {
            logger.warn("Error processing the pagelet renderer at {}: {}", rendererURL, e.getMessage());
            DispatchUtils.sendInternalError(request, response);
          }
          SyndContent content = new SyndContentImpl();
          content.setType("text/html");
          content.setMode("escaped");
          content.setValue(rendererContent);
          entryContent.add(content);
        }
      }

      if (entryContent.size() > 0) {
View Full Code Here

        return aFeed;
    }

    protected SyndContent createSyndContent(Content content) {
        SyndContent sContent = new SyndContentImpl();
        sContent.setType(content.getType());
        sContent.setValue(content.getValue());
        return sContent;
    }
View Full Code Here

    protected SyndEntry createSyndEntry(Item item) {
        SyndEntry syndEntry = super.createSyndEntry(item);
        Description desc = item.getDescription();
        if (desc!=null) {
            SyndContent content = new SyndContentImpl();
            content.setType(desc.getType());
            content.setValue(desc.getValue());
            syndEntry.setDescription(content);

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
View Full Code Here

    protected SyndEntry createSyndEntry(Item item) {
        SyndEntry syndEntry = super.createSyndEntry(item);

        Description desc = item.getDescription();
        if (desc!=null) {
            SyndContent content = new SyndContentImpl();
            content.setType(desc.getType());
            content.setValue(desc.getValue());
            syndEntry.setDescription(content);

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
View Full Code Here

   
    protected SyndEntry createSyndEntry(Item item) {
        SyndEntry syndEntry = super.createSyndEntry(item);
        Description desc = item.getDescription();
        if (desc != null) {
            SyndContent descContent = new SyndContentImpl();
            descContent.setType(desc.getType());
            descContent.setValue(desc.getValue());
            syndEntry.setDescription(descContent);
        }
        Content cont = item.getContent();
        if (cont != null) {
            SyndContent content = new SyndContentImpl();
            content.setType(cont.getType());
            content.setValue(cont.getValue());
            List syndContents = new ArrayList();
            syndContents.add(content);
            syndEntry.setContents(syndContents);
        }
        return syndEntry;
View Full Code Here

    protected SyndEntry createSyndEntry(Item item) {
        SyndEntry syndEntry = super.createSyndEntry(item);
        Description desc = item.getDescription();
        if (desc!=null) {
            SyndContent content = new SyndContentImpl();
            content.setType(desc.getType());
            content.setValue(desc.getValue());
            syndEntry.setDescription(content);

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.synd.SyndContentImpl

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.