Package com.sun.syndication.feed.synd

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


        if ( releases.size() > 0 )
        {
            final Release release = releases.get( 0 ); // TODO: is this guaranteed to be the latest?

            final SyndEntry entry = new SyndEntryImpl();
            entry.setTitle( release.getVersion() );
            entry.setLink( link + "#" + HtmlTools.encodeId( release.getVersion() ) );
            entry.setDescription( getSyndContent( release ) );
            entry.setPublishedDate( getDate( release.getDateRelease(), dateFormat ) );

            entries.add( entry );
        }

        return entries;
View Full Code Here


      try
      {         
        if(correctDoubleAmpEncoding)
          link = link.replaceAll("&", "&");
       
          SyndEntry entry = new SyndEntryImpl();
          entry.setTitle(title);
          entry.setLink(link);
          entry.setPublishedDate(publishedDate);

          SyndContent syndContent = new SyndContentImpl();
          syndContent.setType(descriptionContentType);
          syndContent.setValue(description);
      
          entry.setDescription(syndContent);
         
          entry.setCategories(categories);

          entry.setContents(contents);

        addEntry(entry);
      }
      catch(Exception e)
      {
View Full Code Here

   
    public void addEntry(SyndFeed feed, String title, String link, Date publishedDate, String description, String descriptionContentType) throws IOException,FeedException
    {
        DateFormat dateParser = new SimpleDateFormat(DATE_FORMAT);

        SyndEntry entry = new SyndEntryImpl();
        entry.setTitle(title);
        entry.setLink(link);
        entry.setPublishedDate(publishedDate);
       
        SyndContent syndContent = new SyndContentImpl();
        syndContent.setType(descriptionContentType);
        syndContent.setValue(description);
       
        entry.setDescription(syndContent);
       
        feed.getEntries().add(entry);
    }
View Full Code Here

        feed.setDescription("Test return rss resource");

        List<SyndEntry> entries = Lists.newArrayList();

        for (Article article : articles) {
            SyndEntry entry = new SyndEntryImpl();
            entry.setTitle(article.getTitle());
            entry.setLink("http://localhost:8080/article/" + article.getSlug()); // TODO: Make me configurable
            entry.setPublishedDate(article.getDateCreated());
            SyndContent description = new SyndContentImpl();
            description.setType("text/html");
            description.setValue(article.getText());
            entry.setDescription(description);
            entries.add(entry);
        }

        feed.setEntries(entries);
View Full Code Here

        myContents = new LinkedList<SyndContentImpl>();
        myContents.add(content);

        final SyndContent description = context.mock(SyndContent.class);
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final SyndLinkImpl link1 = context.mock(SyndLinkImpl.class, "link1");
        final SyndLinkImpl link2 = context.mock(SyndLinkImpl.class, "link2");

        final List<SyndLinkImpl> myLinks = new LinkedList<SyndLinkImpl>();
        myLinks.add(link1);
View Full Code Here

        myContents = new LinkedList<SyndContentImpl>();
        myContents.add(content);

        final SyndContent description = context.mock(SyndContent.class);
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final SyndLinkImpl link1 = context.mock(SyndLinkImpl.class);

        final List<SyndLinkImpl> myLinks = new LinkedList<SyndLinkImpl>();
        myLinks.add(link1);
View Full Code Here

     * Test with content.
     */
    @Test
    public void getBaseObjectWithContent()
    {
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final SyndContentImpl content = context.mock(SyndContentImpl.class);

        final List<SyndContentImpl> myContents = new LinkedList<SyndContentImpl>();
        myContents.add(content);

View Full Code Here

     * Test w/o content.
     */
    @Test
    public void getBaseObjectWithoutContent()
    {
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final List<SyndContentImpl> myContents = new LinkedList<SyndContentImpl>();

        context.checking(new Expectations()
        {
            {
View Full Code Here

    @Test
    public void getBaseObjectWithEnclosure()
    {

        final SyndContent description = context.mock(SyndContent.class);
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final SyndLinkImpl link1 = context.mock(SyndLinkImpl.class, "link1");
        final SyndLinkImpl link2 = context.mock(SyndLinkImpl.class, "link2");

        final List<SyndLinkImpl> myLinks = new LinkedList<SyndLinkImpl>();
        myLinks.add(link1);
View Full Code Here

     */
    @Test
    public void getBaseObjectWithoutImageUrls()
    {
        final SyndContent description = context.mock(SyndContent.class);
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final SyndLinkImpl link1 = context.mock(SyndLinkImpl.class);

        final List<SyndLinkImpl> myLinks = new LinkedList<SyndLinkImpl>();
        myLinks.add(link1);

View Full Code Here

TOP

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

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.