tvbrowser.extras.favoritesplugin.core

## Class Favorite

- java.lang.Object
- - tvbrowser.extras.favoritesplugin.core.Favorite

- Direct Known Subclasses:
    ActorsFavorite, AdvancedFavorite, FilterFavorite, TitleFavorite, TopicFavorite

      public abstract class Favorite
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SearchFormSettings` | `mSearchFormSettings`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Favorite()`
    `Favorite(java.io.ObjectInputStream in)`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### mSearchFormSettings

          protected SearchFormSettings mSearchFormSettings

  - ### Constructor Detail

    - #### Favorite

          public Favorite()

    - #### Favorite

          public Favorite(java.io.ObjectInputStream in)
                   throws java.io.IOException,
                          java.lang.ClassNotFoundException

      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

  - ### Method Detail

    - #### getTypeID

          public abstract java.lang.String getTypeID()

    - #### getName

          public java.lang.String getName()

    - #### setName

          public void setName(java.lang.String name)

    - #### getLimitationConfiguration

          public LimitationConfiguration getLimitationConfiguration()

    - #### getReminderConfiguration

          public ReminderConfiguration getReminderConfiguration()

    - #### setRemindAfterDownload

          public void setRemindAfterDownload(boolean b)

    - #### isRemindAfterDownload

          public boolean isRemindAfterDownload()

    - #### setForwardPlugins

          public void setForwardPlugins(ProgramReceiveTarget[] pluginArr)

    - #### getForwardPlugins

          public ProgramReceiveTarget[] getForwardPlugins()

    - #### handleNewGlobalReceiveTargets

          public void handleNewGlobalReceiveTargets(ProgramReceiveTarget[] oldDefaultTargets)

    - #### getPrograms

          public Program[] getPrograms()

    - #### getNewPrograms

          public Program[] getNewPrograms()

    - #### handleContainingPrograms

          public void handleContainingPrograms(Program[] progs)

    - #### writeData

          public void writeData(java.io.ObjectOutputStream out)
                         throws java.io.IOException

      serialize this object and write it to a stream.
      Parameters:
        `out` - the stream to write to
      Throws:
        `java.io.IOException` - if something went wrong writing to the stream

    - #### getExclusions

          public Exclusion[] getExclusions()

    - #### addExclusion

          public void addExclusion(Exclusion exclusion)

    - #### removeExclusion

          public void removeExclusion(Exclusion exclusion)

    - #### setExclusions

          public void setExclusions(Exclusion[] exclusionArr)

    - #### contains

          public boolean contains(Program prog)

    - #### searchNewPrograms

          public void searchNewPrograms(Program[] added,
                               Program[] removed,
                               boolean dataUpdate,
                               boolean sendToPlugins)
                                 throws TvBrowserException

      Search in a list of Programs to find new Items
      Parameters:
        `added` - list of programs to check
        `removed` - list of removed programs
        `dataUpdate` - is a data update running at the moment
        `sendToPlugins` - send data to otheer plugins
      Throws:
        `TvBrowserException` - Problems during search
      Since:
        2.7

    - #### updatePrograms

          public void updatePrograms()
                              throws TvBrowserException

      Performs a new search, and refreshes the program marks
      Throws:
        `TvBrowserException` - Exception during search

    - #### updatePrograms

          public void updatePrograms(boolean send)
                              throws TvBrowserException

      Performs a new search, and refreshes the program marks
      Parameters:
        `send` - If the new found programs should be send to plugins.
      Throws:
        `TvBrowserException` - Exception during search

    - #### updatePrograms

          public void updatePrograms(boolean dataUpdate,
                            boolean sendToPlugins)
                              throws TvBrowserException

      Performs a new search, and refreshes the program marks
      Parameters:
        `dataUpdate` - The update was started after a data update.
        `sendToPlugins` - If the new found programs should be send to plugins.
      Throws:
        `TvBrowserException` - Exception during search

    - #### refreshPrograms

          public void refreshPrograms(boolean noNewProgramsUpdate)
                               throws TvBrowserException

      Checks all current programs if they are not excluded, and refreshes the program marks.
      Parameters:
        `noNewProgramsUpdate` - If the list with the new programs should not be updated.
      Throws:
        `TvBrowserException` - Exception during search

    - #### refreshBlackList

          public void refreshBlackList()

      Checks if all programs on the blacklist are valid.

    - #### isOnBlackList

          public boolean isOnBlackList(Program program)

      Checks if a program is on the blacklist.
      Parameters:
        `program` - The program to check.
      Returns:
        If the program in on the blacklist.

    - #### addToBlackList

          public void addToBlackList(Program program)

      Add a program to the blacklist
      Parameters:
        `program` - The program to put on the blacklist.

    - #### removeFromBlackList

          public void removeFromBlackList(Program program)

      Removes the program from the blacklist, if it is in it.
      Parameters:
        `program` - The program to remove from the blacklist.

    - #### getWhiteListPrograms

          public Program[] getWhiteListPrograms()

      Returns:
        The programs that are not on the blacklist.

    - #### getWhiteListPrograms

          public Program[] getWhiteListPrograms(boolean onlyNotExpiredPrograms)

      Parameters:
        `onlyNotExpiredPrograms` - `true` if only not expired programs should be returned, `false` otherwise.
      Returns:
        The programs that are not on the blacklist.

    - #### getBlackListPrograms

          public Program[] getBlackListPrograms()

      Returns:
        The programs that are on the blacklist.

    - #### createConfigurator

          public abstract FavoriteConfigurator createConfigurator()

    - #### internalWriteData

          protected abstract void internalWriteData(java.io.ObjectOutputStream out)
                                             throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### internalSearchForPrograms

          protected Program[] internalSearchForPrograms()
                                                 throws TvBrowserException

      Throws:
        `TvBrowserException`

    - #### containsReceiveTarget

          public boolean containsReceiveTarget(ProgramReceiveTarget target)

      Gets if this Favorite contains the given receive target.

      Parameters:
        `target` - The target to check for.
      Returns:
        `True` if this Favorite contains the given target, `false` otherwise.

    - #### getChannels

          protected Channel[] getChannels()

      get the channels this favorite is searched on
      Returns:
        channel array

    - #### tryToMatch

          public void tryToMatch(Program p)
                          throws TvBrowserException

      Checks if this program matches the favorite. if it does, it will be added to the favorite.
      Parameters:
        `p` - new Program
      Throws:
        `TvBrowserException` - Exception during search
      Since:
        2.7

    - #### matches

          public boolean matches(Program p)
                          throws TvBrowserException

      This function tries to match the given program with the favorite
      Parameters:
        `p` - check if this program matches
      Returns:
        `true` if the program matches
      Throws:
        `TvBrowserException` - exception during matching
      Since:
        2.7

    - #### getSearcher

          public ProgramSearcher getSearcher()
                                      throws TvBrowserException

      get the program searcher used by this favorite
      Returns:
        the program searcher
      Throws:
        `TvBrowserException`
      Since:
        3.0

    - #### removeProgram

          public void removeProgram(Program p)

      Checks if the program is marked by this favorite and remove it if it does.
      Parameters:
        `p` - Program to remove
      Since:
        2.7

    - #### clearNewPrograms

          public void clearNewPrograms()

      Clears the list of new programs
      Since:
        2.7

    - #### clearRemovedPrograms

          public void clearRemovedPrograms()

      Clears the list of removed programs
      Since:
        2.7

    - #### reValidateChannelLimitation

          public void reValidateChannelLimitation()

    - #### revalidatePrograms

          public void revalidatePrograms()

    - #### setProvideFilter

          public void setProvideFilter(boolean provideFilter)

    - #### isProvidingFilter

          public boolean isProvidingFilter()

    - #### accept

          public boolean accept(Program p)

    - #### hasFilterForKey

          public boolean hasFilterForKey(long key)

    - #### getFilterKey

          public long getFilterKey()

    - #### isValidSearch

          public abstract boolean isValidSearch()

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)