TV-Browser 2.7.5 API

tvbrowser.core.plugin
Interface PluginProxy

All Superinterfaces:
ButtonActionIf, ContextMenuIf, Marker, PluginAccess, ProgramReceiveIf
All Known Implementing Classes:
AbstractPluginProxy, BeanShellPluginProxy, JavaPluginProxy

public interface PluginProxy
extends PluginAccess

Encapsulates a plugin and manages the access to it.

All operations that are only accessable from TV-Browser itself is defined in this interface. All operations that are accessable by other plugins are defined in PluginAccess.

Author:
Til Schneider, www.murfman.de

Nested Class Summary
static class PluginProxy.Comparator
          comparator for plugin proxy (sorting by name)
 
Method Summary
 void addToArtificialPluginTree(MutableProgram program)
           
 boolean canUseProgramTree()
           
 PluginTreeNode getArtificialRootNode()
           
 ActionMenu getButtonAction()
          Gets the action to use for the main menu and the toolbar.
 String getPluginFileName()
          return the file name of the plugin contained in this proxy
 Icon getPluginIcon()
          get the icon to represent this plugin in the settings
 ProgramRatingIf[] getProgramRatingIfs()
          If this plugin can rate programs, this interface makes it possible to offer this ratings to other plugins.
 PluginTreeNode getRootNode()
           
 SettingsTabProxy getSettingsTab()
          Gets the SettingsTab object, which is added to the settings-window.
 void handlePluginException(Throwable t)
          Handles a runtime exception that was caused by the plugin.
 void handleTvBrowserStartFinished()
          This method is called when the TV-Browser start is finished.
 void handleTvDataAdded(ChannelDayProgram newProg)
          This method is automatically called, when TV data was added.
 void handleTvDataDeleted(ChannelDayProgram oldProg)
          This method is automatically called, when TV data was deleted.
 void handleTvDataTouched(ChannelDayProgram removedDayProgram, ChannelDayProgram addedDayProgram)
          This method is automatically called, when TV data was touched (that means something was done with it).
 void handleTvDataUpdateFinished()
          This method is automatically called, when the TV data update is finished.
 boolean hasArtificialPluginTree()
           
 boolean isActivated()
          Gets whether the plugin is currently activated.
 boolean isAllowedToDeleteProgramFilter(PluginsProgramFilter programFilter)
           
 void onActivation()
          This method is automatically called, when the plugin after activating the plugin.
 void onDeactivation()
          This method is automatically called, when the plugin after deactivating the plugin.
 
Methods inherited from interface devplugin.PluginAccess
getAvailableFilter, getAvailableFilterComponentClasses, getId, getInfo, getMarkIcon, getMarkIcons, getProgramTableIcons, getProgramTableIconText
 
Methods inherited from interface tvbrowser.core.plugin.ButtonActionIf
getButtonActionDescription
 
Methods inherited from interface devplugin.Marker
getMarkPriorityForProgram
 
Methods inherited from interface devplugin.ProgramReceiveIf
canReceivePrograms, canReceiveProgramsWithTarget, getProgramReceiveTargets, receivePrograms, receivePrograms, receiveValues
 
Methods inherited from interface devplugin.ContextMenuIf
getContextMenuActions
 

Method Detail

isActivated

boolean isActivated()
Gets whether the plugin is currently activated.

Returns:
whether the plugin is currently activated.

getSettingsTab

SettingsTabProxy getSettingsTab()
Gets the SettingsTab object, which is added to the settings-window.

Returns:
the SettingsTab object or null if the plugin does not provide this feature.

getButtonAction

ActionMenu getButtonAction()
Gets the action to use for the main menu and the toolbar.

Specified by:
getButtonAction in interface ButtonActionIf
Returns:
the action to use for the menu and the toolbar or null if the plugin does not provide this feature.

handleTvDataUpdateFinished

void handleTvDataUpdateFinished()
This method is automatically called, when the TV data update is finished.

See Also:
handleTvDataAdded(ChannelDayProgram), handleTvDataDeleted(ChannelDayProgram)

handleTvDataAdded

void handleTvDataAdded(ChannelDayProgram newProg)
This method is automatically called, when TV data was added. (E.g. after an update).

The TV data may be modified by the plugin! So this method must be called before new TV data is saved.

Parameters:
newProg - The new ChannelDayProgram.
See Also:
handleTvDataDeleted(ChannelDayProgram), handleTvDataUpdateFinished()

handleTvDataTouched

void handleTvDataTouched(ChannelDayProgram removedDayProgram,
                         ChannelDayProgram addedDayProgram)
This method is automatically called, when TV data was touched (that means something was done with it). (E.g. after an update).

Parameters:
removedDayProgram - The old ChannelDayProgram.
addedDayProgram - The new ChannelDayProgram.
See Also:
handleTvDataAdded(ChannelDayProgram), handleTvDataDeleted(ChannelDayProgram), handleTvDataUpdateFinished()

handleTvDataDeleted

void handleTvDataDeleted(ChannelDayProgram oldProg)
This method is automatically called, when TV data was deleted. (E.g. after an update).

Parameters:
oldProg - The old ChannelDayProgram which was deleted.
See Also:
handleTvDataAdded(ChannelDayProgram), handleTvDataUpdateFinished()

onActivation

void onActivation()
This method is automatically called, when the plugin after activating the plugin.

Since:
1.1

onDeactivation

void onDeactivation()
This method is automatically called, when the plugin after deactivating the plugin.

Since:
1.1

canUseProgramTree

boolean canUseProgramTree()
Returns:
true, if the programs of this plugin are handled by the plugin tree view
Since:
1.1

getRootNode

PluginTreeNode getRootNode()

handleTvBrowserStartFinished

void handleTvBrowserStartFinished()
This method is called when the TV-Browser start is finished.

Since:
2.2

handlePluginException

void handlePluginException(Throwable t)
Handles a runtime exception that was caused by the plugin.

Parameters:
t - The exception to handle
Since:
2.1

getPluginFileName

String getPluginFileName()
return the file name of the plugin contained in this proxy

Returns:
file name
Since:
2.6

getPluginIcon

Icon getPluginIcon()
get the icon to represent this plugin in the settings

Returns:
icon
Since:
2.6

hasArtificialPluginTree

boolean hasArtificialPluginTree()

addToArtificialPluginTree

void addToArtificialPluginTree(MutableProgram program)

getArtificialRootNode

PluginTreeNode getArtificialRootNode()

isAllowedToDeleteProgramFilter

boolean isAllowedToDeleteProgramFilter(PluginsProgramFilter programFilter)

getProgramRatingIfs

ProgramRatingIf[] getProgramRatingIfs()
If this plugin can rate programs, this interface makes it possible to offer this ratings to other plugins. You can get all ProgramRatingIfs of all plugins using PluginManager.getAllProgramRatingIfs() The plugin can return more than one ratingif, e.g. average ratings, user rating ...

Specified by:
getProgramRatingIfs in interface PluginAccess
Returns:
the RatingIfs of this plugin
Since:
2.7

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)