org.sakaiproject.service.legacy.news
Interface NewsChannel

All Known Implementing Classes:
BasicNewsService.BasicNewsChannel

public interface NewsChannel

NewsChannel is the interface for a CHEF News service News channel. Messages in the NewsChannel are NewsItems.

Version:
$Revision: 632 $
Author:
University of Michigan, CHEF Software Development Team
See Also:
org.chefproject.service.NewsService, org.chefproject.core.NewsItem

Method Summary
 void addNewsitem(NewsItem item)
           
 int compareTo(Object obj)
          Checks the relative ordering of the String url's of two Channels.
 boolean equals(Object obj)
          Checks whether the parameter obj refers to the same channel as "this" channel.
 String getCopyright()
           
 String getDescription()
           
 String getLanguage()
           
 String getLastbuilddate()
           
 String getLink()
           
 List getNewsitems()
          Accesses a list of all news items from this rss news feed.
 List getNewsitems(Filter filter)
          Accesses a filtered list of news items from this rss news feed.
 String getPubdate()
           
 String getSource()
           
 String getTitle()
           
 int hashCode()
          Calculates a hash code for the channel object's URL.
 boolean isUpdateAvailable()
          Checks whether an update is available for the rss news feed.
 void setCopyright(String copyright)
           
 void setDescription(String description)
           
 void setLanguage(String language)
           
 void setLastbuilddate(String builddate)
           
 void setLink(String link)
           
 void setNewsitems(List items)
           
 void setPubdate(String pubdate)
           
 void setSource(String source)
           
 void setTitle(String set)
           
 

Method Detail

getNewsitems

public List getNewsitems()
Accesses a list of all news items from this rss news feed.

Returns:
a list of NewsItem objects (may be empty).

getNewsitems

public List getNewsitems(Filter filter)
Accesses a filtered list of news items from this rss news feed.

Parameters:
filter - A filtering object to accept messages, or null if no filtering is desired.
Returns:
a list of NewsItem objects (may be empty).

getLink

public String getLink()

getSource

public String getSource()

getTitle

public String getTitle()

getDescription

public String getDescription()

getLanguage

public String getLanguage()

getCopyright

public String getCopyright()

getPubdate

public String getPubdate()

getLastbuilddate

public String getLastbuilddate()

setNewsitems

public void setNewsitems(List items)

addNewsitem

public void addNewsitem(NewsItem item)

setLink

public void setLink(String link)

setSource

public void setSource(String source)
               throws NewsConnectionException,
                      NewsFormatException
Throws:
NewsConnectionException
NewsFormatException

setTitle

public void setTitle(String set)

setDescription

public void setDescription(String description)

setLanguage

public void setLanguage(String language)

setCopyright

public void setCopyright(String copyright)

setPubdate

public void setPubdate(String pubdate)

setLastbuilddate

public void setLastbuilddate(String builddate)

isUpdateAvailable

public boolean isUpdateAvailable()
Checks whether an update is available for the rss news feed.

Returns:
true if update is available, false otherwise

compareTo

public int compareTo(Object obj)
              throws ClassCastException
Checks the relative ordering of the String url's of two Channels. Same response pattern as compareTo method for Strings--negative if "this" object is greater than parameter, zero if the objects are equal, and positive if "this" object is less than the parameter. The parameter can be a String reference or a MessageChannel object (otherwise method throws ClassCastException).

Returns:
A negative integer if "this" object is greater than parameter, zero if the objects are equal, and a positive integer if "this" object is less than the parameter
Throws:
ClassCastException

equals

public boolean equals(Object obj)
               throws ClassCastException
Checks whether the parameter obj refers to the same channel as "this" channel. The parameter can be a String URL or a NewsChannel object (otherwise method throws ClassCastException).

Returns:
true if the channels are the same, false otherwise
Throws:
ClassCastException

hashCode

public int hashCode()
Calculates a hash code for the channel object's URL.

Returns:
The hash-code for the String URL to the channel.