public abstract class AbstractPluginManager extends java.lang.Object implements PluginManager
Constructor and Description |
---|
AbstractPluginManager() |
Modifier and Type | Method and Description |
---|---|
protected abstract ConfigurationManager |
getConfigurationManager() |
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.
|
protected abstract EventManager |
getEventManager() |
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.
|
DeviceVariableState |
getLocalPluginDeviceVariable(DeviceVariableContext ctx)
Returns information about a plugin device variable.
|
protected abstract HobsonPlugin |
getLocalPluginInternal(PluginContext ctx) |
boolean |
hasLocalPluginDeviceVariable(DeviceVariableContext ctx)
Indicates whether a plugin has published a device variable.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addRemoteRepository, getLocalPluginDeviceLastCheckin, getLocalPluginIcon, getLocalPlugins, getRemotePlugin, getRemotePlugins, getRemotePluginVersions, getRemoteRepositories, installRemotePlugin, reloadLocalPlugin, removeRemoteRepository
protected abstract HobsonPlugin getLocalPluginInternal(PluginContext ctx)
protected abstract ConfigurationManager getConfigurationManager()
protected abstract EventManager getEventManager()
public HobsonLocalPluginDescriptor getLocalPlugin(PluginContext ctx)
PluginManager
getLocalPlugin
in interface PluginManager
ctx
- the context of the target pluginpublic PropertyContainer getLocalPluginConfiguration(PluginContext ctx)
PluginManager
getLocalPluginConfiguration
in interface PluginManager
ctx
- the context of the target pluginpublic void setLocalPluginConfiguration(PluginContext ctx, java.util.Map<java.lang.String,java.lang.Object> config)
PluginManager
setLocalPluginConfiguration
in interface PluginManager
ctx
- the context of the target pluginconfig
- the plugin configurationpublic void setLocalPluginConfigurationProperty(PluginContext ctx, java.lang.String name, java.lang.Object value)
PluginManager
setLocalPluginConfigurationProperty
in interface PluginManager
ctx
- the context of the target hubname
- the configuration property namevalue
- the configuration property valuepublic Future startPluginDevice(HobsonDeviceProxy device, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> config, java.lang.Runnable runnable)
PluginManager
startPluginDevice
in interface PluginManager
device
- the device proxyname
- the device's nameconfig
- the device's configurationrunnable
- a Runnable to execute after the device has started.public java.io.File getDataDirectory(PluginContext ctx)
PluginManager
getDataDirectory
in interface PluginManager
ctx
- the context of the pluginpublic java.io.File getDataFile(PluginContext ctx, java.lang.String filename)
PluginManager
getDataFile
in interface PluginManager
ctx
- the context of the plugin requesting the filefilename
- the name of the data filepublic GlobalVariable getGlobalVariable(GlobalVariableContext gvctx)
PluginManager
getGlobalVariable
in interface PluginManager
gvctx
- the variable contextpublic java.util.Collection<GlobalVariable> getGlobalVariables(PluginContext pctx)
PluginManager
getGlobalVariables
in interface PluginManager
pctx
- the plugin contextpublic DeviceVariableState getLocalPluginDeviceVariable(DeviceVariableContext ctx)
PluginManager
getLocalPluginDeviceVariable
in interface PluginManager
ctx
- the variable contextpublic boolean hasLocalPluginDeviceVariable(DeviceVariableContext ctx)
PluginManager
hasLocalPluginDeviceVariable
in interface PluginManager
ctx
- the device variable contextCopyright © 2015 Whizzo Software LLC. All rights reserved.