devplugin

## Class AbstractTvDataService

- java.lang.Object
- - devplugin.AbstractTvDataService

-     public abstract class AbstractTvDataService
      extends java.lang.Object

  Superclass for all TvDataServices.

  Extend this class to provide your own TvDataService.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTvDataService()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract ChannelGroup[]` | `checkForAvailableChannelGroups(ProgressMonitor monitor)`
    `abstract Channel[]` | `checkForAvailableChannels(ChannelGroup group, ProgressMonitor monitor)` Some TvDataServices may need to connect to the Internet to know their channels.
    `Channel[]` | `checkForAvailableChannels(ProgressMonitor monitor)`
    `Version` | `getAPIVersion()`
    `SettingsPanel` | `getAuthenticationPanel()` If the download of the TV data needs authentication create a panel that contains information about the authentification and the authentication form.
    `Channel[]` | `getAvailableChannels()`
    `abstract Channel[]` | `getAvailableChannels(ChannelGroup group)` Gets the list of the channels that are available for the given channel group.
    `abstract ChannelGroup[]` | `getAvailableGroups()`
    `ActionMenu` | `getButtonAction()` Gets the action menu with the action supported for toolbar actions.
    `java.lang.String` | `getButtonActionDescription()` Gets the description for this ButtonActionIf.
    `ActionMenu` | `getContextMenuActions(Program program)` Gets the actions for the context menu of a program.
    `protected java.lang.String[]` | `getDefaultMirrors()` get the default mirrors to ask for channel groups
    `protected IconLoader` | `getIconLoader(java.lang.String groupId, java.io.File workingDirectory)`
    `java.lang.String` | `getId()` Gets the id of this ButtonActionIf.
    `abstract PluginInfo` | `getInfo()` Gets information about this TvDataService
    `java.awt.Frame` | `getParentFrame()` Gets the parent frame.
    `java.lang.String` | `getPluginCategory()` Gets the category of this plugin.
    `static PluginManager` | `getPluginManager()` Use this method to call methods of the plugin manager.
    `abstract SettingsPanel` | `getSettingsPanel()`
    `static Version` | `getVersion()` Gets the version of this data service.
    `void` | `handleTvBrowserStartFinished()` This method is called when the TV-Browser start is complete.
    `boolean` | `hasRightToDownloadIcons()`
    `abstract boolean` | `hasSettingsPanel()` A TvDataService can have a settings panel within the settings dialog.
    `abstract void` | `loadSettings(java.util.Properties settings)` Called by the host-application during start-up.
    `void` | `setParent(java.awt.Frame parent)` Called by the host-application to provide the parent frame.
    `static void` | `setPluginManager(PluginManager manager)` Called by the host-application to provide access to the plugin manager.
    `abstract void` | `setWorkingDirectory(java.io.File dataDir)` This method is called by the host application to set the working folder.
    `abstract java.util.Properties` | `storeSettings()` Called by the host-application during shut-down.
    `boolean` | `supportsAutoUpdate()` Gets if the data service supports auto update of data.
    `abstract boolean` | `supportsDynamicChannelGroups()`
    `abstract boolean` | `supportsDynamicChannelList()`
    `abstract void` | `updateTvData(TvDataUpdateManager updateManager, Channel[] channelArr, Date startDate, int dateCount, ProgressMonitor monitor)` Updates the TV listings provided by this data service.

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

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

- - ### Constructor Detail

    - #### AbstractTvDataService

          public AbstractTvDataService()

  - ### Method Detail

    - #### getAvailableChannels

          public final Channel[] getAvailableChannels()

    - #### checkForAvailableChannels

          public final Channel[] checkForAvailableChannels(ProgressMonitor monitor)
                                                    throws TvBrowserException

      Throws:
        `TvBrowserException`

    - #### getAPIVersion

          public final Version getAPIVersion()

    - #### getPluginManager

          public static final PluginManager getPluginManager()

      Use this method to call methods of the plugin manager.

      The plugin manager is your connection to TV-Browser. Every communication between TV-Browser and the data service is either initiated by TV-Browser or made by using the plugin manager.

      Returns:
        The plugin manager.
      Since:
        2.6

    - #### setPluginManager

          public static final void setPluginManager(PluginManager manager)

      Called by the host-application to provide access to the plugin manager.
      Parameters:
        `manager` - The plugin manager the plugins should use.

    - #### getVersion

          public static Version getVersion()

      Gets the version of this data service.
      Returns:
        The version of this data service.

    - #### setParent

          public final void setParent(java.awt.Frame parent)

      Called by the host-application to provide the parent frame.
      Parameters:
        `parent` - The parent frame.
      Since:
        2.7

    - #### getParentFrame

          public final java.awt.Frame getParentFrame()

      Gets the parent frame.

      The parent frame may be used for showing dialogs.

      Returns:
        The parent frame.
      Since:
        2.7

    - #### handleTvBrowserStartFinished

          public void handleTvBrowserStartFinished()

      This method is called when the TV-Browser start is complete.
      Since:
        2.7

    - #### supportsAutoUpdate

          public boolean supportsAutoUpdate()

      Gets if the data service supports auto update of data.
      Returns:
        `True` if the data service supports the auto update, `false` otherwise.
      Since:
        2.7

    - #### getButtonAction

          public ActionMenu getButtonAction()

      Gets the action menu with the action supported for toolbar actions.
      Returns:
        The action menu with the supported toolbar actions

    - #### getId

          public final java.lang.String getId()

      Gets the id of this ButtonActionIf.
      Returns:
        The id of this ButtonActionIf.

    - #### getButtonActionDescription

          public java.lang.String getButtonActionDescription()

      Gets the description for this ButtonActionIf.
      Returns:
        The description for this ButtonActionIf.

    - #### getContextMenuActions

          public ActionMenu getContextMenuActions(Program program)

      Gets the actions for the context menu of a program.
      Parameters:
        `program` - The program the context menu will be shown for.
      Returns:
        the actions this plugin provides for the given program or `null` if the plugin does not provide this feature.

    - #### getIconLoader

          protected IconLoader getIconLoader(java.lang.String groupId,
                                 java.io.File workingDirectory)
                                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getDefaultMirrors

          protected java.lang.String[] getDefaultMirrors()

      get the default mirrors to ask for channel groups
      Returns:
        mirror url array
      Since:
        3.0

    - #### setWorkingDirectory

          public abstract void setWorkingDirectory(java.io.File dataDir)

      This method is called by the host application to set the working folder. If required, TvDataService implementations should store their data within this 'dataDir' directory
      Parameters:
        `dataDir` -

    - #### getAvailableGroups

          public abstract ChannelGroup[] getAvailableGroups()

      Returns:
        an array of the available channel groups.

    - #### updateTvData

          public abstract void updateTvData(TvDataUpdateManager updateManager,
                          Channel[] channelArr,
                          Date startDate,
                          int dateCount,
                          ProgressMonitor monitor)
                                     throws TvBrowserException

      Updates the TV listings provided by this data service.
      Parameters:
        `updateManager` -
        `channelArr` -
        `startDate` -
        `dateCount` -
        `monitor` -
      Throws:
        `TvBrowserException`

    - #### loadSettings

          public abstract void loadSettings(java.util.Properties settings)

      Called by the host-application during start-up. Implement this method to load your data service settings from the file system.
      Parameters:
        `settings` -

    - #### storeSettings

          public abstract java.util.Properties storeSettings()

      Called by the host-application during shut-down. Implements this method to store your data service settings to the file system.
      Returns:
        properties that will afterwards be stored by the host application

    - #### hasSettingsPanel

          public abstract boolean hasSettingsPanel()

      A TvDataService can have a settings panel within the settings dialog. If the hasSettingsPanel() method returns false, the `getSettingsPanel()` method is never called.
      Returns:
        true, if the settings panel feature is used by this TvDataService

    - #### getSettingsPanel

          public abstract SettingsPanel getSettingsPanel()

      Returns:
        the SettingsPanel of this TvDataService

    - #### getAvailableChannels

          public abstract Channel[] getAvailableChannels(ChannelGroup group)

      Gets the list of the channels that are available for the given channel group.

    - #### checkForAvailableChannels

          public abstract Channel[] checkForAvailableChannels(ChannelGroup group,
                                            ProgressMonitor monitor)
                                                       throws TvBrowserException

      Some TvDataServices may need to connect to the Internet to know their channels. If `supportsDynamicChannelList()` returns true, this method is called to check for available channels.
      Parameters:
        `group` -
        `monitor` -
      Returns:
        array of all available channels (new and old)
      Throws:
        `TvBrowserException`

    - #### checkForAvailableChannelGroups

          public abstract ChannelGroup[] checkForAvailableChannelGroups(ProgressMonitor monitor)
                                                                 throws TvBrowserException

      Throws:
        `TvBrowserException`

    - #### supportsDynamicChannelList

          public abstract boolean supportsDynamicChannelList()

      Returns:
        true, if this TvDataService can dynamically load other channels

    - #### supportsDynamicChannelGroups

          public abstract boolean supportsDynamicChannelGroups()

      Returns:
        true, if this TvDataService can dynamically load other groups

    - #### getInfo

          public abstract PluginInfo getInfo()

      Gets information about this TvDataService

    - #### hasRightToDownloadIcons

          public boolean hasRightToDownloadIcons()

    - #### getPluginCategory

          public java.lang.String getPluginCategory()

      Gets the category of this plugin.

      The category can be one of this values. Note: Don't use the NO_CATEGORY it's only for backward compatibility.

      - `#ALL_CATEGORY`
      - `#REMOTE_CONTROL_SOFTWARE_CATEGORY`
      - `#REMOTE_CONTROL_HARDWARE_CATEGORY`
      - `#ADDITONAL_DATA_SERVICE_SOFTWARE_CATEGORY`
      - `#ADDITONAL_DATA_SERVICE_HARDWARE_CATEGORY`
      - `#RATINGS_CATEGORY`
      - `#OTHER_CATEGORY`

      Returns:
        The category of this plugin.
      Since:
        3.0.2

    - #### getAuthenticationPanel

          public SettingsPanel getAuthenticationPanel()

      If the download of the TV data needs authentication create a panel that contains information about the authentification and the authentication form.

      Returns:
        The panel with the authentication settings.
      Since:
        3.0.2

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