net.sourceforge.rssowl.model
Class Favorite

java.lang.Object
  extended bynet.sourceforge.rssowl.model.Favorite

public class Favorite
extends Object

This is a Favorite for Newsfeeds.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  String catPath
          The String representation of the category
private  long creationDate
          Date of creation
private  String description
          Description of the feed
private  boolean errorLoading
          TRUE if an warning occured while loading the favorite
private  String homepage
          Homepage of this favorites newsfeed
private  boolean isSynchronizer
          If TRUE this favorite is showing when a blogroll is synced
private  String language
          Language of the feed
private  long lastVisitDate
          Date of last visit
private  boolean loadOnStartup
          TRUE if the favorite should be load on startup of RSSOwl
private  boolean openOnStartup
          TRUE if the feed should open on startup
private  Category rssOwlCategory
          The category this favorite is saved into
private  String title
          Title of the favorite
(package private)  org.eclipse.swt.widgets.TreeItem treeItem
          The treeitem this favorite is saved in
private  int unreadNewsCount
          The number of unread news in this favorite
private  int updateInterval
          Update interval of the favorite
private  String url
          URL of the favorite
private  boolean useProxy
          TRUE if a proxy should be used
 
Constructor Summary
Favorite(String url, String title, Category rssOwlCategory)
          Instantiate a new Favorite
 
Method Summary
 void clone(Favorite rssOwlFavorite)
          Clone settings from this favorite into the given one
 void duplicate(Favorite rssOwlFavorite)
          Duplicate this favorite into the given one.
 String getCatPath()
          Get the String representation of the category this favorite is in.
 long getCreationDate()
          Get the creation date of this favorite
 String getDescription()
          Get the description of this favorit's feed
 String getHomepage()
          Get the homepage of this favorit's feed
 String getLanguage()
          Ge the language of this favorit's feed
 long getLastVisitDate()
          Get the last visit date of this favorite
 Category getRSSOwlCategory()
          Get the rssOwlCategory this favorite is saved into.
 String getTitle()
           
 org.eclipse.swt.widgets.TreeItem getTreeItem()
           
 int getUnreadNewsCount()
          Get the number of unread news for this favorite.
 int getUpdateInterval()
          Get the update interval
 String getUrl()
           
 boolean isErrorLoading()
           
 boolean isLoadOnStartup()
           
 boolean isOpenOnStartup()
           
 boolean isSynchronizer()
           
 boolean isUseProxy()
           
 void setCatPath(String catPath)
          Set the String representation of the category this favorite is in
 void setCreationDate(long creationDate)
          Set the creation date of this favorite
 void setDescription(String description)
          Set the description of this favorit's feed
 void setErrorLoading(boolean errorLoading)
          Set TRUE if there is an warning loading the favorite
 void setHomepage(String homepage)
          Set the homepage of this favorite's feed
 void setLanguage(String language)
          Set the language of this favorit's feed
 void setLastVisitDate(long lastVisitDate)
          Set the last visit date
 void setLoadOnStartup(boolean loadOnStartup)
          Set TRUE if the favorite should load on startup of RSSOwl
 void setOpenOnStartup(boolean openOnStartup)
          Set TRUE if the favorite should open on startup
 void setSynchronizer(boolean isSynchronizer)
          If set to TRUE, this favorite is showing when a Blogroll is synced.
 void setTitle(String title)
          Set the title of this favorite
 void setTreeItem(org.eclipse.swt.widgets.TreeItem treeItem)
           
 void setUnreadNewsCount(int unreadNewsCount)
          Set the number of unread news for this favorite.
 void setUpdateInterval(int updateInterval)
          Set the updateinterval in minutes
 void setUrl(String url)
          Set the URL of this favorite
 void setUseProxy(boolean useProxy)
          Set TRUE if use proxy
 void syncMetaData(Channel rssChannel)
          Sync up the meta data for this favorite
 boolean unreadNewsAvailable()
           
 void updateErrorState(boolean isError)
          Update the state of the warning flag to the in a seperate asynchron runnable.
 void updateReadStatus(int unreadNewsCount)
          Update this favorites number of unread news and also update the connected treeitem.
 void updateReadStatus(int unreadNewsCount, boolean updateSysTray)
          Update this favorites number of unread news and also update the connected treeitem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

catPath

private String catPath
The String representation of the category


creationDate

private long creationDate
Date of creation


description

private String description
Description of the feed


errorLoading

private boolean errorLoading
TRUE if an warning occured while loading the favorite


homepage

private String homepage
Homepage of this favorites newsfeed


isSynchronizer

private boolean isSynchronizer
If TRUE this favorite is showing when a blogroll is synced


language

private String language
Language of the feed


lastVisitDate

private long lastVisitDate
Date of last visit


loadOnStartup

private boolean loadOnStartup
TRUE if the favorite should be load on startup of RSSOwl


openOnStartup

private boolean openOnStartup
TRUE if the feed should open on startup


rssOwlCategory

private Category rssOwlCategory
The category this favorite is saved into


title

private String title
Title of the favorite


unreadNewsCount

private int unreadNewsCount
The number of unread news in this favorite


updateInterval

private int updateInterval
Update interval of the favorite


url

private String url
URL of the favorite


useProxy

private boolean useProxy
TRUE if a proxy should be used


treeItem

org.eclipse.swt.widgets.TreeItem treeItem
The treeitem this favorite is saved in

Constructor Detail

Favorite

public Favorite(String url,
                String title,
                Category rssOwlCategory)
Instantiate a new Favorite

Parameters:
url - The URL / Path to the RSS / RDF XML
title - Title of the favorite
rssOwlCategory - The category this favorite is saved into
Method Detail

clone

