ccc.api.core
Interface Actions

All Superinterfaces:
Scheduler
All Known Implementing Classes:
ActionsEJB, ActionsImpl

public interface Actions
extends Scheduler

API for managing actions.

Author:
Civic Computing Ltd.

Field Summary
static java.lang.String NAME
          NAME : String.
 
Method Summary
 void cancel(java.util.UUID actionId)
          Cancel a scheduled action.
 ActionSummary create(Action action)
          Create a new scheduled action.
 void executeAll()
          Executes all available actions whose 'execute after' date is in the past.
 PagedCollection<ActionSummary> listCompletedActions(java.lang.String sort, SortOrder sortOrder, int pageNo, int pageSize)
          List all CCC actions that have been executed.
 PagedCollection<ActionSummary> listPendingActions(java.lang.String sort, SortOrder sortOrder, int pageNo, int pageSize)
          List all CCC actions that haven't yet been executed.
 ActionSummary retrieve(java.util.UUID actionId)
          Find the action with the specified ID.
 
Methods inherited from interface ccc.api.core.Scheduler
isRunning, start, stop
 

Field Detail

NAME

static final java.lang.String NAME
NAME : String.

See Also:
Constant Field Values
Method Detail

cancel

void cancel(java.util.UUID actionId)
Cancel a scheduled action.

Parameters:
actionId - The id of the action to cancel.

create

ActionSummary create(Action action)
Create a new scheduled action.

Parameters:
action - The action to create.
Returns:
A summary of the new action.

listPendingActions

PagedCollection<ActionSummary> listPendingActions(java.lang.String sort,
                                                  SortOrder sortOrder,
                                                  int pageNo,
                                                  int pageSize)
List all CCC actions that haven't yet been executed.

Parameters:
sort - The field to sort on.
sortOrder - The order results be sorted in.
pageNo - The page of results to return.
pageSize - The number of results in a page.
Returns:
A collection of action summaries, one per outstanding action.

listCompletedActions

PagedCollection<ActionSummary> listCompletedActions(java.lang.String sort,
                                                    SortOrder sortOrder,
                                                    int pageNo,
                                                    int pageSize)
List all CCC actions that have been executed.

Parameters:
sort - The field to sort on.
sortOrder - The order results be sorted in.
pageNo - The page of results to return.
pageSize - The number of results in a page.
Returns:
A collection of action summaries, one per completed action.

executeAll

void executeAll()
Executes all available actions whose 'execute after' date is in the past.


retrieve

ActionSummary retrieve(java.util.UUID actionId)
Find the action with the specified ID.

Parameters:
actionId - The action's ID.
Returns:
A summary of the action.


Copyright © 2010. All Rights Reserved.