g-Eclipse
Release 1.0.0

eu.geclipse.core.model
Interface IServiceJob

All Superinterfaces:
IGridElement, IManageable
All Known Implementing Classes:
AbstractServiceJob, AbstractSubmittableServiceJob, GridAccessServiceJob

public interface IServiceJob
extends IGridElement, IManageable

Interface for structural service job.


Method Summary
 void addServiceJobResult(java.util.List<IServiceJobResult> newResults)
          This method should be called each time when service job was run and new results are available.
 int getColumnWidth(java.lang.String singleServiceJobName)
          This method sets column width for single service job with a name specified as parameter.
 java.io.InputStream getInputStreamForResult(IServiceJobResult result)
          Given the instance of IServiceJobResult class should return input stream of result's specific data (the type of data is determined by method IServiceJobResult.getResultType()
 java.util.Date getLastUpdate()
          Method to access date of last service job submission.
 java.util.Date getLastUpdate(java.lang.String remoteResourceName)
          The same as getLastUpdate(), but should be used in case there can be difference in number of service job's runs for each resource.
 java.lang.String getName()
          Method returning service job name.
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          Method returns all the data which needs to be viewed in properties view.
 java.util.List<IServiceJobResult> getResults()
          Method to access list of single service job's results
 java.lang.String getServiceJobDescription()
          Short, user friendly description of this service job.
 java.util.List<java.lang.String> getServiceJobResourcesNames()
          Method to access names of the resources on which service job is operating.
 java.util.List<java.util.List<IServiceJobResult>> getServiceJobResultsForResourceForDate(java.lang.String resourceName)
          This method gives access to ordered collection of sub service jobs' results.
 java.util.List<java.lang.String> getSingleServiceJobNames()
          Method to access all single service job's names that are run as a one IServiceJob implementation.
 IServiceJobResult getSingleServiceJobResult(java.lang.String singleServiceJobName, java.lang.String resourceName, java.util.Date date)
          Method to access text interpretation of single service job for given single service job's name performed on target resource at given date.
 java.lang.Object getStatus()
           
 IGridJobService getSubmissionService()
          Gives access to information to which submission service service's jobs should be submitted.
 java.lang.Object getSummary()
          Method returning result of the service job - as a summary of single service jobs.
 void init()
           
 void internalInit(IFile initInputData)
          This method is used to initialize instance just after it was created with some data.
 boolean needsSubmissionWizard()
          This method is to obtain information whether service job implementation needs to display job submission wizard to the user when it is being run.
 void run()
          Method to run a service job
 void setSubmissionService(IGridJobService submissionService)
          Method to set the submission service for use when job-based service jobs are submitted.
 
Methods inherited from interface eu.geclipse.core.model.IManageable
getManager
 

Method Detail

internalInit

void internalInit(IFile initInputData)
This method is used to initialize instance just after it was created with some data. This method existing separately from class' constructor, because its instances are created through extension points, which require - for simplicity - constructors without parameters.

Parameters:
initInputData - object with information to initialize new (and most likely empty) instance of class

init

void init()

getSingleServiceJobNames

java.util.List<java.lang.String> getSingleServiceJobNames()
Method to access all single service job's names that are run as a one IServiceJob implementation.

Returns:
list of single service job's names.

getServiceJobResourcesNames

java.util.List<java.lang.String> getServiceJobResourcesNames()
Method to access names of the resources on which service job is operating.

Returns:
List of resources' names.

getSingleServiceJobResult

IServiceJobResult getSingleServiceJobResult(java.lang.String singleServiceJobName,
                                            java.lang.String resourceName,
                                            java.util.Date date)
Method to access text interpretation of single service job for given single service job's name performed on target resource at given date.

Parameters:
singleServiceJobName - name of single service job
resourceName - name of resource service job is performing on
date - date of the submission
Returns:
String that is representation of single service job result

getServiceJobDescription

java.lang.String getServiceJobDescription()
Short, user friendly description of this service job.

Returns:
String with service job's description.

getName

java.lang.String getName()
Method returning service job name.

Specified by:
getName in interface IGridElement
Returns:
String

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()
Method returns all the data which needs to be viewed in properties view.

Returns:
Map with property name as a key and its value as a value

getResults

java.util.List<IServiceJobResult> getResults()
Method to access list of single service job's results

Returns:
List of single service job's results

run

void run()
Method to run a service job


getStatus

java.lang.Object getStatus()

getSummary

java.lang.Object getSummary()
Method returning result of the service job - as a summary of single service jobs.

Returns:
Service job's result.

getLastUpdate

java.util.Date getLastUpdate()
Method to access date of last service job submission.

Returns:
date of last service job submission.

getLastUpdate

java.util.Date getLastUpdate(java.lang.String remoteResourceName)
The same as getLastUpdate(), but should be used in case there can be difference in number of service job's runs for each resource.

Parameters:
remoteResourceName - Name of a resource where service job should run.
Returns:
date Date of last successful service job run for given resource.

getServiceJobResultsForResourceForDate

java.util.List<java.util.List<IServiceJobResult>> getServiceJobResultsForResourceForDate(java.lang.String resourceName)
This method gives access to ordered collection of sub service jobs' results. All service jobs' results returned by this method are results for given resource. Those results are grouped by date - which means that collection itself is divided into another collections, each of which keeps service job's result for given resource and date. In other words this method returns collection of collections. Those internal collections keep service job's result for given resource and date.

Method used by providers for Operator's Job History.

Parameters:
resourceName - Name of resource (e.g. host name).
Returns:
List of list of service job's results.

addServiceJobResult

void addServiceJobResult(java.util.List<IServiceJobResult> newResults)
This method should be called each time when service job was run and new results are available. Calling this method results in serialisation of new results - they are written to service job's GTDL file - this is how exemplary implementation available in service job framework works.

Parameters:
newResults - list of new results that should be added to set of results maintained by this service job's class

getInputStreamForResult

java.io.InputStream getInputStreamForResult(IServiceJobResult result)
Given the instance of IServiceJobResult class should return input stream of result's specific data (the type of data is determined by method IServiceJobResult.getResultType()

Parameters:
result - Single service job result.
Returns:
Input stream for result's data.

getColumnWidth

int getColumnWidth(java.lang.String singleServiceJobName)
This method sets column width for single service job with a name specified as parameter.

Parameters:
singleServiceJobName - Name of the single service job.
Returns:
Width of the column.

needsSubmissionWizard

boolean needsSubmissionWizard()
This method is to obtain information whether service job implementation needs to display job submission wizard to the user when it is being run. Job submission wizard gives access to information which job submission service to use (see getSubmissionService() method).

Returns:
true if this service job needs information to which submission service submit its jobs, false otherwise

setSubmissionService

void setSubmissionService(IGridJobService submissionService)
Method to set the submission service for use when job-based service jobs are submitted.

Parameters:
submissionService -

getSubmissionService

IGridJobService getSubmissionService()
Gives access to information to which submission service service's jobs should be submitted. This information should be set by class that runs service job (see also needsSubmissionWizard()).

Returns:
reference to submission service to which this service job should submit its jobs or null in case this information wasn't set yet, or when service job implementation did not declare that this information is needed (see needsSubmissionWizard()).

g-Eclipse
Release 1.0.0