T-Plan Robot Enterprise 4.0.1
Build No. 4.0.1-20141118.1

com.tplan.robot.plugin
Interface Plugin

All Known Subinterfaces:
RemoteDesktopClient, ReportProvider
All Known Implementing Classes:
AbstractCommandHandler, AbstractRemoteDesktopClient, AbstractTestScriptInterpret, CharsetCaptureGuiInstaller, DefaultReportProvider, ExecutionFallBackManager, HistogramComparisonModule, ObjectSearchModule, PlainTextInterpret, PluginInfo, SearchImageComparisonModule, SearchImageComparisonModule2, TesseractOCR, TextRecognitionComparisonModule, XSLReportProvider

public interface Plugin

Interface declaring methods of a T-Plan Robot Enterprise plugin. See the PluginManager documentation for more information on the T-Plan Robot Enterprise Plugin Framework and general requirements on plugins.


T-Plan Robot Enterprise, (C) 2009-2014 T-Plan Limited. All rights reserved.


Method Summary
 void checkDependencies(PluginManager manager)
          Check whether the current product installation contains all dependencies (other plugins) required to install this plugin.
 java.lang.String getCode()
          Get plugin code.
 java.util.Date getDate()
          Get plugin release date.
 java.lang.String getDescription()
          Get plugin description to be displayed in the GUI.
 java.lang.String getDisplayName()
          Get short plugin name to be displayed in the GUI.
 java.lang.Class getImplementedInterface()
          Get Class of the exposed functional interface that this plugin implements.
 int[] getLowestSupportedVersion()
          Get the lowest required version of T-Plan Robot Enterprise.
 java.lang.String getMessageAfterInstall()
          Get text of a message to be displayed after installation of this plugin.
 java.lang.String getMessageBeforeInstall()
          Get text of a message to be displayed before installation of this plugin.
 java.lang.String getSupportContact()
          Get support contact.
 java.lang.String getUniqueId()
          Get unique ID associated with the plugin.
 java.lang.String getVendorHomePage()
          Get the vendor home page.
 java.lang.String getVendorName()
          Get vendor (provider) name to be displayed in the GUI.
 int[] getVersion()
          Get plugin version in form of an integer array.
 boolean requiresRestart()
          Indicate whether installation of this plugin requires application restart.
 

Method Detail

getCode

java.lang.String getCode()

Get plugin code. This string serves as an identifier of the functionality delivered by the plugin. For example, desktop client plugins return protocol name like "RFB" or "RDP" as their code.

Plugin code is used by pluggable instance factories to identify a particular plugin. It may be used to replace internal plugins with third party code. For example if you develop a class which implements this and the com.tplan.robot.remoteclient.RemoteDesktop interfaces and the getCode() method returns "RFB", it will replace the internal implementation of the RFB (VNC) client.

Returns:
plugin code (identifier). The name must not be null.

getDisplayName

java.lang.String getDisplayName()
Get short plugin name to be displayed in the GUI.

Returns:
short plugin name.

getDescription

java.lang.String getDescription()
Get plugin description to be displayed in the GUI.

Returns:
plugin description. May be null.

getVendorName

java.lang.String getVendorName()
Get vendor (provider) name to be displayed in the GUI.

Returns:
vendor name. May be null.

getVendorHomePage

java.lang.String getVendorHomePage()
Get the vendor home page. If the contact is a valid HTTP link like "http://<link>", the application may follow it with appropriate program (typically web browser).

Returns:
vendor home page URL.

getSupportContact

java.lang.String getSupportContact()
Get support contact. If the contact is a valid mail link like "mailto:<mailaddress>" or an HTTP link like "http://<link>", the application may follow it with appropriate program (mail client or web browser).

Returns:
support contact. May be null or a text to be displayed by the GUI or a valid URI.

getVersion

int[] getVersion()
Get plugin version in form of an integer array. Major version numbers are first. For example, version 1.2.3 should be represented as new int[] { 1, 2, 3 }.

Returns:
version number.

getUniqueId

java.lang.String getUniqueId()

Get unique ID associated with the plugin. The plugin manager uses the ID together with the version string to identify whether a plugin is already installed and whether a newer version of the same plugin is available.

The unique ID in fact identifies a particular plugin delivered by a particular vendor. Plugin developers are recommended to choose an ID and keep it constant for all versions of one particular plugin. The ID is never displayed in the GUI so it doesn't have to be a readable text. To avoid conflicts with other vendors it is recommended to elaborate vendor or author name and feature description into the ID, for example "custom RFB client implemented by John Doe".

Returns:
unique plugin ID.

getDate

java.util.Date getDate()
Get plugin release date.

Returns:
plugin release date.

getImplementedInterface

java.lang.Class getImplementedInterface()
Get Class of the exposed functional interface that this plugin implements. For example remote desktop clients return com.tplan.robot.remoteclient.RemoteDesktopClient.class.

Returns:
class instance of the implemented functional interface.

requiresRestart

boolean requiresRestart()
Indicate whether installation of this plugin requires application restart. If it returns true, users are asked to restart after plugin installation via GUI.

Returns:
true if installation of the plugin requires application restart, false otherwise.

getLowestSupportedVersion

int[] getLowestSupportedVersion()
Get the lowest required version of T-Plan Robot Enterprise. If user attempts to install the plugin on a lower version, an error is reported.

Returns:
the lowest T-Plan Robot Enterprise version supported by this plugin.

getMessageBeforeInstall

java.lang.String getMessageBeforeInstall()
Get text of a message to be displayed before installation of this plugin. It may contain any relevant user information.

Returns:
message to be displayed before installation.

getMessageAfterInstall

java.lang.String getMessageAfterInstall()
Get text of a message to be displayed after installation of this plugin. It may contain any relevant user information.

Returns:
message to be displayed after installation.

checkDependencies

void checkDependencies(PluginManager manager)
                       throws DependencyMissingException
Check whether the current product installation contains all dependencies (other plugins) required to install this plugin. This method is called before the plugin is installed and it should throw a DependencyMissingException if one or more dependencies are missing.

Parameters:
manager - shared instance of the plugin manager.
Throws:
DependencyMissingException - when one or more dependencies requested by this plugin is missing.

T-Plan Robot Enterprise 4.0.1
Build No. 4.0.1-20141118.1