java.lang.Object
org.silverpeas.components.rssaggregator.model.RSSItem
All Implemented Interfaces:
Comparable<RSSItem>

public class RSSItem extends Object implements Comparable<RSSItem>
Use RSSItem to encapsulate RSS news or ATOM data. It allows us having light JSON transfer data. Users who want more news about RSS only need to click on the items link.
Author:
ebonnet
  • Constructor Details

    • RSSItem

      public RSSItem(com.rometools.rome.feed.synd.SyndEntry item, com.rometools.rome.feed.synd.SyndFeed feed, SPChannel spChannel)
      Default RSSItem constructor which encapsulate Item and Channel from ROME API
      Parameters:
      item - RSS item from ROME API
      feed - the feed from which the item comes from.
      spChannel - the Silverpeas RSS channel with which the feed is mapped.
  • Method Details

    • getItemTitle

      public String getItemTitle()
      Returns:
      the itemTitle
    • getItemDescription

      public String getItemDescription()
      Returns:
      the itemDescription
    • getItemLink

      public String getItemLink()
      Returns:
      the itemURL
    • getItemDate

      public Date getItemDate()
      Returns:
      the itemDate
    • getChannelTitle

      public String getChannelTitle()
      Returns:
      the channelTitle
    • getChannelImage

      public com.rometools.rome.feed.synd.SyndImage getChannelImage()
      Returns:
      the image
    • getChannelId

      public Long getChannelId()
      Returns:
      the channelId
    • compareTo

      public int compareTo(@NonNull RSSItem other)
      Compares this RSS item with the specified one by their respective date. So, this method breaks the property (x.compareTo(y)==0) == (x.equals(y))
      Specified by:
      compareTo in interface Comparable<RSSItem>
      Parameters:
      other - the other RSS item.
      Returns:
      the comparing between their date.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object