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(String kind)
          Return the number of tasks.
 SchedTaskTO createSchedTask(SchedTaskTO taskTO)
           
 SyncTaskTO createSyncTask(SyncTaskTO taskTO)
           
 void delete(Long taskId)
          Delete specified task.
 void deleteExecution(Long taskExecId)
          Delete specified task's execution.
 Set<String> getJobActionsClasses()
           
 Set<String> getJobClasses()
          Return a list of job classes.
 List<TaskExecTO> listExecutions()
          Get all executions.
<T extends TaskTO>
List<T>
listTasks(Class<T> reference, int page, int size)
          Return a paginated list of tasks.
 NotificationTaskTO readNotificationTask(Long taskId)
           
 PropagationTaskTO readPropagationTask(Long taskId)
           
<T extends SchedTaskTO>
T
readSchedTask(Class<T> reference, Long taskId)
           
 void startExecution(Long taskId, boolean dryRun)
          Start execution for the specified TaskTO.
 SchedTaskTO updateSchedTask(SchedTaskTO taskTO)
           
 SyncTaskTO updateSyncTask(SyncTaskTO 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

getJobClasses

public Set<String> getJobClasses()
Return a list of job classes.

Returns:
list of classes.

getJobActionsClasses

public Set<String> getJobActionsClasses()

count

public Integer count(String kind)
Return the number of tasks.

Parameters:
kind - of task (propagation, sched, sync).
Returns:
number of stored tasks.

listTasks

public <T extends TaskTO> List<T> listTasks(Class<T> reference,
                                            int page,
                                            int size)
Return a paginated list of tasks.

Parameters:
page - number.
size - per page.
Returns:
paginated list.

readPropagationTask

public PropagationTaskTO readPropagationTask(Long taskId)

readNotificationTask

public NotificationTaskTO readNotificationTask(Long taskId)

readSchedTask

public <T extends SchedTaskTO> T readSchedTask(Class<T> reference,
                                               Long taskId)

listExecutions

public List<TaskExecTO> 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,
                           boolean dryRun)
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

createSyncTask

public SyncTaskTO createSyncTask(SyncTaskTO taskTO)

createSchedTask

public SchedTaskTO createSchedTask(SchedTaskTO taskTO)

updateSchedTask

public SchedTaskTO updateSchedTask(SchedTaskTO taskTO)

updateSyncTask

public SyncTaskTO updateSyncTask(SyncTaskTO taskTO)


Copyright © 2011. All Rights Reserved.