Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 5.8.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.product
Class ProductPluginManager

    java.lang.Object
      org.hyperic.hq.product.PluginManager
          org.hyperic.hq.product.ProductPluginManager

    public class ProductPluginManager

extends PluginManager

This class is a manager for ProductPlugin implementations and is also a manager of plugin managers.

Field Summary
`static File` | `PLUGIN_PROPERTIES_FILE`
`static String` | `PROP_PDK_DIR`
`static String` | `PROPERTY_PREFIX`

Fields inherited from class org.hyperic.hq.product.PluginManager
`plugins`

Constructor Summary
`ProductPluginManager()`
`ProductPluginManager(File file)`
`ProductPluginManager(Properties props)`

Method Summary
`void` | `addPluginTypes(TypeInfo[] types, ProductPlugin plugin)`
`Collection<PluginInfo>` | `getAllPluginInfoDirectFromFileSystem(String path)`
`ServerDetector` | `getAutoinventoryPlugin(String name)`
`AutoinventoryPluginManager` | `getAutoinventoryPluginManager()`
`org.hyperic.util.config.ConfigSchema` | `getConfigSchema(String pluginName, String platformName, String typeName, TypeInfo info, org.hyperic.util.config.ConfigResponse config)` As opposed to other plugins, product plugins are fetched by plugin name
`ConfigTrackPluginManager` | `getConfigTrackPluginManager()`
`ControlPlugin` | `getControlPlugin(String name)`
`ControlPluginManager` | `getControlPluginManager()`
`LiveDataPluginManager` | `getLiveDataPluginManager()`
`LogTrackPluginManager` | `getLogTrackPluginManager()`
`MeasurementPlugin` | `getMeasurementPlugin(String name)`
`MeasurementPluginManager` | `getMeasurementPluginManager()`
`String` | `getName()`
`static String` | `getNameFromFile(String file)` Derive plugin name from file name-plugin.ext
`static String` | `getPdkDir()`
`static String` | `getPdkPluginsDir()`
`static String` | `getPdkWorkDir()`
`PluginManager` | `getPluginManager(String type)`
`Map<String,String>` | `getPluginVersions(String pluginDir)`
`ProductPlugin` | `getProductPlugin(String name)`
`static String` | `getPropertyKey(String plugin, String key)`
`boolean` | `getRegisterTypes()`
`RtPlugin` | `getRtPlugin(String name)`
`RtPluginManager` | `getRtPluginManager()`
`Map<String,TypeInfo>` | `getTypeInfo(String typeName)` Find TypeInfo's accross all platforms for the given type name.
`TypeInfo` | `getTypeInfo(String platform, String name)` Find TypeInfo for the given platform and type name.
`Map<String,Map<String,TypeInfo>>` | `getTypes()`
`void` | `init()`
`protected void` | `initPluginManagers(Properties props)`
`boolean` | `isClient()`
`boolean` | `isLoadablePluginName(String name)`
`PluginInfo` | `registerPluginJar(String jarName)` registerPluginJar() without mapping types.
`PluginInfo` | `registerPluginJar(String jarName, ClassLoader resourceLoader)` Load a product plugin jar.
`Collection<PluginInfo>` | `registerPlugins(String path, Collection<PluginInfo> excludes)`
`void` | `removePluginJar(String jarName)`
`void` | `removePluginTypes(List<TypeInfo> typeInfos)`
`static void` | `setPdkDir(String dir)`
`static void` | `setPdkPluginsDir(String dir)`
`static void` | `setPdkWorkDir(String dir)`
`void` | `setProperty(String key, String value)`
`void` | `setRegisterTypes(boolean registerTypes)` If true creates a mapping of the ProductPlugin TypeInfos, only needed on the server side.
`protected void` | `setTypeInfo(String platform, String name, TypeInfo info)`
`void` | `shutdown()`
`void` | `updatePluginJar(String jarName)`

Methods inherited from class org.hyperic.hq.product.PluginManager
`classNotFoundMessage, createPlugin, createPlugin, createPlugin, getConfigSchema, getParent, getPlatformPlugin, getPlatformPlugin, getPlatformPlugins, getPlatformPlugins, getPlugin, getPluginInfo, getPlugins, getPlugins, getProperties, getProperty, getProperty, init, isPropertyEnabled, isPropertyEnabled, isRegistered, mergeConfigSchema, registerPlugin, registerPlugin, registerPlugin, removePlugin, setPluginInfo, updatePlugin`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROP_PDK_DIR

    public static final String PROP_PDK_DIR

See Also:
  Constant Field Values

### PLUGIN_PROPERTIES_FILE

    public static final File PLUGIN_PROPERTIES_FILE

### PROPERTY_PREFIX

    public static final String PROPERTY_PREFIX

See Also:
  Constant Field Values

Constructor Detail

### ProductPluginManager

    public ProductPluginManager()

### ProductPluginManager

    public ProductPluginManager(File file)

### ProductPluginManager

    public ProductPluginManager(Properties props)

Method Detail

### setRegisterTypes

    public void setRegisterTypes(boolean registerTypes)

  If true creates a mapping of the ProductPlugin TypeInfos, only needed on the server side.

### getRegisterTypes

    public boolean getRegisterTypes()

### getPropertyKey

    public static String getPropertyKey(String plugin,
                                        String key)

### getName

    public String getName()

  Specified by:
    `getName` in class `PluginManager`

### getNameFromFile

    public static String getNameFromFile(String file)

  Derive plugin name from file name-plugin.ext

