g-Eclipse
Release 1.0.0

eu.geclipse.servicejob.model.impl
Class ServiceJobResult

java.lang.Object
  extended by eu.geclipse.servicejob.model.impl.ServiceJobResult
All Implemented Interfaces:
IServiceJobResult
Direct Known Subclasses:
SubmittableServiceJobResult

public class ServiceJobResult
extends java.lang.Object
implements IServiceJobResult

Implementation of IServiceJobResult. Clients should use it as it is. This class can be seen as a simple java bean and in comparison to interface it introduces also simple class constructor.


Constructor Summary
ServiceJobResult(java.util.Date runDate, java.lang.String resource, java.lang.String subJob, java.lang.String resultRawData, java.lang.String resultSummary, java.lang.String resultType, java.lang.String resultEnum)
          Simple constructor.
 
Method Summary
 java.lang.String getResourceName()
          Method to access name of the resource (e.g. host's URL) on which service job was run.
 java.lang.String getResultEnum()
          Human-readable service job's result.
 java.lang.String getResultRawData()
          Method to access content of Output > Result > ResultData GTDL element corresponding to this service job result instance.
 java.lang.String getResultSummary()
          Textual interpretation of service job's result.
 java.lang.String getResultType()
          Method to access type of result's data.
 java.lang.String getResutlRawData()
          Simple getter.
 java.util.Date getRunDate()
          Method to access information when corresponding service job was run.
 java.lang.String getSubServiceJobName()
          In case of complex service jobs this method returns sub-job's name.
 void setResultEnum(java.lang.String resultEnum)
          Simple setter.
 void setResultSummary(java.lang.String resultSummary)
          Simple setter.
 void setResultType(java.lang.String resultType)
          Simple setter.
 void setResutlRawData(java.lang.String resutlRawData)
          Simple setter.
 void setRunDate(java.util.Date runDate)
          Simple setter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceJobResult

public ServiceJobResult(java.util.Date runDate,
                        java.lang.String resource,
                        java.lang.String subJob,
                        java.lang.String resultRawData,
                        java.lang.String resultSummary,
                        java.lang.String resultType,
                        java.lang.String resultEnum)
Simple constructor.

Parameters:
runDate - When this result was created.
resource - Name of resource to run service job on.
subJob - Name of performed sub-job.
resultRawData - Content of Output > Result > ResultData GTDL element.
resultSummary - Textual interpretation of service job's result.
resultType - Type describing kind of detailed job's result - usually a file extension of a file that can contain such a result.
resultEnum - Short string describing state of service job.
Method Detail

getResourceName

public java.lang.String getResourceName()
Description copied from interface: IServiceJobResult
Method to access name of the resource (e.g. host's URL) on which service job was run.

Specified by:
getResourceName in interface IServiceJobResult
Returns:
Name of resource on which service job was run in form of String.

getResultRawData

public java.lang.String getResultRawData()
Description copied from interface: IServiceJobResult
Method to access content of Output > Result > ResultData GTDL element corresponding to this service job result instance. Returned String is unmodified content taken from GTDL file.

Specified by:
getResultRawData in interface IServiceJobResult
Returns:
String content of Output > Result > ResultData GTDL element.

getResultSummary

public java.lang.String getResultSummary()
Description copied from interface: IServiceJobResult
Textual interpretation of service job's result.

Specified by:
getResultSummary in interface IServiceJobResult
Returns:
String representing human-readable summary of service job's result.

getResultType

public java.lang.String getResultType()
Description copied from interface: IServiceJobResult
Method to access type of result's data. Preferably this should be file extension that will determine Eclipse editor in which data should be opened. See also IServiceJob.getInputStreamForResult(IServiceJobResult) and IServiceJobResult.getResultRawData().

Specified by:
getResultType in interface IServiceJobResult
Returns:
Extension of file to which service job result's input stream may be saved (preferably without "." at the beginning, e.g. "TXT", not ".TXT").

getRunDate

public java.util.Date getRunDate()
Description copied from interface: IServiceJobResult
Method to access information when corresponding service job was run.

Specified by:
getRunDate in interface IServiceJobResult
Returns:
Date when service job was run.

getSubServiceJobName

public java.lang.String getSubServiceJobName()
Description copied from interface: IServiceJobResult
In case of complex service jobs this method returns sub-job's name. If service job is simple, then returned value should be it's name.

Specified by:
getSubServiceJobName in interface IServiceJobResult
Returns:
Name of the sub-service job which was run or name of the simple service job which was run.

getResultEnum

public java.lang.String getResultEnum()
Description copied from interface: IServiceJobResult
Human-readable service job's result. Represents either the state in which service job is (pending, running...) or - in case when service job was finished - service job's result in form of String (OK, ERROR, WARRNING...).

Specified by:
getResultEnum in interface IServiceJobResult
Returns:
String representing human-readable summary of service job's result.

setRunDate

public void setRunDate(java.util.Date runDate)
Simple setter.

Parameters:
runDate - date of job run

setResultSummary

public void setResultSummary(java.lang.String resultSummary)
Simple setter.

Parameters:
resultSummary -

setResultType

public void setResultType(java.lang.String resultType)
Simple setter.

Parameters:
resultType -

setResultEnum

public void setResultEnum(java.lang.String resultEnum)
Simple setter.

Parameters:
resultEnum -

getResutlRawData

public java.lang.String getResutlRawData()
Simple getter.

Returns:
raw data of service job (the same as written in "input" node of GTDL file)

setResutlRawData

public void setResutlRawData(java.lang.String resutlRawData)
Simple setter.

Parameters:
resutlRawData -

g-Eclipse
Release 1.0.0