|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.gui.jface.viewers.MutableTreeElement
net.sourceforge.java.feednread.backend.model.favoritestree.Favorite
Favorite represents a NewsFeed bookmark in the
NewsFeedFavoritesTree component.
| Field Summary | |
private boolean |
error
true if the Favorite caused an error last
time its associated NewsFeed was loaded;
false if everything went fine.
|
private boolean |
filtered
true if the Favorite is filtered;
false if unfiltered
|
private String |
guid
The GUID of a Favorite |
private List |
newsFeedStatusListener
The list of registered INewsFeedStatusListener instances.
|
private List |
registeredWatches
A List containing all Watches observing the
Favorite
|
private String |
title
The title of the Favorite |
private JobExecutionStatus |
updateStatus
The JobExecutionStatus object of the update job
responsible for the Favorite
|
private String |
url
The url pointing to the NewsFeed of the
Favorite
|
| Fields inherited from class net.sourceforge.java.util.gui.jface.viewers.MutableTreeElement |
|
| Constructor Summary | |
Favorite(String title,
NewsFeed newsFeed)
Creates a new Favorite with the specified
title and newsFeed.
|
|
Favorite(String title,
String url)
Creates a new Favorite with the specified
title and url.
|
|
Favorite(String title,
String url,
String guid)
Creates a new Favorite with the specified
title and url.
|
|
| Method Summary | |
void |
addNewsFeedStatusListener(INewsFeedStatusListener listener)
Adds the specified INewsFeedStatusListener to the list
of registered listeners.
|
void |
closing(NewsFeedTableStatusChangedEvent event)
Triggered when the NewsFeedTable is about to be closed.
|
void |
dispose()
Disposes this Favorite.
|
protected void |
fireNewsFeedReadStatusChanged()
Notifies all registered INewsFeedStatusListener instances
that the read status of the NewsFeed associated to this
Favorite has changed.
|
protected void |
fireNewsFeedUpdated()
Notifies all registered INewsFeedStatusListener instances
that the NewsFeed associated to this Favorite
has been upated.
|
String |
getGUID()
Gets the GUID of this Favorite.
|
NewsFeed |
getNewsFeed()
Gets the NewsFeed of this Favorite.
|
Watch[] |
getRegisteredWatches()
Gets all Watches that this Favorite is
registered at, i.e. observed by.
|
String |
getTitle()
Gets the title of this Favorite.
|
int |
getUnreadCount()
Returns the number of unread news in the NewsFeed
related to this Favorite.
|
JobExecutionStatus |
getUpdateStatus()
Gets the update status of this Favorite.
|
String |
getUrl()
Gets the url pointing to the newsfeed of this Favorite.
|
private void |
initializeEventListener()
Initializes the internal event listener list structure. |
boolean |
isError()
Indicates if this Favorite caused an error last time
its NewsFeed was loaded.
|
boolean |
isFiltered()
Gets the filtered status of this Favorite.
|
boolean |
isScheduled()
Returns true if this Favorite is scheduled
for automatic update.
|
boolean |
isUnread()
Returns true if the NewsFeed related to
this Favorite
|
void |
registerWatch(Watch watch)
Registers the specified Watch, i.e. notifies this
Favorite that it is observed by the specified
Watch.
|
void |
removeINewsFeedStatusListener(INewsFeedStatusListener listener)
Removes the specified INewsFeedStatusListener from the
list of registered listeners.
|
void |
setError(boolean error)
Sets the error flag of this Favorite.
|
void |
setFiltered(boolean filtered)
Sets the filtered status of this Favorite.
|
void |
setNewsFeed(NewsFeed newsFeed)
Sets the NewsFeed of this Favorite.
|
void |
setTitle(String title)
Sets the title of this Favorite.
|
void |
setUpdateStatus(JobExecutionStatus status)
Sets the update status of this Favorite to the
specified JobExceutionStatus object.
|
void |
setUrl(String url)
Sets the url pointing to the newsfeed of this Favorite.
|
void |
statusChanged(NewsFeedTableStatusChangedEvent event)
Triggered when the status of the NewsFeedTable changes.
|
String |
toString()
Gets the textual represntation of this Favorite. |
void |
unregisterWatch(Watch watch)
Unegisters the specified Watch, i.e. notifies this
Favorite that it is no longer observed by the specified
Watch.
|
private void |
updateParents()
Updates all parent Categories of this Favorite.
|
| Methods inherited from class net.sourceforge.java.util.gui.jface.viewers.MutableTreeElement |
add, addIMutableTreeElementListener, allowsSubElements, collectLeafs, fireElementAdded, fireElementRemoved, fireElementUpdated, getData, getElementAt, getElements, getIndex, getParent, getPath, getSize, hasSubElements, isSubElement, remove, removeIMutableTreeElementListener, setData, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private String guid
The GUID of a Favorite
private String title
The title of the Favorite
private String url
The url pointing to the NewsFeed of the
Favorite
private boolean filtered
true if the Favorite is filtered;
false if unfiltered
private boolean error
true if the Favorite caused an error last
time its associated NewsFeed was loaded;
false if everything went fine.
private JobExecutionStatus updateStatus
The JobExecutionStatus object of the update job
responsible for the Favorite
private List registeredWatches
A List containing all Watches observing the
Favorite
private List newsFeedStatusListener
The list of registered INewsFeedStatusListener instances.
| Constructor Detail |
public Favorite(String title,
String url)
Creates a new Favorite with the specified
title and url.
title - the title of this Favoriteurl - the url pointing to the NewsFeed of this
FavoriteFavorite(String, NewsFeed),
Favorite(String, String, String)
public Favorite(String title,
NewsFeed newsFeed)
Creates a new Favorite with the specified
title and newsFeed.
title - the title of this FavoritenewsFeed - the NewsFeed for this FavoriteFavorite(String, String),
Favorite(String, String, String)
public Favorite(String title,
String url,
String guid)
Creates a new Favorite with the specified
title and url.
title - the title of this Favoriteurl - the url pointing to the NewsFeed of this
Favoriteguid - the GUID for this FavoriteFavorite(String, NewsFeed),
Favorite(String, String)| Method Detail |
public String getGUID()
Gets the GUID of this Favorite.
getGUID in interface IGUIDFavoriteIGUID.getGUID()public void setTitle(String title)
Sets the title of this Favorite.
setTitle in interface INameabletitle - the title of this Favoritepublic String getTitle()
Gets the title of this Favorite.
getTitle in interface INameableFavoritepublic void setUrl(String url)
Sets the url pointing to the newsfeed of this Favorite.
url - the url pointing to the newsfeed of this Favoritepublic String getUrl()
Gets the url pointing to the newsfeed of this Favorite.
Favoritepublic void setNewsFeed(NewsFeed newsFeed)
Sets the NewsFeed of this Favorite.
newsFeed - the NewsFeed to setgetNewsFeed()public NewsFeed getNewsFeed()
Gets the NewsFeed of this Favorite.
NewsFeed of this FavoritesetNewsFeed(NewsFeed)public boolean isUnread()
Returns true if the NewsFeed related to
this Favorite
isUnread in interface INewsFeedStatustrue if the NewsFeed related to this
Favoritefalse otherwiseINewsFeedStatus.isUnread()public int getUnreadCount()
Returns the number of unread news in the NewsFeed
related to this Favorite.
getUnreadCount in interface INewsFeedStatusNewsFeed
related to this FavoriteINewsFeedStatus.getUnreadCount()public void setError(boolean error)
Sets the error flag of this Favorite.
This is used to indicate if this Favorite caused
an error last time its NewsFeed was loaded.
error - true to indicate an error;
false otherwiseisError()public boolean isError()
Indicates if this Favorite caused an error last time
its NewsFeed was loaded.
true to indicate an error;
false otherwisesetError(boolean)public void dispose()
Disposes this Favorite.
dispose in interface IMutableTreeElementdispose in class MutableTreeElementpublic String toString()
Gets the textual represntation of this Favorite. Returns
the Favorite title.
toString in class MutableTreeElementFavoritepublic void statusChanged(NewsFeedTableStatusChangedEvent event)
Triggered when the status of the NewsFeedTable changes.
Called whenever the news read status of the associated
NewsFeed changed.
statusChanged in interface INewsFeedTableStatusListenerevent - the triggered NewsFeedTableStatusChangedEventpublic void closing(NewsFeedTableStatusChangedEvent event)
Triggered when the NewsFeedTable is about to be closed.
closing in interface INewsFeedTableStatusListenerevent - the triggered NewsFeedTableStatusChangedEventpublic boolean isFiltered()
Gets the filtered status of this Favorite.
isFiltered in interface IFilterTagtrue if this Favorite is filtered;
false otherwisepublic void setFiltered(boolean filtered)
Sets the filtered status of this Favorite.
setFiltered in interface IFilterTagfiltered - true to mark this Favorite
as filtered; false to mark it as unfilteredpublic void setUpdateStatus(JobExecutionStatus status)
Sets the update status of this Favorite to the
specified JobExceutionStatus object.
status - the JobExceutionStatus holding the
update status of this FavoritegetUpdateStatus(),
isScheduled()public boolean isScheduled()
Returns true if this Favorite is scheduled
for automatic update.
true if this Favorite is scheduled
for automatic update; false otherwisegetUpdateStatus(),
setUpdateStatus(JobExecutionStatus)public JobExecutionStatus getUpdateStatus()
Gets the update status of this Favorite.
JobExceutionStatus holding the update status
of this FavoritesetUpdateStatus(JobExecutionStatus),
isScheduled()public void registerWatch(Watch watch)
Registers the specified Watch, i.e. notifies this
Favorite that it is observed by the specified
Watch.
watch - the Watch to registerunregisterWatch(Watch)public void unregisterWatch(Watch watch)
Unegisters the specified Watch, i.e. notifies this
Favorite that it is no longer observed by the specified
Watch.
watch - the Watch to unregisterregisterWatch(Watch)public Watch[] getRegisteredWatches()
Gets all Watches that this Favorite is
registered at, i.e. observed by.
Watch instances that this
Favorite is registered atpublic void addNewsFeedStatusListener(INewsFeedStatusListener listener)
Adds the specified INewsFeedStatusListener to the list
of registered listeners.
listener - the listener to addremoveINewsFeedStatusListener(INewsFeedStatusListener)public void removeINewsFeedStatusListener(INewsFeedStatusListener listener)
Removes the specified INewsFeedStatusListener from the
list of registered listeners.
listener - the listener to removeaddNewsFeedStatusListener(INewsFeedStatusListener)protected void fireNewsFeedUpdated()
Notifies all registered INewsFeedStatusListener instances
that the NewsFeed associated to this Favorite
has been upated.
fireNewsFeedReadStatusChanged()protected void fireNewsFeedReadStatusChanged()
Notifies all registered INewsFeedStatusListener instances
that the read status of the NewsFeed associated to this
Favorite has changed.
fireNewsFeedUpdated()private void updateParents()
Updates all parent Categories of this Favorite.
private void initializeEventListener()
Initializes the internal event listener list structure.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||