public interface PluginManager
Modifier and Type | Method and Description |
---|---|
void |
addRemoteRepository(java.lang.String uri)
Add a remote repository.
|
java.io.File |
getDataDirectory(PluginContext ctx)
Returns a File for a plugin's data directory.
|
java.io.File |
getDataFile(PluginContext ctx,
java.lang.String filename)
Returns a File for a named file located in a plugin's data directory.
|
GlobalVariable |
getGlobalVariable(GlobalVariableContext gvctx)
Returns a global variable.
|
java.util.Collection<GlobalVariable> |
getGlobalVariables(PluginContext pctx)
Returns all global variables published by a plugin.
|
HobsonLocalPluginDescriptor |
getLocalPlugin(PluginContext ctx)
Retrieves a specific plugin.
|
PropertyContainer |
getLocalPluginConfiguration(PluginContext ctx)
Returns the plugin level configuration.
|
java.lang.Long |
getLocalPluginDeviceLastCheckin(PluginContext ctx,
java.lang.String deviceId)
Returns the last check in time of a plugin's device.
|
DeviceVariableState |
getLocalPluginDeviceVariable(DeviceVariableContext ctx)
Returns information about a plugin device variable.
|
ImageInputStream |
getLocalPluginIcon(PluginContext ctx)
Returns a plugin's icon.
|
java.util.Collection<HobsonLocalPluginDescriptor> |
getLocalPlugins(HubContext ctx)
Returns information about all local plugins installed on the hub.
|
HobsonPluginDescriptor |
getRemotePlugin(PluginContext ctx,
java.lang.String version)
Retrieves descriptor for a remotely available plugin.
|
java.util.Collection<HobsonPluginDescriptor> |
getRemotePlugins(HubContext ctx)
Retrieve descriptors for all remotely available plugins.
|
java.util.Map<java.lang.String,java.lang.String> |
getRemotePluginVersions(HubContext ctx)
Retrieve the latest version of available remote plugins.
|
java.util.Collection<java.lang.String> |
getRemoteRepositories()
Returns the remote repositories that have been enabled.
|
boolean |
hasLocalPluginDeviceVariable(DeviceVariableContext ctx)
Indicates whether a plugin has published a device variable.
|
void |
installRemotePlugin(PluginContext ctx,
java.lang.String pluginVersion)
Installs a specific version of a remote plugin.
|
void |
reloadLocalPlugin(PluginContext ctx)
Reloads the specified plugin.
|
void |
removeRemoteRepository(java.lang.String uri)
Removes a remote repository.
|
void |
setLocalPluginConfiguration(PluginContext ctx,
java.util.Map<java.lang.String,java.lang.Object> config)
Sets the plugin level configuration.
|
void |
setLocalPluginConfigurationProperty(PluginContext ctx,
java.lang.String name,
java.lang.Object value)
Sets an individual plugin level configuration property.
|
Future |
startPluginDevice(HobsonDeviceProxy device,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> config,
java.lang.Runnable runnable)
Starts a plugin device.
|
void addRemoteRepository(java.lang.String uri)
uri
- the URI of the repositoryjava.io.File getDataDirectory(PluginContext ctx)
ctx
- the context of the pluginjava.io.File getDataFile(PluginContext ctx, java.lang.String filename)
ctx
- the context of the plugin requesting the filefilename
- the name of the data fileGlobalVariable getGlobalVariable(GlobalVariableContext gvctx)
gvctx
- the variable contextjava.util.Collection<GlobalVariable> getGlobalVariables(PluginContext pctx)
pctx
- the plugin contextHobsonLocalPluginDescriptor getLocalPlugin(PluginContext ctx)
ctx
- the context of the target pluginPropertyContainer getLocalPluginConfiguration(PluginContext ctx)
ctx
- the context of the target pluginjava.lang.Long getLocalPluginDeviceLastCheckin(PluginContext ctx, java.lang.String deviceId)
ctx
- the plugin contextdeviceId
- the device IDDeviceVariableState getLocalPluginDeviceVariable(DeviceVariableContext ctx)
ctx
- the variable contextImageInputStream getLocalPluginIcon(PluginContext ctx)
ctx
- the context of the target pluginjava.util.Collection<HobsonLocalPluginDescriptor> getLocalPlugins(HubContext ctx)
ctx
- the hub contextHobsonPluginDescriptor getRemotePlugin(PluginContext ctx, java.lang.String version)
ctx
- the context of the pluginversion
- the plugin versionjava.util.Collection<HobsonPluginDescriptor> getRemotePlugins(HubContext ctx)
ctx
- the context of the target hubjava.util.Map<java.lang.String,java.lang.String> getRemotePluginVersions(HubContext ctx)
ctx
- the hub contextjava.util.Collection<java.lang.String> getRemoteRepositories()
boolean hasLocalPluginDeviceVariable(DeviceVariableContext ctx)
ctx
- the device variable contextvoid installRemotePlugin(PluginContext ctx, java.lang.String pluginVersion)
ctx
- the context of the target pluginpluginVersion
- the plugin version to installvoid reloadLocalPlugin(PluginContext ctx)
ctx
- the context of the target pluginvoid removeRemoteRepository(java.lang.String uri)
uri
- the URI of the repository to removevoid setLocalPluginConfiguration(PluginContext ctx, java.util.Map<java.lang.String,java.lang.Object> config)
ctx
- the context of the target pluginconfig
- the plugin configurationvoid setLocalPluginConfigurationProperty(PluginContext ctx, java.lang.String name, java.lang.Object value)
ctx
- the context of the target hubname
- the configuration property namevalue
- the configuration property valueFuture startPluginDevice(HobsonDeviceProxy device, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> config, java.lang.Runnable runnable)
device
- the device proxyname
- the device's nameconfig
- the device's configurationrunnable
- a Runnable to execute after the device has started.Copyright © 2015 Whizzo Software LLC. All rights reserved.