com.unitesk.atp.tool
Class PluginClass

java.lang.Object
  extended by com.unitesk.atp.tool.PluginClass
All Implemented Interfaces:
Plugin
Direct Known Subclasses:
Plugin

public abstract class PluginClass
extends Object
implements Plugin

Plugin is a tool functionality extention module. This default implementation of interface Plugin functionality.

Version:
$Id: PluginClass.java,v 1.2 2004/10/11 15:00:44 all-x Exp $
Author:
Alexey Demakov

Field Summary
protected  MessageBox mbox
           
protected  String name
           
protected  PluginManager pm
           
 
Constructor Summary
PluginClass()
           
 
Method Summary
 String getName()
          Returns plugin name.
 Object getPlugin(String name)
          Returns plugin with the specified name.
 PluginManager getPluginManager()
          Gets plugin manager for this plugin.
 String getProperty(String name)
          Gets the value of a plugin property with the specified name.
 String getProperty(String name, String value)
          Gets the value of a plugin property with the specified name or the specified default value if this property is not defined.
 String getPropertyName(String name)
          Gets the name of a system property for the specified plugin property.
static String getRevision(String rev)
          Returns revision number from CVS tag #Revision#
 void init(PluginManager pm, String name)
          Links this plugin to the specified plugin manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.unitesk.atp.tool.Plugin
getKind, getVersion
 

Field Detail

pm

protected PluginManager pm

mbox

protected MessageBox mbox

name

protected String name
Constructor Detail

PluginClass

public PluginClass()
Method Detail

getName

public final String getName()
Returns plugin name.

Specified by:
getName in interface Plugin
Returns:
plugin name

init

public void init(PluginManager pm,
                 String name)
Links this plugin to the specified plugin manager. Must be called before plugin usage.

Specified by:
init in interface Plugin
Parameters:
pm - The plugin manager to link plugin to.
name - The name of plugin.

getPlugin

public final Object getPlugin(String name)
Returns plugin with the specified name. Any object can be plugin.

Specified by:
getPlugin in interface Plugin
Parameters:
name - The name of plugin.

getPropertyName

public final String getPropertyName(String name)
Gets the name of a system property for the specified plugin property.

Specified by:
getPropertyName in interface Plugin
Parameters:
name - The name of a plugin property.
Returns:
The name of a system property.

getProperty

public final String getProperty(String name)
Gets the value of a plugin property with the specified name.

Specified by:
getProperty in interface Plugin
Parameters:
name - The name of a plugin property.
Returns:
The value of a plugin property with the specified name.

getProperty

public String getProperty(String name,
                          String value)
Gets the value of a plugin property with the specified name or the specified default value if this property is not defined.

Specified by:
getProperty in interface Plugin
Parameters:
name - The name of a plugin property.
value - The default value of a property.
Returns:
The value of a plugin property with the specified name.

getRevision

public static String getRevision(String rev)
Returns revision number from CVS tag #Revision#

Parameters:
rev - Revision string.
Returns:
Revision number.

getPluginManager

public PluginManager getPluginManager()
Gets plugin manager for this plugin.

Specified by:
getPluginManager in interface Plugin
Returns:
The plugin manager for this plugin


Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.