### getTypeInfo

    public TypeInfo getTypeInfo(String platform,
                                String name)

  Find TypeInfo for the given platform and type name.

  Parameters:
    `platform` - The platform name, e.g. "Linux"
    `name` - The type name, e.g. "Apache 2.0"

### getTypeInfo

    public Map<String,TypeInfo> getTypeInfo(String typeName)

  Find TypeInfo's accross all platforms for the given type name.

  Parameters:
    `name` - The type name, e.g. "Apache 2.0"
  Returns:
    map the type per platform

### getTypes

    public Map<String,Map<String,TypeInfo>> getTypes()

### setTypeInfo

    protected void setTypeInfo(String platform,
                               String name,
                               TypeInfo info)

### getPdkDir

    public static String getPdkDir()

### setPdkDir

    public static void setPdkDir(String dir)

### getPdkPluginsDir

    public static String getPdkPluginsDir()

### setPdkPluginsDir

    public static void setPdkPluginsDir(String dir)

### getPdkWorkDir

    public static String getPdkWorkDir()

### setPdkWorkDir

    public static void setPdkWorkDir(String dir)

### init

    public void init()
              throws PluginException

  Throws:
    `PluginException`

### initPluginManagers

    protected void initPluginManagers(Properties props)
                               throws PluginException

  Throws:
    `PluginException`

### getPluginVersions

    public Map<String,String> getPluginVersions(String pluginDir)

### shutdown

    public void shutdown()
                  throws PluginException

  Overrides:
    `shutdown` in class `PluginManager`
  Throws:
    `PluginException`

### getMeasurementPluginManager

    public MeasurementPluginManager getMeasurementPluginManager()

### getControlPluginManager

    public ControlPluginManager getControlPluginManager()

### getAutoinventoryPluginManager

    public AutoinventoryPluginManager getAutoinventoryPluginManager()

### getRtPluginManager

    public RtPluginManager getRtPluginManager()

### getLogTrackPluginManager

    public LogTrackPluginManager getLogTrackPluginManager()

### getConfigTrackPluginManager

    public ConfigTrackPluginManager getConfigTrackPluginManager()

### getLiveDataPluginManager

    public LiveDataPluginManager getLiveDataPluginManager()

### getMeasurementPlugin

    public MeasurementPlugin getMeasurementPlugin(String name)

### getControlPlugin

    public ControlPlugin getControlPlugin(String name)

### getAutoinventoryPlugin

    public ServerDetector getAutoinventoryPlugin(String name)

### getRtPlugin

    public RtPlugin getRtPlugin(String name)

### getProductPlugin

    public ProductPlugin getProductPlugin(String name)

### isLoadablePluginName

    public boolean isLoadablePluginName(String name)

### registerPluginJar

    public PluginInfo registerPluginJar(String jarName)
                                 throws PluginException,
                                        PluginExistsException

  registerPluginJar() without mapping types.

  Parameters:
    `jarName` - The name of the jar file on disk.
  Throws:
    `PluginException`
    `PluginExistsException`
  See Also:
    `registerPluginJar(String jarName,ClassLoader resourceLoader)`

### getAllPluginInfoDirectFromFileSystem

    public Collection<PluginInfo> getAllPluginInfoDirectFromFileSystem(String path)

### registerPlugins

    public Collection<PluginInfo> registerPlugins(String path,
                                                  Collection<PluginInfo> excludes)

### registerPluginJar

    public PluginInfo registerPluginJar(String jarName,
                                        ClassLoader resourceLoader)
                                 throws PluginException,
                                        PluginExistsException

  Load a product plugin jar. Registers the product plugin, as defined by the Main-Class jar manifest attribute which must be a class which implements the ProductPlugin interface. Registers plugins supported for each plugin type (control, measurement, responsetime) as returned by the ProductPlugin.getPlugin method.

  Parameters:
    `jarName` - The name of the jar file on disk.
    `resourceLoader` - ClassLoader used to find jar resources.
  Returns:
    The name of the product plugin as returned by ProductPlugin.getName.
  Throws:
    `PluginException`
    `PluginExistsException`
  See Also:
    `ProductPlugin`

### addPluginTypes

    public void addPluginTypes(TypeInfo[] types,
                               ProductPlugin plugin)
                        throws PluginExistsException

  Throws:
    `PluginExistsException`

### removePluginTypes

    public void removePluginTypes(List<TypeInfo> typeInfos)

### removePluginJar

    public void removePluginJar(String jarName)
                         throws PluginException

  Throws:
    `PluginException`

### updatePluginJar

    public void updatePluginJar(String jarName)
                         throws PluginException

  Throws:
    `PluginException`

### getPluginManager

    public PluginManager getPluginManager(String type)
                                   throws PluginException

  Throws:
    `PluginException`

### setProperty

    public void setProperty(String key,
                            String value)

### isClient

    public boolean isClient()

### getConfigSchema

    public org.hyperic.util.config.ConfigSchema getConfigSchema(String pluginName,
                                                                String platformName,
                                                                String typeName,
                                                                TypeInfo info,
                                                                org.hyperic.util.config.ConfigResponse config)
                                                         throws PluginNotFoundException

  As opposed to other plugins, product plugins are fetched by plugin name

  Overrides:
    `getConfigSchema` in class `PluginManager`
  Throws:
    `PluginNotFoundException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 5.8.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2010 Hyperic, Inc. support@hyperic.net, All Rights Reserved.