public void clone(Favorite rssOwlFavorite)
Clone settings from this favorite into the given one

Parameters:
rssOwlFavorite - The favorite to clone the settings into

duplicate

public void duplicate(Favorite rssOwlFavorite)
Duplicate this favorite into the given one. In difference to the clone() Method the duplicate method will not only clone lightweight settings but also copy the url, title and category represented as String.

Parameters:
rssOwlFavorite - The favorite to duplicate into

getCatPath

public String getCatPath()
Get the String representation of the category this favorite is in. The field is not set automatically.

Returns:
String The String representation of the category this favorite is in if the field was set

getCreationDate

public long getCreationDate()
Get the creation date of this favorite

Returns:
long Returns the creationDate.

getDescription

public String getDescription()
Get the description of this favorit's feed

Returns:
String Returns the description.

getHomepage

public String getHomepage()
Get the homepage of this favorit's feed

Returns:
Returns the homepage.

getLanguage

public String getLanguage()
Ge the language of this favorit's feed

Returns:
String Returns the language.

getLastVisitDate

public long getLastVisitDate()
Get the last visit date of this favorite

Returns:
long Returns the lastVisitDate.

getRSSOwlCategory

public Category getRSSOwlCategory()
Get the rssOwlCategory this favorite is saved into.

Returns:
Category The category this favorite is saved into

getTitle

public String getTitle()
Returns:
String Title of the Favorite

getTreeItem

public org.eclipse.swt.widgets.TreeItem getTreeItem()
Returns:
Returns the treeItem this favorite is saved in.

getUnreadNewsCount

public int getUnreadNewsCount()
Get the number of unread news for this favorite.

Returns:
Returns the unreadNewsCount.

getUpdateInterval

public int getUpdateInterval()
Get the update interval

Returns:
int Updateinterval in minutes

getUrl

public String getUrl()
Returns:
String URL / Path of the RSS / RDF XML

isErrorLoading

public boolean isErrorLoading()
Returns:
TRUE if there is an warning loading the favorite

isLoadOnStartup

public boolean isLoadOnStartup()
Returns:
boolean TRUE if the favorite should load on startup of RSSOwl

isOpenOnStartup

public boolean isOpenOnStartup()
Returns:
boolean TRUE if the favorite should open on startup of RSSOwl

isSynchronizer

public boolean isSynchronizer()
Returns:
TRUE if this favorite is a synchronizer

isUseProxy

public boolean isUseProxy()
Returns:
boolean TRUE if use proxy

setCatPath

public void setCatPath(String catPath)
Set the String representation of the category this favorite is in

Parameters:
catPath - The path to the category this favorite is in

setCreationDate

public void setCreationDate(long creationDate)
Set the creation date of this favorite

Parameters:
creationDate - The creationDate to set.

setDescription

public void setDescription(String description)
Set the description of this favorit's feed

Parameters:
description - The description to set.

setErrorLoading

public void setErrorLoading(boolean errorLoading)
Set TRUE if there is an warning loading the favorite

Parameters:
errorLoading -

setHomepage

public void setHomepage(String homepage)
Set the homepage of this favorite's feed

Parameters:
homepage - The homepage to set.

setLanguage

public void setLanguage(String language)
Set the language of this favorit's feed

Parameters:
language - The language to set.

setLastVisitDate

public void setLastVisitDate(long lastVisitDate)
Set the last visit date

Parameters:
lastVisitDate - The lastVisitDate to set.

setLoadOnStartup

public void setLoadOnStartup(boolean loadOnStartup)
Set TRUE if the favorite should load on startup of RSSOwl

Parameters:
loadOnStartup -

setOpenOnStartup

public void setOpenOnStartup(boolean openOnStartup)
Set TRUE if the favorite should open on startup

Parameters:
openOnStartup - The openOnStartup to set.

setSynchronizer

public void setSynchronizer(boolean isSynchronizer)
If set to TRUE, this favorite is showing when a Blogroll is synced.

Parameters:
isSynchronizer - The isSynchronizer to set.

setTitle

public void setTitle(String title)
Set the title of this favorite

Parameters:
title -

setTreeItem

public void setTreeItem(org.eclipse.swt.widgets.TreeItem treeItem)
Parameters:
treeItem - The treeItem in which this favorite is saved.

setUnreadNewsCount

public void setUnreadNewsCount(int unreadNewsCount)
Set the number of unread news for this favorite.

Parameters:
unreadNewsCount - The unreadNewsCount to set.

setUpdateInterval

public void setUpdateInterval(int updateInterval)
Set the updateinterval in minutes

Parameters:
updateInterval -

setUrl

public void setUrl(String url)
Set the URL of this favorite

Parameters:
url -

setUseProxy

public void setUseProxy(boolean useProxy)
Set TRUE if use proxy

Parameters:
useProxy -

syncMetaData

public void syncMetaData(Channel rssChannel)
Sync up the meta data for this favorite

Parameters:
rssChannel - The feed to get the data from

unreadNewsAvailable

public boolean unreadNewsAvailable()
Returns:
TRUE if unread news are available

updateErrorState

public void updateErrorState(boolean isError)
Update the state of the warning flag to the in a seperate asynchron runnable.

Parameters:
isError - TRUE if there was an warning loading the favorite

updateReadStatus

public void updateReadStatus(int unreadNewsCount)
Update this favorites number of unread news and also update the connected treeitem.

Parameters:
unreadNewsCount - Number of unread news

updateReadStatus

public void updateReadStatus(int unreadNewsCount,
                             boolean updateSysTray)
Update this favorites number of unread news and also update the connected treeitem.

Parameters:
unreadNewsCount - Number of unread news
updateSysTray - Wether to update the Systemtray status


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo