public class BasicNewsChannel extends Object implements org.sakaiproject.news.api.NewsChannel
| Modifier and Type | Field and Description |
|---|---|
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<org.sakaiproject.news.api.NewsItem> |
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 |
protected String |
m_userAgent |
| Constructor and Description |
|---|
BasicNewsChannel(String source,
String userAgent)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNewsitem(org.sakaiproject.news.api.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() |
Date |
getLastbuilddateInDateFormat() |
String |
getLink() |
List |
getNewsitems()
A .
|
List |
getNewsitems(org.sakaiproject.javax.Filter filter)
A .
|
String |
getPubdate() |
Date |
getPubdateInDateFormat() |
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) |
protected String m_source
protected String m_userAgent
protected String m_link
protected String m_title
protected String m_description
protected String m_language
protected String m_copyright
protected String m_pubdate
protected String m_lastbuilddate
protected String m_imageLink
protected String m_imageTitle
protected String m_imageUrl
protected String m_imageHeight
protected String m_imageWidth
protected String m_imageDescription
protected List<org.sakaiproject.news.api.NewsItem> m_items
public BasicNewsChannel(String source, String userAgent) throws org.sakaiproject.news.api.NewsConnectionException, org.sakaiproject.news.api.NewsFormatException
source - The URL from which the feed can be obtaineduserAgent - The user agent to make the request as.NewsConnectionException, - for errors making the connection.NewsFormatException, - for errors in the URL or errors parsing the feed.org.sakaiproject.news.api.NewsConnectionExceptionorg.sakaiproject.news.api.NewsFormatExceptionpublic List getNewsitems()
getNewsitems in interface org.sakaiproject.news.api.NewsChannelpublic List getNewsitems(org.sakaiproject.javax.Filter filter)
getNewsitems in interface org.sakaiproject.news.api.NewsChannelfilter - A filtering object to accept messages, or null if no filtering is desired.public String getSource()
getSource in interface org.sakaiproject.news.api.NewsChannelpublic String getLink()
getLink in interface org.sakaiproject.news.api.NewsChannelpublic String getTitle()
getTitle in interface org.sakaiproject.news.api.NewsChannelpublic String getDescription()
getDescription in interface org.sakaiproject.news.api.NewsChannelpublic String getLanguage()
getLanguage in interface org.sakaiproject.news.api.NewsChannelpublic String getCopyright()
getCopyright in interface org.sakaiproject.news.api.NewsChannelpublic String getPubdate()
getPubdate in interface org.sakaiproject.news.api.NewsChannelpublic Date getPubdateInDateFormat()
getPubdateInDateFormat in interface org.sakaiproject.news.api.NewsChannelpublic String getLastbuilddate()
getLastbuilddate in interface org.sakaiproject.news.api.NewsChannelpublic Date getLastbuilddateInDateFormat()
getLastbuilddateInDateFormat in interface org.sakaiproject.news.api.NewsChannelpublic String getImageUrl()
public String getImageTitle()
public String getImageLink()
public String getImageWidth()
public String getImageHeight()
public String getImageDescription()
public void setNewsitems(List items)
setNewsitems in interface org.sakaiproject.news.api.NewsChannelpublic void addNewsitem(org.sakaiproject.news.api.NewsItem item)
addNewsitem in interface org.sakaiproject.news.api.NewsChannelpublic void setSource(String source) throws org.sakaiproject.news.api.NewsConnectionException, org.sakaiproject.news.api.NewsFormatException
setSource in interface org.sakaiproject.news.api.NewsChannelorg.sakaiproject.news.api.NewsConnectionExceptionorg.sakaiproject.news.api.NewsFormatExceptionpublic void setLink(String link)
setLink in interface org.sakaiproject.news.api.NewsChannelpublic void setTitle(String title)
setTitle in interface org.sakaiproject.news.api.NewsChannelpublic void setDescription(String description)
setDescription in interface org.sakaiproject.news.api.NewsChannelpublic void setLanguage(String language)
setLanguage in interface org.sakaiproject.news.api.NewsChannelpublic void setCopyright(String copyright)
setCopyright in interface org.sakaiproject.news.api.NewsChannelpublic void setPubdate(String pubdate)
setPubdate in interface org.sakaiproject.news.api.NewsChannelpublic void setLastbuilddate(String builddate)
setLastbuilddate in interface org.sakaiproject.news.api.NewsChannelpublic void setImageUrl(String imageUrl)
public void setImageTitle(String imageTitle)
public void setImageLink(String imageLink)
public void setImageWidth(String imageWidth)
public void setImageHeight(String imageHeight)
public void setImageDescription(String imageDescription)
public boolean isUpdateAvailable()
isUpdateAvailable in interface org.sakaiproject.news.api.NewsChannelpublic int compareTo(Object obj) throws ClassCastException
compareTo in interface org.sakaiproject.news.api.NewsChannelClassCastExceptionpublic boolean equals(Object obj) throws ClassCastException
equals in interface org.sakaiproject.news.api.NewsChannelequals in class ObjectClassCastExceptionCopyright © 2003-2015 University of Michigan. All Rights Reserved.