com.xebialabs.deployit.task.jcrarchive
Class JcrTaskArchive

java.lang.Object
  extended by com.xebialabs.deployit.task.jcrarchive.JcrTaskArchive
All Implemented Interfaces:
TaskArchive

@Component
public class JcrTaskArchive
extends java.lang.Object
implements TaskArchive


Nested Class Summary
static interface JcrTaskArchive.TaskCallback
           
 
Constructor Summary
JcrTaskArchive(JcrTemplate jcrTemplate)
           
 
Method Summary
 void archiveTask(DeploymentTask task)
          Archives a deployment task to the task archive persistent store.
 java.util.List<java.lang.String> getAllTaskIds()
          Searches the persistent store for archived tasks Id's.
 DeploymentTaskInfo getTask(java.lang.String taskId)
          Retrieve a from the persistent store, using the taskId
 java.util.Collection<DeploymentTaskInfo> searchTasks(ArchivedTaskSearchParameters params)
          Searches the persistent store for archived tasks.
 void searchTasks(ArchivedTaskSearchParameters params, JcrTaskArchive.TaskCallback callback)
          Searches the persistent store for archived tasks and executes the callback method on the result.
 java.util.Collection<DeploymentTaskInfo> searchTasksWithoutLoadingSteps(ArchivedTaskSearchParameters params)
          Searches the persistent store for archived tasks.It doesn't load steps of tasks.
 java.util.Collection<java.util.Map<java.lang.String,java.lang.Object>> searchTasksWithoutLoadingSteps(ArchivedTaskSearchParameters params, GroupBy groupBy)
          Searches the persistent store for archived tasks and groups by given parameters.
 void searchTasksWithoutLoadingSteps(ArchivedTaskSearchParameters params, JcrTaskArchive.TaskCallback callback)
          Searches the persistent store for archived tasks and executes the callback method on the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcrTaskArchive

@Autowired
public JcrTaskArchive(JcrTemplate jcrTemplate)
Method Detail

archiveTask

public void archiveTask(DeploymentTask task)
Description copied from interface: TaskArchive
Archives a deployment task to the task archive persistent store.

Specified by:
archiveTask in interface TaskArchive
Parameters:
task - is the deployment task to archive.

getTask

public DeploymentTaskInfo getTask(java.lang.String taskId)
Description copied from interface: TaskArchive
Retrieve a from the persistent store, using the taskId

Specified by:
getTask in interface TaskArchive
Parameters:
taskId - can be a fully qualified path to the task, or the tasks uuid.
Returns:
DeploymentTaskInfo which is never null

searchTasks

public java.util.Collection<DeploymentTaskInfo> searchTasks(ArchivedTaskSearchParameters params)
Description copied from interface: TaskArchive
Searches the persistent store for archived tasks.

Specified by:
searchTasks in interface TaskArchive
Parameters:
params - to use to build the search query.
Returns:
results of search. Never null.

searchTasksWithoutLoadingSteps

public java.util.Collection<DeploymentTaskInfo> searchTasksWithoutLoadingSteps(ArchivedTaskSearchParameters params)
Description copied from interface: TaskArchive
Searches the persistent store for archived tasks.It doesn't load steps of tasks.

Specified by:
searchTasksWithoutLoadingSteps in interface TaskArchive
Parameters:
params - to use to build the search query.
Returns:
results of search. Never null.

searchTasks

public void searchTasks(ArchivedTaskSearchParameters params,
                        JcrTaskArchive.TaskCallback callback)
Description copied from interface: TaskArchive
Searches the persistent store for archived tasks and executes the callback method on the result.

Specified by:
searchTasks in interface TaskArchive
Parameters:
params - to use to build the search query.
callback - Callback method.

searchTasksWithoutLoadingSteps

public void searchTasksWithoutLoadingSteps(ArchivedTaskSearchParameters params,
                                           JcrTaskArchive.TaskCallback callback)
Description copied from interface: TaskArchive
Searches the persistent store for archived tasks and executes the callback method on the result. It doesn't load steps of tasks.

Specified by:
searchTasksWithoutLoadingSteps in interface TaskArchive
Parameters:
params - to use to build the search query.
callback - Callback method.

getAllTaskIds

public java.util.List<java.lang.String> getAllTaskIds()
Description copied from interface: TaskArchive
Searches the persistent store for archived tasks Id's.

Specified by:
getAllTaskIds in interface TaskArchive
Returns:
results list of all task Id's. List might be empty.

searchTasksWithoutLoadingSteps

public java.util.Collection<java.util.Map<java.lang.String,java.lang.Object>> searchTasksWithoutLoadingSteps(ArchivedTaskSearchParameters params,
                                                                                                             GroupBy groupBy)
Description copied from interface: TaskArchive
Searches the persistent store for archived tasks and groups by given parameters. It doesn't load steps of tasks.

Specified by:
searchTasksWithoutLoadingSteps in interface TaskArchive
Returns: