org.syncope.console.rest
Class TaskRestClient

java.lang.Object
  extended by org.syncope.console.rest.AbstractBaseRestClient
      extended by org.syncope.console.rest.TaskRestClient

@Component
public class TaskRestClient
extends AbstractBaseRestClient

Console client for invoking Rest Tasks services.


Field Summary
 
Fields inherited from class org.syncope.console.rest.AbstractBaseRestClient
baseURL, LOG, restTemplate
 
Constructor Summary
TaskRestClient()
           
 
Method Summary
 Integer count()
           
 void delete(Long taskId)
          Delete specified task.
 void deleteExecution(Long taskExecId)
          Delete specified task's execution.
 List<TaskTO> list(int page, int size)
          Get all stored tasks.
 List<TaskExecutionTO> listExecutions()
          Get all executions.
 TaskTO read(String taskId)
          Load an existing task.
 void startExecution(Long taskId)
          Start execution for the specified TaskTO.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskRestClient

public TaskRestClient()
Method Detail

count

public Integer count()

list

public List<TaskTO> list(int page,
                         int size)
Get all stored tasks.

Parameters:
page - pagination element to fetch
size - maximum number to fetch
Returns:
list of TaskTO objects

read

public TaskTO read(String taskId)
Load an existing task.

Parameters:
taskId - task to read
Returns:
TaskTO object if the configuration exists, null otherwise

listExecutions

public List<TaskExecutionTO> listExecutions()
Get all executions.

Returns:
list of all executions

delete

public void delete(Long taskId)
Delete specified task.

Parameters:
taskId - task to delete

startExecution

public void startExecution(Long taskId)
Start execution for the specified TaskTO.

Parameters:
taskId - task id

deleteExecution

public void deleteExecution(Long taskExecId)
Delete specified task's execution.

Parameters:
taskExecId - task execution id


Copyright © 2011. All Rights Reserved.