fr.cnes.sitools.tasks
Class TaskUtils

java.lang.Object
  extended by fr.cnes.sitools.tasks.TaskUtils

public final class TaskUtils
extends java.lang.Object

Utils Class to run Tasks Synchronously or Asynchronously

Author:
m.gond (AKKA Technologies)

Field Summary
static java.lang.String BODY_CONTENT
          THE BODY CONTENT
static java.lang.String LOG_FOLDER
          LOG FOLDER
static java.lang.String PARENT_APPLICATION
          PARENT_APPLICATION
static java.lang.String SITOOLS_SETTINGS
          SITOOLS_SETTINGS
static java.lang.String TASK
          Dataset_application
 
Method Summary
static org.restlet.representation.Representation execute(SitoolsParameterizedResource resource, org.restlet.representation.Variant variant)
          Execute a task described in the given resource It can be executed either synchronously or asynchronously depending on the runType request and Resource parameter
static SitoolsParameterizedResource getDataSetApplication(org.restlet.Context context)
          Gets the DataSetApplication contained in the Context
static SitoolsSettings getSitoolsSettings(org.restlet.Context context)
          Gets the DatabaseRequestParameters contained in the Context
static Task getTask(org.restlet.Context context)
          Gets the Task contained in the Context
static java.lang.String getTimestampPattern()
          Gets the timestamp pattern
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARENT_APPLICATION

public static final java.lang.String PARENT_APPLICATION
PARENT_APPLICATION

See Also:
Constant Field Values

TASK

public static final java.lang.String TASK
Dataset_application

See Also:
Constant Field Values

SITOOLS_SETTINGS

public static final java.lang.String SITOOLS_SETTINGS
SITOOLS_SETTINGS

See Also:
Constant Field Values

LOG_FOLDER

public static final java.lang.String LOG_FOLDER
LOG FOLDER

See Also:
Constant Field Values

BODY_CONTENT

public static final java.lang.String BODY_CONTENT
THE BODY CONTENT

See Also:
Constant Field Values
Method Detail

getDataSetApplication

public static SitoolsParameterizedResource getDataSetApplication(org.restlet.Context context)
Gets the DataSetApplication contained in the Context

Parameters:
context - the Context
Returns:
the DataSetApplication contained in the Context

getTask

public static Task getTask(org.restlet.Context context)
Gets the Task contained in the Context

Parameters:
context - the Context
Returns:
the Task contained in the Context

getSitoolsSettings

public static SitoolsSettings getSitoolsSettings(org.restlet.Context context)
Gets the DatabaseRequestParameters contained in the Context

Parameters:
context - the Context
Returns:
the DatabaseRequestParameters contained in the Context

getTimestampPattern

public static java.lang.String getTimestampPattern()
Gets the timestamp pattern

Returns:
the timestamp pattern

execute

public static org.restlet.representation.Representation execute(SitoolsParameterizedResource resource,
                                                                org.restlet.representation.Variant variant)
Execute a task described in the given resource It can be executed either synchronously or asynchronously depending on the runType request and Resource parameter

Parameters:
resource - the resource describing the task to execute
variant - the variant needed for the response
Returns:
a representation representing a TaskModel if the task is run asynchronously or the result if run synchronously


Copyright © 2010-2013 CNES. All Rights Reserved.