GNDMS 0.6.0
RESTful verison of GNDMS
Public Member Functions | Package Functions

de.zib.gndms.common.GORFX.service.TaskService Interface Reference

Interface for the task services. More...

Inheritance diagram for de.zib.gndms.common.GORFX.service.TaskService:
de.zib.gndms.gndmc.gorfx.TaskClient

List of all members.

Public Member Functions

ResponseEntity< TaskServiceConfiggetServiceConfig (String dn)
 Reads the service configuration.
ResponseEntity< String > setServiceConfig (TaskServiceConfig cfg, String dn)
 Changes the service configuration.
ResponseEntity< FacetsgetTaskFacets (String id, String dn)
 Delivers the facets of a task.
ResponseEntity< Void > deleteTask (String id, String dn, String wid)
 Removes a task.
ResponseEntity< TaskStatusgetStatus (String id, String dn, String wid)
 Delives the status of a task.
ResponseEntity< Void > changeStatus (String id, TaskControl status, String dn, String wid)
 Can be used to control task execution.
ResponseEntity< TaskResult > getResult (String id, String dn, String wid)
 Delivers the result of the task.
ResponseEntity< TaskFailuregetErrors (String id, String dn, String wid)
 Delivers possible error information if the task failed.

Package Functions

ResponseEntity< TaskServiceInfogetServiceInfo ()
 Delivers infos about the service.

Detailed Description

Interface for the task services.

Author:
try ma ik jo rr a zib
Date:
02.03.11 17:38 The task service is used to executed arbitrary tasks. This task can but mustn't belong to an taskflow or a batch.

Member Function Documentation

ResponseEntity<Void> de.zib.gndms.common.GORFX.service.TaskService.changeStatus ( String  id,
TaskControl  status,
String  dn,
String  wid 
)

Can be used to control task execution.

Common options are pause and abort of a task.

Parameters:
statusThe status the task should change to. Which status is acceptable depends on the task kind and current status.
idThe id of the task,
dnThe callers dn.
widA possible workflow id.
Returns:
HTTP-Status
  • 200 if the status was changed successful,
  • 403 if the user wasn't allowed to remove the task.
  • 400 if the status can't be changed to status.
ResponseEntity<Void> de.zib.gndms.common.GORFX.service.TaskService.deleteTask ( String  id,
String  dn,
String  wid 
)

Removes a task.

If the task is running it will be cancelled. It migth take some time to remove a task, this its not gone instantly.

Parameters:
idThe id of the task,
dnThe callers dn.
widA possible workflow id.
Returns:
HTTP-Status 200 if deletion was successful, 403 if the user wasn't allowed to remove the task.
ResponseEntity<TaskFailure> de.zib.gndms.common.GORFX.service.TaskService.getErrors ( String  id,
String  dn,
String  wid 
)

Delivers possible error information if the task failed.

Parameters:
idThe id of the task,
dnThe callers dn.
widA possible workflow id.
Returns:
HTTP-Status
  • 200 if failure information are available. The info will be the request body.
  • 403 if the user wasn't allowed to collect the information.
  • 404 if there wasn't any failure yet.
ResponseEntity<TaskResult> de.zib.gndms.common.GORFX.service.TaskService.getResult ( String  id,
String  dn,
String  wid 
)

Delivers the result of the task.

Parameters:
idThe id of the task,
dnThe callers dn.
widA possible workflow id.
Returns:
HTTP-Status
  • 200 if the result was available. The result will be the request body.
  • 403 if the user wasn't allowed to collect the result.
  • 404 if there wasn't any result yet.
ResponseEntity<TaskServiceConfig> de.zib.gndms.common.GORFX.service.TaskService.getServiceConfig ( String  dn)

Reads the service configuration.

Parameters:
dnThe dn of the requesting user.
Returns:
The Service configuration.

Implemented in de.zib.gndms.gndmc.gorfx.TaskClient.

ResponseEntity<TaskServiceInfo> de.zib.gndms.common.GORFX.service.TaskService.getServiceInfo ( ) [package]

Delivers infos about the service.

This information contain available task-types, together with usage statistics on these types.

Returns:
An info object.

Implemented in de.zib.gndms.gndmc.gorfx.TaskClient.

ResponseEntity<TaskStatus> de.zib.gndms.common.GORFX.service.TaskService.getStatus ( String  id,
String  dn,
String  wid 
)

Delives the status of a task.

Parameters:
idThe id of the task,
dnThe callers dn.
widA possible workflow id.
Returns:
A status object of the task.
ResponseEntity<Facets> de.zib.gndms.common.GORFX.service.TaskService.getTaskFacets ( String  id,
String  dn 
)

Delivers the facets of a task.

Parameters:
idThe id of the task.
dnThe callers dn.
Returns:
A list of facets of the task with id.
ResponseEntity<String> de.zib.gndms.common.GORFX.service.TaskService.setServiceConfig ( TaskServiceConfig  cfg,
String  dn 
)

Changes the service configuration.

Parameters:
cfgThe new configuration.
dnThe dn of the user, which must be allowed to change the config.
Returns:
Check the HTTP-status of the response-entity
  • 202 means the new configuration was accepted.
  • 406 means the new configuration isn't acceptable. In this case the response body contains an error message.
  • 403 means the user isn't allowed to change the configuration.

The documentation for this interface was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations