org.sakaiproject.component.legacy.news
Class BasicNewsService.BasicNewsChannel

java.lang.Object
  extended byorg.sakaiproject.component.legacy.news.BasicNewsService.BasicNewsChannel
All Implemented Interfaces:
NewsChannel
Enclosing class:
BasicNewsService

public class BasicNewsService.BasicNewsChannel
extends Object
implements NewsChannel

NewsChannel implementation


Field Summary
protected  String m_copyright
           
protected  String m_description
           
protected  String m_imageDescription
           
protected  String m_imageHeight
           
protected  String m_imageLink
           
protected  String m_imageTitle
           
protected  String m_imageUrl
           
protected  String m_imageWidth
           
protected  List m_items
           
protected  String m_language
           
protected  String m_lastbuilddate
           
protected  String m_link
           
protected  String m_pubdate
           
protected  String m_source
           
protected  String m_title
           
 
Constructor Summary
BasicNewsService.BasicNewsChannel(String source)
          Construct.
 
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 getImageDescription()
           
 String getImageHeight()
           
 String getImageLink()
           
 String getImageTitle()
           
 String getImageUrl()
           
 String getImageWidth()
           
 String getLanguage()
           
 String getLastbuilddate()
           
 String getLink()
           
 List getNewsitems()
          A .
 List getNewsitems(Filter filter)
          A .
 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 setImageDescription(String imageDescription)
           
 void setImageHeight(String imageHeight)
           
 void setImageLink(String imageLink)
           
 void setImageTitle(String imageTitle)
           
 void SetImageUrl(String imageUrl)
           
 void setImageWidth(String imageWidth)
           
 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 title)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_source

protected String m_source

m_link

protected String m_link

m_title

protected String m_title

m_description

protected String m_description

m_language

protected String m_language

m_copyright

protected String m_copyright

m_pubdate

protected String m_pubdate

m_lastbuilddate

protected String m_lastbuilddate

m_imageLink

protected String m_imageLink

m_imageTitle

protected String m_imageTitle

m_imageUrl

protected String m_imageUrl

m_imageHeight

protected String m_imageHeight

m_imageWidth

protected String m_imageWidth

m_imageDescription

protected String m_imageDescription

m_items

protected List m_items
Constructor Detail

BasicNewsService.BasicNewsChannel

public BasicNewsService.BasicNewsChannel(String source)
                                  throws NewsConnectionException,
                                         NewsFormatException
Construct.

Parameters:
source - The URL from which the feed can be obtained
Throws:
NewsConnectionException, - for errors making the connection.
NewsFormatException, - for errors in the URL or errors parsing the feed.
NewsConnectionException
NewsFormatException
Method Detail

getNewsitems

public List getNewsitems()
A .

Specified by:
getNewsitems in interface NewsChannel
Returns:
the NewsItem that has the specified id.

getNewsitems

public List getNewsitems(Filter filter)
A .

Specified by:
getNewsitems in interface NewsChannel
Parameters:
filter - A filtering object to accept messages, or null if no filtering is desired.
Returns:
a list of NewsItems objects (may be empty).

getSource

public String getSource()
Specified by:
getSource in interface NewsChannel

getLink

public String getLink()
Specified by:
getLink in interface NewsChannel

getTitle

public String getTitle()
Specified by:
getTitle in interface NewsChannel

getDescription

public String getDescription()
Specified by:
getDescription in interface NewsChannel

getLanguage

public String getLanguage()
Specified by:
getLanguage in interface NewsChannel

getCopyright

public String getCopyright()
Specified by:
getCopyright in interface NewsChannel

getPubdate

public String getPubdate()
Specified by:
getPubdate in interface NewsChannel

getLastbuilddate

public String getLastbuilddate()
Specified by:
getLastbuilddate in interface NewsChannel

getImageUrl

public String getImageUrl()

getImageTitle

public String getImageTitle()

getImageLink

public String getImageLink()

getImageWidth

public String getImageWidth()

getImageHeight

public String getImageHeight()

getImageDescription

public String getImageDescription()

setNewsitems

public void setNewsitems(List items)
Specified by:
setNewsitems in interface NewsChannel

addNewsitem

public void addNewsitem(NewsItem item)
Specified by:
addNewsitem in interface NewsChannel

setSource

public void setSource(String source)
               throws NewsConnectionException,
                      NewsFormatException
Specified by:
setSource in interface NewsChannel
Throws:
NewsConnectionException
NewsFormatException

setLink

public void setLink(String link)
Specified by:
setLink in interface NewsChannel

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface NewsChannel

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface NewsChannel

setLanguage

public void setLanguage(String language)
Specified by:
setLanguage in interface NewsChannel

setCopyright

public void setCopyright(String copyright)
Specified by:
setCopyright in interface NewsChannel

setPubdate

public void setPubdate(String pubdate)
Specified by:
setPubdate in interface NewsChannel

setLastbuilddate

public void setLastbuilddate(String builddate)
Specified by:
setLastbuilddate in interface NewsChannel

SetImageUrl

public void SetImageUrl(String imageUrl)

setImageTitle

public void setImageTitle(String imageTitle)

setImageLink

public void setImageLink(String imageLink)

setImageWidth

public void setImageWidth(String imageWidth)

setImageHeight

public void setImageHeight(String imageHeight)

setImageDescription

public void setImageDescription(String imageDescription)

isUpdateAvailable

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

Specified by:
isUpdateAvailable in interface NewsChannel
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 NewsChannel object (otherwise method throws ClassCastException).

Specified by:
compareTo in interface NewsChannel
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).

Specified by:
equals in interface NewsChannel
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.

Specified by:
hashCode in interface NewsChannel
Returns:
The hash-code for the String URL to the channel.