|
Hyperic HQ Plugin API v. 2.5.dev | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.hyperic.hq.product.GenericPlugin
Field Summary | |
protected ConfigResponse |
config
|
static java.lang.String |
FILE_DELIM
|
static java.lang.String |
FILE_DELIM_ESC
|
static java.lang.String |
PROP_NAME
Key used to store value of XML resource name attribute. |
Constructor Summary | |
GenericPlugin()
|
Method Summary | |
void |
configure(ConfigResponse config)
|
protected java.lang.String[] |
getAbsoluteFiles(java.lang.String value,
java.lang.String dir)
Expand a String to array of absolute file names. |
ConfigResponse |
getConfig()
|
java.lang.String |
getConfig(java.lang.String key)
Shortcut, same as getConfig().getValue(key) |
ConfigSchema |
getConfigSchema(TypeInfo info,
ConfigResponse config)
The ConfigSchema used to render config options for this resource in the UI and client shell. |
ConfigSchema |
getCustomPropertiesSchema()
|
ConfigSchema |
getCustomPropertiesSchema(java.lang.String name)
|
ConfigSchema |
getCustomPropertiesSchema(TypeInfo info)
|
java.lang.String |
getDefaultInstallPath()
|
protected org.apache.commons.logging.Log |
getLog()
Wrapper for LogFactory.getLog which uses the name returned by getLogName(). |
protected java.lang.String |
getLogName()
Default name for getLog() method. |
java.lang.String |
getName()
Unique name used by PluginManager.getPlugin |
protected static java.lang.String |
getPlatformName()
Method to assist with naming of resources. |
java.lang.String |
getPluginClassName(java.lang.String pluginType,
java.lang.String resourceType)
|
ProductPlugin |
getProductPlugin()
Get the ProductPlugin that defined the TypeInfo for this plugin instance. |
java.util.Properties |
getProperties()
Get all properties defined using <property> in the plugin's hq-plugin.xml |
java.lang.String |
getProperty(java.lang.String name)
Get a value defined by a <property> tag in the plugin's hq-plugin.xml |
TypeInfo |
getTypeInfo()
|
java.lang.String |
getTypeNameProperty()
Shortcut, same as:
getTypeNameProperty(getTypeInfo().getName());
|
java.lang.String |
getTypeNameProperty(java.lang.String type)
Shortcut, same as:
getTypeProperty(type, PROP_NAME);
|
java.lang.String |
getTypeProperty(java.lang.String name)
Shortcut, same as:
getTypeProperty(getTypeInfo().getName(), name);
|
java.lang.String |
getTypeProperty(java.lang.String type,
java.lang.String name)
Get a value defined by a <property> tag in the plugin's hq-plugin.xml, within a <server> or <service> tag for this plugin's type. |
java.lang.String |
getTypeProperty(TypeInfo type,
java.lang.String name)
If name property is not found for the given type, try using the type's parent. |
void |
init(PluginManager manager)
Called when the plugin is loaded on the server and on the agent side. |
static boolean |
isWin32()
|
java.io.InputStream |
openResource(java.lang.String name)
Wrapper around ClassLoader.getResource/getResourceAsStream to open a resource from this plugin's .jar file. |
void |
setName(java.lang.String name)
|
void |
setTypeInfo(TypeInfo type)
|
void |
shutdown()
Called when the server or agent is shutdown. |
protected java.util.List |
toFileList(java.lang.String value)
Expand a String to List of file names. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROP_NAME
protected ConfigResponse config
public static final java.lang.String FILE_DELIM
public static final java.lang.String FILE_DELIM_ESC
Constructor Detail |
public GenericPlugin()
Method Detail |
protected java.util.List toFileList(java.lang.String value)
value
- Comma delimited list of files
protected java.lang.String[] getAbsoluteFiles(java.lang.String value, java.lang.String dir)
value
- Expanded using toFileList()dir
- Parent directory used to resolve relative file names.
public static boolean isWin32()
protected static java.lang.String getPlatformName()
public java.lang.String getName()
public void setName(java.lang.String name)
public TypeInfo getTypeInfo()
public void setTypeInfo(TypeInfo type)
public ConfigSchema getConfigSchema(TypeInfo info, ConfigResponse config)
info
- The TypeInfo of this plugin from ProductPlugin.getTypesconfig
- ConfigReponse of the parent resource (if any).
public ConfigSchema getCustomPropertiesSchema(java.lang.String name)
public ConfigSchema getCustomPropertiesSchema(TypeInfo info)
public ConfigSchema getCustomPropertiesSchema()
public java.lang.String getProperty(java.lang.String name)
public java.util.Properties getProperties()
public java.lang.String getTypeProperty(java.lang.String type, java.lang.String name)
Same as:
getProperty(type + "." + name);
public java.lang.String getTypeProperty(TypeInfo type, java.lang.String name)
public java.lang.String getTypeProperty(java.lang.String name)
getTypeProperty(getTypeInfo().getName(), name);
public java.lang.String getTypeNameProperty(java.lang.String type)
getTypeProperty(type, PROP_NAME);
public java.lang.String getTypeNameProperty()
getTypeNameProperty(getTypeInfo().getName());
public void init(PluginManager manager) throws PluginException
manager
- The plugin manager for this plugin type.
PluginException
public void shutdown() throws PluginException
PluginException
public ConfigResponse getConfig()
public java.lang.String getConfig(java.lang.String key)
public void configure(ConfigResponse config) throws PluginException
PluginException
public java.lang.String getDefaultInstallPath()
protected java.lang.String getLogName()
protected org.apache.commons.logging.Log getLog()
public ProductPlugin getProductPlugin()
public java.io.InputStream openResource(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.lang.String getPluginClassName(java.lang.String pluginType, java.lang.String resourceType)
|
Hyperic HQ Plugin API v. 2.5.dev | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |