-
- All Superinterfaces:
ButtonActionIf
,java.lang.Comparable<ProgramReceiveIf>
,ContextMenuIf
,InfoIf
,Marker
,PluginAccess
,ProgramReceiveIf
- All Known Implementing Classes:
AbstractPluginProxy
,BeanShellPluginProxy
,JavaPluginProxy
public interface PluginProxy extends PluginAccess, InfoIf
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
Nested Classes Modifier and Type Interface Description static class
PluginProxy.Comparator
comparator for plugin proxy (sorting by name)
-
Field Summary
-
Fields inherited from interface devplugin.ContextMenuIf
ACTIONKEY_KEYBOARD_EVENT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addToArtificialPluginTree(MutableProgram program)
boolean
canUseProgramTree()
ProgramInfo[]
getAddtionalProgramInfoForProgram(Program p, java.lang.String uniqueId)
Gets additional program infos for the given program.AfterDataUpdateInfoPanel
getAfterDataUpdateInfoPanel()
Gets a panel that contains infos that should be shown for this Plugins after a data update.PluginTreeNode
getArtificialRootNode()
ActionMenu
getButtonAction()
Gets the action to use for the main menu and the toolbar.ActionMenu
getContextMenuActions(Channel channel)
Gets the actions for the context menu of a channel.ImportanceValue
getImportanceValueForProgram(Program p)
Gets the importance value of a program.The importance of all active plugins is used to determinate the opacity of the used colors of a program, therefor a mean value of all values is used.PluginCenterPanelWrapper
getPluginCenterPanelWrapper()
Gets the PluginCenterPanelWrapper for this plugin.java.lang.String
getPluginFileName()
return the file name of the plugin contained in this proxyjavax.swing.Icon
getPluginIcon()
get the icon to represent this plugin in the settingsProgramRatingIf[]
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(java.lang.Throwable t)
Handles a runtime exception that was caused by the plugin.void
handleTvBrowserSettingsChanged()
Is called when settings of TV-Browser or Plugins were changed, so this Plugin can react on that change.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.void
handleTvDataUpdateStarted(Date until)
Is called when a TV data update is started.boolean
hasArtificialPluginTree()
boolean
isActivated()
Gets whether the plugin is currently activated.boolean
isAllowedToDeleteProgramFilter(PluginsProgramFilter programFilter)
void
onActivation()
This method is automatically called after activating the plugin (either during the TV-Browser startup phase or after manually activating the disabled plugin in the settings).void
onDeactivation()
This method is automatically called after deactivating the plugin.-
Methods inherited from interface tvbrowser.core.plugin.ButtonActionIf
getButtonActionDescription
-
Methods inherited from interface devplugin.ContextMenuIf
getContextMenuActions
-
Methods inherited from interface devplugin.InfoIf
getId, getInfo, getPluginCategory
-
Methods inherited from interface devplugin.Marker
getMarkPrioritiesForProgram, getMarkPriorityForProgram, getMarkPriorityMaxForProgram
-
Methods inherited from interface devplugin.PluginAccess
getAvailableFilter, getAvailableFilterComponentClasses, getCommunicationClass, getId, getInfo, getMarkIcon, getMarkIcons, getProgramTableIcons, getProgramTableIconText, getProgramTableToolTipIcons
-
Methods inherited from interface devplugin.ProgramReceiveIf
canReceiveProgramsWithTarget, getProgramReceiveTargets, receivePrograms, receivePrograms, receiveValues, receiveValues
-
-
-
-
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 interfaceButtonActionIf
- 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.
-
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 after activating the plugin (either during the TV-Browser startup phase or after manually activating the disabled plugin in the settings).- Since:
- 1.1
-
onDeactivation
void onDeactivation()
This method is automatically called 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(java.lang.Throwable t)
Handles a runtime exception that was caused by the plugin.- Parameters:
t
- The exception to handle- Since:
- 2.1
-
getPluginFileName
java.lang.String getPluginFileName()
return the file name of the plugin contained in this proxy- Returns:
- file name
- Since:
- 2.6
-
getPluginIcon
javax.swing.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 usingPluginManager.getAllProgramRatingIfs()
The plugin can return more than one ratingif, e.g. average ratings, user rating ...- Specified by:
getProgramRatingIfs
in interfacePluginAccess
- Returns:
- the RatingIfs of this plugin
- Since:
- 2.7
-
getContextMenuActions
ActionMenu getContextMenuActions(Channel channel)
Gets the actions for the context menu of a channel.- Parameters:
channel
- The channel the context menu will be shown for.- Returns:
- the actions this plugin provides for the given channel or
null
if the plugin does not provide this feature. - Since:
- 3.0
-
getImportanceValueForProgram
ImportanceValue getImportanceValueForProgram(Program p)
Gets the importance value of a program.The importance of all active plugins is used to determinate the opacity of the used colors of a program, therefor a mean value of all values is used.The importance value can be created as a weighted total of the following values.
- Parameters:
p
- The program to get the importance value for.- Returns:
- The importance value for the given program.
- Since:
- 3.0
-
getPluginCenterPanelWrapper
PluginCenterPanelWrapper getPluginCenterPanelWrapper()
Gets the PluginCenterPanelWrapper for this plugin.- Returns:
- The
PluginCenterPanelWrapper
for this plugin ornull
. - Since:
- 3.2
-
getAfterDataUpdateInfoPanel
AfterDataUpdateInfoPanel getAfterDataUpdateInfoPanel()
Gets a panel that contains infos that should be shown for this Plugins after a data update.- Returns:
- The panel with the infos.
- Since:
- 3.2
-
handleTvBrowserSettingsChanged
void handleTvBrowserSettingsChanged()
Is called when settings of TV-Browser or Plugins were changed, so this Plugin can react on that change.- Since:
- 3.2
-
handleTvDataUpdateStarted
void handleTvDataUpdateStarted(Date until)
Is called when a TV data update is started.- Parameters:
until
- The last date the data is updated for.- Since:
- 3.3.3
-
getAddtionalProgramInfoForProgram
ProgramInfo[] getAddtionalProgramInfoForProgram(Program p, java.lang.String uniqueId)
Gets additional program infos for the given program. This method should return an array with all possible infos when called with the TV-Browserexample Program
. Every additional info must have an unique ID, so the name might be changed but the ID never must.- Parameters:
p
- The program to get the additional program info for.uniqueId
- If notnull
the id of the program info to get.- Returns:
- An array with the additional program info or
null
if no additional info is available. - Since:
- 3.4.4
-
-