public abstract class Favorite
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected SearchFormSettings |
mSearchFormSettings |
Constructor and Description |
---|
Favorite() |
Favorite(java.io.ObjectInputStream in) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Program p) |
void |
addExclusion(Exclusion exclusion) |
void |
addToBlackList(Program program)
Add a program to the blacklist
|
void |
clearNewPrograms()
Clears the list of new programs
|
void |
clearRemovedPrograms()
Clears the list of removed programs
|
boolean |
contains(Program prog) |
boolean |
containsReceiveTarget(ProgramReceiveTarget target)
Gets if this Favorite contains the given receive target.
|
abstract FavoriteConfigurator |
createConfigurator() |
Program[] |
getBlackListPrograms() |
protected Channel[] |
getChannels()
get the channels this favorite is searched on
|
Exclusion[] |
getExclusions() |
long |
getFilterKey() |
ProgramReceiveTarget[] |
getForwardPlugins() |
LimitationConfiguration |
getLimitationConfiguration() |
java.lang.String |
getName() |
Program[] |
getNewPrograms() |
Program[] |
getPrograms() |
ReminderConfiguration |
getReminderConfiguration() |
ProgramSearcher |
getSearcher()
get the program searcher used by this favorite
|
abstract java.lang.String |
getTypeID() |
Program[] |
getWhiteListPrograms() |
Program[] |
getWhiteListPrograms(boolean onlyNotExpiredPrograms) |
void |
handleContainingPrograms(Program[] progs) |
void |
handleNewGlobalReceiveTargets(ProgramReceiveTarget[] oldDefaultTargets) |
boolean |
hasFilterForKey(long key) |
protected Program[] |
internalSearchForPrograms() |
protected abstract void |
internalWriteData(java.io.ObjectOutputStream out) |
boolean |
isOnBlackList(Program program)
Checks if a program is on the blacklist.
|
boolean |
isProvidingFilter() |
boolean |
isRemindAfterDownload() |
abstract boolean |
isValidSearch() |
boolean |
matches(Program p)
This function tries to match the given program with the favorite
|
void |
refreshBlackList()
Checks if all programs on the blacklist are valid.
|
void |
refreshPrograms(boolean noNewProgramsUpdate)
Checks all current programs if they are not excluded,
and refreshes the program marks.
|
void |
removeExclusion(Exclusion exclusion) |
void |
removeFromBlackList(Program program)
Removes the program from the blacklist,
if it is in it.
|
void |
removeProgram(Program p)
Checks if the program is marked by this favorite and remove it if it does.
|
void |
reValidateChannelLimitation() |
void |
revalidatePrograms() |
void |
searchNewPrograms(Program[] added,
Program[] removed,
boolean dataUpdate,
boolean sendToPlugins)
Search in a list of Programs to find new Items
|
void |
setExclusions(Exclusion[] exclusionArr) |
void |
setForwardPlugins(ProgramReceiveTarget[] pluginArr) |
void |
setName(java.lang.String name) |
void |
setProvideFilter(boolean provideFilter) |
void |
setRemindAfterDownload(boolean b) |
void |
tryToMatch(Program p)
Checks if this program matches the favorite.
|
void |
updatePrograms()
Performs a new search, and refreshes the program marks
|
void |
updatePrograms(boolean send)
Performs a new search, and refreshes the program marks
|
void |
updatePrograms(boolean dataUpdate,
boolean sendToPlugins)
Performs a new search, and refreshes the program marks
|
void |
writeData(java.io.ObjectOutputStream out)
serialize this object and write it to a stream.
|
protected SearchFormSettings mSearchFormSettings
public Favorite()
public Favorite(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public abstract java.lang.String getTypeID()
public java.lang.String getName()
public void setName(java.lang.String name)
public LimitationConfiguration getLimitationConfiguration()
public ReminderConfiguration getReminderConfiguration()
public void setRemindAfterDownload(boolean b)
public boolean isRemindAfterDownload()
public void setForwardPlugins(ProgramReceiveTarget[] pluginArr)
public ProgramReceiveTarget[] getForwardPlugins()
public void handleNewGlobalReceiveTargets(ProgramReceiveTarget[] oldDefaultTargets)
public Program[] getPrograms()
public Program[] getNewPrograms()
public void handleContainingPrograms(Program[] progs)
public void writeData(java.io.ObjectOutputStream out) throws java.io.IOException
out
- the stream to write tojava.io.IOException
- if something went wrong writing to the streampublic Exclusion[] getExclusions()
public void addExclusion(Exclusion exclusion)
public void removeExclusion(Exclusion exclusion)
public void setExclusions(Exclusion[] exclusionArr)
public boolean contains(Program prog)
public void searchNewPrograms(Program[] added, Program[] removed, boolean dataUpdate, boolean sendToPlugins) throws TvBrowserException
added
- list of programs to checkremoved
- list of removed programsdataUpdate
- is a data update running at the momentsendToPlugins
- send data to otheer pluginsTvBrowserException
- Problems during searchpublic void updatePrograms() throws TvBrowserException
TvBrowserException
- Exception during searchpublic void updatePrograms(boolean send) throws TvBrowserException
send
- If the new found programs should be send to plugins.TvBrowserException
- Exception during searchpublic void updatePrograms(boolean dataUpdate, boolean sendToPlugins) throws TvBrowserException
dataUpdate
- The update was started after a data update.sendToPlugins
- If the new found programs should be send to plugins.TvBrowserException
- Exception during searchpublic void refreshPrograms(boolean noNewProgramsUpdate) throws TvBrowserException
noNewProgramsUpdate
- If the list with the new programs should not be updated.TvBrowserException
- Exception during searchpublic void refreshBlackList()
public boolean isOnBlackList(Program program)
program
- The program to check.public void addToBlackList(Program program)
program
- The program to put on the blacklist.public void removeFromBlackList(Program program)
program
- The program to remove from the blacklist.public Program[] getWhiteListPrograms()
public Program[] getWhiteListPrograms(boolean onlyNotExpiredPrograms)
onlyNotExpiredPrograms
- true
if only not expired
programs should be returned, false
otherwise.public Program[] getBlackListPrograms()
public abstract FavoriteConfigurator createConfigurator()
protected abstract void internalWriteData(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
protected Program[] internalSearchForPrograms() throws TvBrowserException
TvBrowserException
public boolean containsReceiveTarget(ProgramReceiveTarget target)
target
- The target to check for.True
if this Favorite contains
the given target, false
otherwise.protected Channel[] getChannels()
public void tryToMatch(Program p) throws TvBrowserException
p
- new ProgramTvBrowserException
- Exception during searchpublic boolean matches(Program p) throws TvBrowserException
p
- check if this program matchestrue
if the program matchesTvBrowserException
- exception during matchingpublic ProgramSearcher getSearcher() throws TvBrowserException
TvBrowserException
public void removeProgram(Program p)
p
- Program to removepublic void clearNewPrograms()
public void clearRemovedPrograms()
public void reValidateChannelLimitation()
public void revalidatePrograms()
public void setProvideFilter(boolean provideFilter)
public boolean isProvidingFilter()
public boolean accept(Program p)
public boolean hasFilterForKey(long key)
public long getFilterKey()
public abstract boolean isValidSearch()
TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)