Contributing to Service Job's UI

Introduction

As stated in basic concepts of Service Jobs Framework integration with Eclipse's workbench is provided by framework itself. All service jobs created by user are listed in Operator's Job View and their details can be seen in Operator's Job Details View.

The only UI part that service job providers have to take care of when preparing their implementation is Operator's Job Wizard.

Selecting Service Job

Service Job Framework comes in with wizard container for other Service Job's wizard nodes implementations. It makes use of Eclipse's WizardSelectionPage and IWizardNode mechanisms. This means that the framework takes the responsibility for opening a general wizard for service jobs and then queries all available providers' extension points for wizard nodes that will be plugged in into this general wizard. This extension point is eu.geclipse.servicejob.servicejobProvider and information about class implementing wizard node's functionality is kept in wizard element of this extension point.

Extension point

eu.geclipse.servicejob.servicejobProvider
Please refer to description here.

Interfaces and abstract implementations

eu.geclipse.servicejob.ui.interfaces.IServiceJobWizardNode
This is basic interface for nodes to be plugged into general Service Job Wizard. Developers are free to implement it, but for convenience also abstract implementation of this interface was introduced (see below).

eu.geclipse.servicejob.ui.wizard.AbstractServiceJobWizardNode
This class provides abstract implementation of IServiceJobWizardNode interface. It is recommended to extend this class rather then implement IServiceJobWizardNode especially in cases when wizard should finish with creation of service job's files, as this functionality is pre-implemented.

Abstract methods

Please refer also to eu.geclipse.servicejob.ui.interfaces.IServiceJobWizardNode and eu.geclipse.servicejob.ui.wizard.AbstractServiceJobWizardNode for documentation.

public String getPluginID()
Method to access ID of plug-in that extends the eu.geclipse.servicejob.servicejobProvider extension point.

public List getResourcesNames()
Method to access names of IGridResources that will be objects of this service jobs. Those names are serialized in .gtdl file. Please note that after g-Eclipse's restart those names are the only "handlers" to which contributor has access (names, not IGridResource objects) - so this list should be constructed this way that names carry all the information needed to perform service job by contributor's plug-in. This method is called by main service job framework's plug-in when .gtdl file is being

public InputStream getServiceJobInputData()
Method to access file input stream for newly created structural service job.

public String getName()
Returns name displayed in general Service Job Wizard

public IWizard getWizard()
Returns the wizard this node stands for.

public boolean isContentCreated()
Returns whether a wizard has been created for this node.

Implementing the wizard

Providing implementation of eu.geclipse.servicejob.ui.interfaces.IServiceJobWizardNode through service job's extension point is one thing - another is to implement the wizard's part. It is out of scope of this documentation to describe Eclipse's wizards mechanism. Please refer to Eclipse Developers Guide for more technical details of this soultion. Below only the outline of what needs to be done is presented.

First of all it is essential to mention that Wizard that will be displayed in general service job wizard is in fact the object returned by getWizard() method of IServiceJobWizardNode implementation. Nevertheless the service job framework architecture requires that this object is the IServiceJobWizardNode implementation itself, which is also a convenient solution from developer's point of view.

The above implies that wizard node implementation is at the same time the essential wizard object, so it should override addPages() method from Eclipse's Wizard class, as well as any other methods of wizard that are essential to ensure functionality to realise provider's use cases. In addPages() method all necessary wizard pages should be added. As a ready to use wizard page's example Service Job UI plug-in comes in with eu.geclipse.servicejob.ui.wizard.ResourcesSelectionPage (this will allows user to select target Grid resources for service job).