Package sage.api
Class PluginAPI
- java.lang.Object
-
- sage.api.PluginAPI
-
public class PluginAPI extends java.lang.Object
API calls to be used for downloading, enabling and disabling of SageTV Plugins from the central repository. Also contains methods for configuring them and for interacting with the SageTV Plugin Event system.
-
-
Constructor Summary
Constructors Constructor Description PluginAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
AreClientPluginsSupported()
Returns true if this instance of SageTV supports installation of client plugins.boolean
CanPluginBeDisabled(sage.Plugin Plugin)
Returns whether the specified plugin can be enabled/disabled.boolean
DisablePlugin(sage.Plugin Plugin)
Disables the specified Plugin if it can be disabled.boolean
EnablePlugin(sage.Plugin Plugin)
Enables the specified Plugin if it can be enabled/disabled.sage.Plugin[]
GetAllAvailablePlugins()
Returns an array of Plugin objects which represent all the plugins available in the plugin repository.sage.Plugin[]
GetAllPluginVersions(java.lang.Object Plugin)
Returns an array of Plugin objects which represent all of the versions available of the specified plugin in the repositorysage.Plugin
GetAvailablePluginForID(java.lang.String PluginID)
Returns the plugin in the repository for the specified plugin IDjava.lang.String
GetClientPluginIncompatabilityReason(sage.Plugin Plugin)
Returns the reason why the specified Plugin object is incompatible and cannot be installed.java.lang.String
GetClientPluginProgress()
Returns a progress based status message regarding any current plugin installation.sage.Plugin[]
GetInstalledClientPlugins()
Returns an array of Plugin objects which represent all the plugins that have been installed on the local client (enabled or disabled).sage.Plugin[]
GetInstalledPlugins()
Returns an array of Plugin objects which represent all the plugins that have been installed on this SageTV system (enabled or disabled).java.lang.String
GetPluginAuthor(sage.Plugin Plugin)
Gets the author of the specified Plugin objectjava.lang.String
GetPluginConfigHelpText(sage.Plugin Plugin, java.lang.String SettingName)
Gets the help text to describe the specified configuration setting for the specified Plugin object.java.lang.String
GetPluginConfigLabel(sage.Plugin Plugin, java.lang.String SettingName)
Gets the label to describe the specified configuration setting for the specified Plugin object.java.lang.String[]
GetPluginConfigOptions(sage.Plugin Plugin, java.lang.String SettingName)
Gets all the options available for the specified configuration setting for the specified Plugin object.java.lang.String[]
GetPluginConfigSettings(sage.Plugin Plugin)
Returns a list of the setting names for the specified Plugin object.java.lang.String
GetPluginConfigType(sage.Plugin Plugin, java.lang.String SettingName)
Gets the setting type for the specified configuration setting for the specified Plugin object.java.lang.String
GetPluginConfigValue(sage.Plugin Plugin, java.lang.String SettingName)
Gets the current value for the specified configuration setting for the specified Plugin object.java.lang.String[]
GetPluginConfigValues(sage.Plugin Plugin, java.lang.String SettingName)
Gets the current values for the specified configuration setting for the specified Plugin object.long
GetPluginCreationDate(sage.Plugin Plugin)
Gets the creation date of the specified Plugin objectjava.lang.String[]
GetPluginDemoVideos(sage.Plugin Plugin)
Returns an array of URLs to demo videos for the specified plugin objectjava.lang.String[]
GetPluginDependencies(sage.Plugin Plugin)
Returns an array of Strings which specifies the dependencies of this plugin.java.lang.String
GetPluginDescription(sage.Plugin Plugin)
Gets the description of the specified Plugin objectjava.lang.String
GetPluginIdentifier(sage.Plugin Plugin)
Gets the unique identifier of the specified Plugin objectsage.SageTVPlugin
GetPluginImplementation(sage.Plugin Plugin)
Returns the actual object that implements the sage.SageTVPlugin interface for the specified Plugin.java.lang.String
GetPluginIncompatabilityReason(sage.Plugin Plugin)
Returns the reason why the specified Plugin object is incompatible and cannot be installed.long
GetPluginInstallDate(sage.Plugin Plugin)
Gets the date the specified Plugin object was installedlong
GetPluginModificationDate(sage.Plugin Plugin)
Gets the last modification date of the specified Plugin objectjava.lang.String
GetPluginName(sage.Plugin Plugin)
Gets the displayable name of the specified Plugin objectjava.lang.String
GetPluginProgress()
Returns a progress based status message regarding any current plugin installation.java.lang.String
GetPluginReleaseNotes(sage.Plugin Plugin)
Gets the release notes attached to this specific version of the specified Plugin objectjava.lang.String
GetPluginResourcePath(sage.Plugin Plugin)
Gets the relative path to resources used by the specified Plugin objectjava.lang.String[]
GetPluginScreenshots(sage.Plugin Plugin)
Returns an array of URLs to screenshots for the specified plugin objectjava.lang.String
GetPluginType(sage.Plugin Plugin)
Returns the type of the specified plugin object.java.lang.String
GetPluginVersion(sage.Plugin Plugin)
Gets the version of the specified Plugin objectjava.lang.String[]
GetPluginWebsites(sage.Plugin Plugin)
Returns an array of URLs to websites for the specified plugin objectsage.SageTVPluginRegistry
GetSageTVPluginRegistry()
Returns an object which implements the sage.SageTVPluginRegistry interface.java.lang.String
InstallClientPlugin(sage.Plugin Plugin)
Installs or upgrades the specified Plugin.java.lang.String
InstallPlugin(sage.Plugin Plugin)
Installs or upgrades the specified Plugin.boolean
IsClientPluginCompatible(sage.Plugin Plugin)
Returns whether or not the specified Plugin object is compatible and can be installed.boolean
IsClientPluginInstalled(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed into the locally running SageTVClientboolean
IsClientPluginInstalledSameVersion(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed into the locally running SageTVClient and is the same version as this oneboolean
IsPluginBeta(sage.Plugin Plugin)
Returns true if the specified plugin is tagged as a 'beta' version.boolean
IsPluginCompatible(sage.Plugin Plugin)
Returns whether or not the specified Plugin object is compatible and can be installed.boolean
IsPluginConfigurable(sage.Plugin Plugin)
Returns true if the specified plugin can be configured when enabled.boolean
IsPluginDesktopOnly(sage.Plugin Plugin)
Returns true if the specified plugin is only supported in desktop environments (i.e.boolean
IsPluginEnabled(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed and is enabled.boolean
IsPluginFailed(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed and is enabled; but the loading of it has failed.boolean
IsPluginInstalled(sage.Plugin Plugin)
Returns true if the specified plugin has already been installedboolean
IsPluginInstalledSameVersion(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed and is the same version as this oneboolean
IsPluginObject(java.lang.Object Plugin)
Returns true if the specified object is a Plugin objectboolean
IsPluginStartupComplete()
Returns true once all of the core plugins that are enabled have completed their startup process.void
RefreshAvailablePlugins()
Refreshes the plugin repository list by contacting the server to ensure it is up to date (this is done automatically on a regular basis)void
ResetPluginConfiguration(sage.Plugin Plugin)
Resets the configuration for the specified plugin.java.lang.String
SetPluginConfigValue(sage.Plugin Plugin, java.lang.String SettingName, java.lang.String SettingValue)
Sets the value for the specified configuration setting for the specified Plugin object.java.lang.String
SetPluginConfigValues(sage.Plugin Plugin, java.lang.String SettingName, java.lang.String[] SettingValues)
Sets the values for the specified configuration setting for the specified Plugin object.java.lang.String
UninstallPlugin(sage.Plugin Plugin)
Uninstalls the specified Plugin.
-
-
-
Method Detail
-
GetSageTVPluginRegistry
public sage.SageTVPluginRegistry GetSageTVPluginRegistry()
Returns an object which implements the sage.SageTVPluginRegistry interface. Can be used to subscribe/unsubscribe to SageTVEvents.- Returns:
- an object which implements the sage.SageTVPluginRegistry interface
- Since:
- 7.0
-
GetAllAvailablePlugins
public sage.Plugin[] GetAllAvailablePlugins()
Returns an array of Plugin objects which represent all the plugins available in the plugin repository.- Returns:
- an array of Plugin objects which represent all the plugins available in the plugin repository
- Since:
- 7.0
-
GetInstalledPlugins
public sage.Plugin[] GetInstalledPlugins()
Returns an array of Plugin objects which represent all the plugins that have been installed on this SageTV system (enabled or disabled). If using a non-localhost SageTVClient; this will return the plugins that are installed on the server.- Returns:
- an array of Plugin objects which represent all the plugins that have been installed on this SageTV system (enabled or disabled)
- Since:
- 7.0
-
GetInstalledClientPlugins
public sage.Plugin[] GetInstalledClientPlugins()
Returns an array of Plugin objects which represent all the plugins that have been installed on the local client (enabled or disabled). This is only needed when dealing with SageTVClient applications that are connected to a non-localhost server.- Returns:
- an array of Plugin objects which represent all the plugins that have been installed on the local client (enabled or disabled)
- Since:
- 7.0
-
GetAllPluginVersions
public sage.Plugin[] GetAllPluginVersions(java.lang.Object Plugin)
Returns an array of Plugin objects which represent all of the versions available of the specified plugin in the repository- Parameters:
Plugin
- the Plugin object to check, this can either be a Plugin object or a String representing a Plugin ID- Returns:
- an array of Plugin objects which represent all of the versions available of the specified plugin in the repository
- Since:
- 7.0
-
GetAvailablePluginForID
public sage.Plugin GetAvailablePluginForID(java.lang.String PluginID)
Returns the plugin in the repository for the specified plugin ID- Parameters:
PluginID
- the plugin identifier- Returns:
- the plugin in the repository for the specified plugin ID
- Since:
- 7.0
-
IsPluginInstalled
public boolean IsPluginInstalled(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed- Parameters:
Plugin
- the Plugin object to check- Returns:
- true if the specified plugin has already been installed
- Since:
- 7.0
-
IsClientPluginInstalled
public boolean IsClientPluginInstalled(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed into the locally running SageTVClient- Parameters:
Plugin
- the Plugin object to check- Returns:
- true if the specified plugin has already been installed into the locally running SageTVClient
- Since:
- 7.0
-
IsPluginInstalledSameVersion
public boolean IsPluginInstalledSameVersion(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed and is the same version as this one- Parameters:
Plugin
- the Plugin object to check- Returns:
- true if the specified plugin has already been installed and is the same version as this one
- Since:
- 7.0
-
IsClientPluginInstalledSameVersion
public boolean IsClientPluginInstalledSameVersion(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed into the locally running SageTVClient and is the same version as this one- Parameters:
Plugin
- the Plugin object to check- Returns:
- true if the specified plugin has already been installed into the locally running SageTVClient and is the same version as this one
- Since:
- 7.0
-
IsPluginEnabled
public boolean IsPluginEnabled(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed and is enabled. This will also return true if the specified plugin does not support being enabled/disabled.- Parameters:
Plugin
- the Plugin object to check, this should be from a call to GetInstalledPlugins or GetInstalledClientPlugins- Returns:
- true if the specified plugin has already been installed and is enabled or it doesn't support being disabled, false otherwise
- Since:
- 7.0
-
IsPluginFailed
public boolean IsPluginFailed(sage.Plugin Plugin)
Returns true if the specified plugin has already been installed and is enabled; but the loading of it has failed.- Parameters:
Plugin
- the Plugin object to check, this should be from a call to GetInstalledPlugins or GetInstalledClientPlugins- Returns:
- true if the specified plugin has already been installed and is enabled and the loading of it failed, false otherwise
- Since:
- 7.0
-
IsPluginDesktopOnly
public boolean IsPluginDesktopOnly(sage.Plugin Plugin)
Returns true if the specified plugin is only supported in desktop environments (i.e. not on a headless server, placeshifter or extender)- Parameters:
Plugin
- the Plugin object to check- Returns:
- true if the specified plugin is only supported in desktop environments, false otherwise
- Since:
- 7.0
-
IsPluginBeta
public boolean IsPluginBeta(sage.Plugin Plugin)
Returns true if the specified plugin is tagged as a 'beta' version.- Parameters:
Plugin
- the Plugin object to check- Returns:
- true if the specified plugin is tagged as a 'beta' version, false otherwise
- Since:
- 7.0
-
RefreshAvailablePlugins
public void RefreshAvailablePlugins()
Refreshes the plugin repository list by contacting the server to ensure it is up to date (this is done automatically on a regular basis)- Since:
- 7.0
-
CanPluginBeDisabled
public boolean CanPluginBeDisabled(sage.Plugin Plugin)
Returns whether the specified plugin can be enabled/disabled. Only 'Standard' type plugins w/ an implementation class and STVIs can be enabled/disabled.- Parameters:
Plugin
- the specified Plugin object- Returns:
- true if the specified plugin can be enabled/disabled, false otherwise
- Since:
- 7.0
-
GetPluginName
public java.lang.String GetPluginName(sage.Plugin Plugin)
Gets the displayable name of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the displayable name of the specified Plugin object
- Since:
- 7.0
-
GetPluginIdentifier
public java.lang.String GetPluginIdentifier(sage.Plugin Plugin)
Gets the unique identifier of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the unique identifier of the specified Plugin object
- Since:
- 7.0
-
GetPluginAuthor
public java.lang.String GetPluginAuthor(sage.Plugin Plugin)
Gets the author of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the author of the specified Plugin object
- Since:
- 7.0
-
GetPluginReleaseNotes
public java.lang.String GetPluginReleaseNotes(sage.Plugin Plugin)
Gets the release notes attached to this specific version of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the release notes attached to this specific version of the specified Plugin object
- Since:
- 7.0
-
GetPluginModificationDate
public long GetPluginModificationDate(sage.Plugin Plugin)
Gets the last modification date of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the last modification date of the specified Plugin object
- Since:
- 7.0
-
GetPluginCreationDate
public long GetPluginCreationDate(sage.Plugin Plugin)
Gets the creation date of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the creation date of the specified Plugin object
- Since:
- 7.0
-
GetPluginInstallDate
public long GetPluginInstallDate(sage.Plugin Plugin)
Gets the date the specified Plugin object was installed- Parameters:
Plugin
- the specified Plugin object (must be an 'installed' Plugin object and not a 'repository' one)- Returns:
- the date the specified Plugin object was installed
- Since:
- 7.0
-
GetPluginDescription
public java.lang.String GetPluginDescription(sage.Plugin Plugin)
Gets the description of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the description of the specified Plugin object
- Since:
- 7.0
-
GetPluginVersion
public java.lang.String GetPluginVersion(sage.Plugin Plugin)
Gets the version of the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the version of the specified Plugin object
- Since:
- 7.0
-
GetPluginResourcePath
public java.lang.String GetPluginResourcePath(sage.Plugin Plugin)
Gets the relative path to resources used by the specified Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- the relative path to resources used by the specified Plugin object
- Since:
- 7.0
-
GetPluginScreenshots
public java.lang.String[] GetPluginScreenshots(sage.Plugin Plugin)
Returns an array of URLs to screenshots for the specified plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- an array of URLs to screenshots for the specified plugin object
- Since:
- 7.0
-
GetPluginDemoVideos
public java.lang.String[] GetPluginDemoVideos(sage.Plugin Plugin)
Returns an array of URLs to demo videos for the specified plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- an array of URLs to demo videos for the specified plugin object
- Since:
- 7.0
-
GetPluginWebsites
public java.lang.String[] GetPluginWebsites(sage.Plugin Plugin)
Returns an array of URLs to websites for the specified plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- an array of URLs to websites for the specified plugin object
- Since:
- 7.0
-
GetPluginType
public java.lang.String GetPluginType(sage.Plugin Plugin)
Returns the type of the specified plugin object. This wil be one of "Standard", "Theme", "STV", "STVI", "Library" or "Images". The empty string will be returned if an invalid argument is supplied.- Parameters:
Plugin
- the specified Plugin object- Returns:
- the type of the specified plugin object
- Since:
- 7.0
-
GetPluginDependencies
public java.lang.String[] GetPluginDependencies(sage.Plugin Plugin)
Returns an array of Strings which specifies the dependencies of this plugin. These strings will be descriptive and indicate the type of dependency (i.e. STV, Plugin, OS or Desktop) and the specifics of that dependency.- Parameters:
Plugin
- the specified Plugin object- Returns:
- an array of Strings which specifies the dependencies of this plugin
- Since:
- 7.0
-
IsPluginObject
public boolean IsPluginObject(java.lang.Object Plugin)
Returns true if the specified object is a Plugin object- Parameters:
Plugin
- the specified Plugin object- Returns:
- true if the specified object is a Plugin object, false otherwise
- Since:
- 7.0
-
DisablePlugin
public boolean DisablePlugin(sage.Plugin Plugin)
Disables the specified Plugin if it can be disabled. Some plugins, like Themes and STVs are disabled by simply selecting an alternate Theme or STV, so those do not have the ability to be 'disabled' in the sense that this API call refers to.- Parameters:
Plugin
- the specified Plugin object- Returns:
- true if disabling the plugin succeeded; if it fails its because there's another plugin dependent on it
- Since:
- 7.0
-
EnablePlugin
public boolean EnablePlugin(sage.Plugin Plugin)
Enables the specified Plugin if it can be enabled/disabled.- Parameters:
Plugin
- the specified Plugin object- Returns:
- true if it was successfully enabled, false otherwise; this will also return true even if the plugin does not have the ability to be enabled/disabled
- Since:
- 7.0
-
GetPluginIncompatabilityReason
public java.lang.String GetPluginIncompatabilityReason(sage.Plugin Plugin)
Returns the reason why the specified Plugin object is incompatible and cannot be installed. This can be due to operating system, desktop, STV, STV Version or plugin dependency version conflicts.- Parameters:
Plugin
- the specified Plugin object- Returns:
- a String describing the reason why the specified Plugin cannot be installed
- Since:
- 7.0
-
GetClientPluginIncompatabilityReason
public java.lang.String GetClientPluginIncompatabilityReason(sage.Plugin Plugin)
Returns the reason why the specified Plugin object is incompatible and cannot be installed. This can be due to operating system, desktop, STV, STV Version or plugin dependency version conflicts. This version of the API call relates to installation on non-localhost connected SageTVClients.- Parameters:
Plugin
- the specified Plugin object- Returns:
- a String describing the reason why the specified Plugin cannot be installed
- Since:
- 7.0
-
IsPluginCompatible
public boolean IsPluginCompatible(sage.Plugin Plugin)
Returns whether or not the specified Plugin object is compatible and can be installed. This can be due to operating system, desktop, STV, STV Version or plugin dependency version conflicts.- Parameters:
Plugin
- the specified Plugin object- Returns:
- true if the specified Plugin object is compatible and can be installed, false otherwise
- Since:
- 7.0
-
IsClientPluginCompatible
public boolean IsClientPluginCompatible(sage.Plugin Plugin)
Returns whether or not the specified Plugin object is compatible and can be installed. This can be due to operating system, desktop, STV, STV Version or plugin dependency version conflicts. This version of the API call relates to installation on non-localhost connected SageTVClients.- Parameters:
Plugin
- the specified Plugin object- Returns:
- true if the specified Plugin object is compatible and can be installed, false otherwise
- Since:
- 7.0
-
InstallPlugin
public java.lang.String InstallPlugin(sage.Plugin Plugin)
Installs or upgrades the specified Plugin. If there's a failure in doing so or a restart of SageTV is required after installing the plugin; the return value will indicate that.- Parameters:
Plugin
- the specified Plugin object- Returns:
- a String describing the install result; this will be "OK" if it was successful, "RESTART" if it was successful but a restart of SageTV is required or "FAILED - XXX" if a failure occurred with XXX describing the reason why
- Since:
- 7.0
-
InstallClientPlugin
public java.lang.String InstallClientPlugin(sage.Plugin Plugin)
Installs or upgrades the specified Plugin. If there's a failure in doing so or a restart of SageTV is required after installing the plugin; the return value will indicate that. This version of the API call relates to installation on non-localhost connected SageTVClients.- Parameters:
Plugin
- the specified Plugin object- Returns:
- a String describing the install result; this will be "OK" if it was successful, "RESTART" if it was successful but a restart of SageTV is required or "FAILED - XXX" if a failure occurred with XXX describing the reason why
- Since:
- 7.0
-
UninstallPlugin
public java.lang.String UninstallPlugin(sage.Plugin Plugin)
Uninstalls the specified Plugin. If there's a failure in doing so or a restart of SageTV is required after installing the plugin; the return value will indicate that. Failure will also occur if other plugins are dependent on this plugin.- Parameters:
Plugin
- the specified Plugin object- Returns:
- a String describing the install result; this will be "OK" if it was successful, "RESTART" if it was successful but a restart of SageTV is required or "FAILED - XXX" if a failure occurred with XXX describing the reason why
- Since:
- 7.0
-
GetPluginProgress
public java.lang.String GetPluginProgress()
Returns a progress based status message regarding any current plugin installation. There is no progress messages for plugin uninstalls since they should happen relatively quickly.- Returns:
- a String describing the current progress of plugin installation, or an empty string if its not currently in progress
- Since:
- 7.0
-
GetClientPluginProgress
public java.lang.String GetClientPluginProgress()
Returns a progress based status message regarding any current plugin installation. This is for non-localhost connected SageTVClients regarding client plugin installation. There is no progress messages for plugin uninstalls since they should happen relatively quickly.- Returns:
- a String describing the current progress of plugin installation, or an empty string if its not currently in progress
- Since:
- 7.0
-
AreClientPluginsSupported
public boolean AreClientPluginsSupported()
Returns true if this instance of SageTV supports installation of client plugins. This is true for SageTVClient applications that are not running on the same machine as the SageTV server itself. If they are running on the same machine; then their installations will be shared.- Returns:
- true if this instance of SageTV supports installation of client plugins, false otherwise
- Since:
- 7.0
-
GetPluginConfigSettings
public java.lang.String[] GetPluginConfigSettings(sage.Plugin Plugin)
Returns a list of the setting names for the specified Plugin object. These are not suitable for display; but should be used as the 'SettingName' for any of the plugin setting operations. Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin object- Returns:
- a String[] of the setting names for the specified Plugin object, a zero-length array will be returned if this Plugin has no configuration settings
- Since:
- 7.0
-
GetPluginConfigValue
public java.lang.String GetPluginConfigValue(sage.Plugin Plugin, java.lang.String SettingName)
Gets the current value for the specified configuration setting for the specified Plugin object. Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration setting- Returns:
- a String which represents the current value of the specified setting
- Since:
- 7.0
-
GetPluginConfigValues
public java.lang.String[] GetPluginConfigValues(sage.Plugin Plugin, java.lang.String SettingName)
Gets the current values for the specified configuration setting for the specified Plugin object. This should be used for plugin settings of type "Multichoice". Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration setting- Returns:
- a String[] which represents the current values of the specified setting
- Since:
- 7.0
-
GetPluginConfigType
public java.lang.String GetPluginConfigType(sage.Plugin Plugin, java.lang.String SettingName)
Gets the setting type for the specified configuration setting for the specified Plugin object. The possible values are "Boolean", "Integer", "Text", "Choice", "Multichoice", "File", "Directory", "Button" or "Password". Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration setting- Returns:
- a String which represents the type of the specified setting, the empty string will be returned if the call is invalid
- Since:
- 7.0
-
SetPluginConfigValue
public java.lang.String SetPluginConfigValue(sage.Plugin Plugin, java.lang.String SettingName, java.lang.String SettingValue)
Sets the value for the specified configuration setting for the specified Plugin object. Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration settingSettingValue
- the value to set the configuration setting to- Returns:
- null on success, or if an exception occurred while setting the value, a string representation of the exception will be returned
- Since:
- 7.0
-
SetPluginConfigValues
public java.lang.String SetPluginConfigValues(sage.Plugin Plugin, java.lang.String SettingName, java.lang.String[] SettingValues)
Sets the values for the specified configuration setting for the specified Plugin object. This should be used for plugin settings of type "Multichoice". Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration settingSettingValues
- the values to set the configuration setting to- Returns:
- null on success, or if an exception occurred while setting the value, a string representation of the exception will be returned
- Since:
- 7.0
-
GetPluginConfigOptions
public java.lang.String[] GetPluginConfigOptions(sage.Plugin Plugin, java.lang.String SettingName)
Gets all the options available for the specified configuration setting for the specified Plugin object. This should be used for plugin settings of type "Multichoice" or "Choice". These are the different choices that the user will select from. Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration setting- Returns:
- a String[] which represents all of the choice options for the specified setting
- Since:
- 7.0
-
GetPluginConfigHelpText
public java.lang.String GetPluginConfigHelpText(sage.Plugin Plugin, java.lang.String SettingName)
Gets the help text to describe the specified configuration setting for the specified Plugin object. Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration setting- Returns:
- a String which is help text to further describe the specified setting
- Since:
- 7.0
-
GetPluginConfigLabel
public java.lang.String GetPluginConfigLabel(sage.Plugin Plugin, java.lang.String SettingName)
Gets the label to describe the specified configuration setting for the specified Plugin object. This should be used for UI display when presenting this setting to the user instead of the SettingName. Only enabled plugins can be configured.- Parameters:
Plugin
- the specified Plugin objectSettingName
- the name of the plugin configuration setting- Returns:
- a String which is a label to describe the specified setting in the UI
- Since:
- 7.0
-
ResetPluginConfiguration
public void ResetPluginConfiguration(sage.Plugin Plugin)
Resets the configuration for the specified plugin. If this is called on a disabled plugin, then next time it is enabled the configuration will be reset.- Parameters:
Plugin
- the specified Plugin object- Since:
- 7.0
-
IsPluginConfigurable
public boolean IsPluginConfigurable(sage.Plugin Plugin)
Returns true if the specified plugin can be configured when enabled. If it is disabled, it can still have its configuration reset.- Parameters:
Plugin
- the specified Plugin object- Returns:
- true if the specified plugin can be configured when enabled; if it is disabled, it can still have its configuration reset
- Since:
- 7.0
-
GetPluginImplementation
public sage.SageTVPlugin GetPluginImplementation(sage.Plugin Plugin)
Returns the actual object that implements the sage.SageTVPlugin interface for the specified Plugin. This will only be valid if the Plugin has an actual implementation and is being called on a plugin that is valid in this context (i.e. you can't call it on a server plugin in the client JVM). DO NOT use this object to start/stop or perform other behaviors that are normally done by the SageTV core on that object.- Parameters:
Plugin
- the specified Plugin object- Returns:
- the actual plugin implementation object for the specified plugin, or null if it can't be obtained or doesn't exist
- Since:
- 7.0
-
IsPluginStartupComplete
public boolean IsPluginStartupComplete()
Returns true once all of the core plugins that are enabled have completed their startup process. This can be useful because plugins are loaded asynchronously with the UI and sometimes a UI needs to wait for their startup process to be completed before it loads. For client instances; this will return true once client and server plugin startup has completed.- Returns:
- true once all of the core plugins that are enabled have completed their startup process, false otherwise
- Since:
- 7.0
-
-