Class TaskApi

java.lang.Object
com.mayam.wf.ws.client.TaskApi

public class TaskApi extends Object
Gives access to tasks using the API. Please see examples under TasksClient. This class is accessed using TasksClient.taskApi().
  • Constructor Details

    • TaskApi

      public TaskApi(com.mayam.wf.ws.client.internal.TasksRestClient client, javax.inject.Provider<AttributeMap> mapProvider, javax.inject.Provider<AttributeRangeMap> rangeMapProvider, javax.inject.Provider<AttributeMultiMap> multiMapProvider)
  • Method Details

    • createTask

      public AttributeMap createTask(AttributeMap task) throws RemoteException
      Creates a new task. The resulting AttributeMap will contain all attributes of the newly created task, most notably including the Attribute.TASK_ID. A Attribute.TASK_STATE must be provided.
      Parameters:
      task - a partial task definition used as primer.
      Returns:
      task the full newly created task as an AttributeMap.
      Throws:
      RemoteException - if an error occurred on the server side.
    • getTask

      public AttributeMap getTask(long taskId) throws RemoteException
      Retrieves a task by its task identifier.
      Parameters:
      taskId - task identifier.
      Returns:
      task as an AttributeMap.
      Throws:
      RemoteException - if an error occurred on the server side.
    • updateTask

      public AttributeMap updateTask(AttributeMap task) throws RemoteException
      Updates a task. Any modified (dirty) value of the AttributeMap will be used to update the task identified by Attribute.TASK_ID. Returned is an AttributeMap with the changes as reported by the server.
      Parameters:
      task - unique identifier and attributes to modify.
      Returns:
      task the full updated task as an AttributeMap.
      Throws:
      RemoteException - if an error occurred on the server side.
    • deleteTask

      public void deleteTask(long taskId) throws RemoteException
      Deletes a task by its task identifier.
      Parameters:
      taskId - task identifier.
      Throws:
      RemoteException - if an error occurred on the server side.
    • getTasks

      public FilterResult getTasks(FilterCriteria filterCritera, int pageSize, int rowOffset) throws RemoteException
      Retrieves a limited list of tasks based on criteria and offset from the start of the full result set.
      Parameters:
      filterCritera - criteria used for filtering.
      pageSize - the number of results to be returned.
      rowOffset - the offset from the full result set at which the returned list will start.
      Returns:
      the limited result list as well as a count of the full result set.
      Throws:
      RemoteException - if an error occurred on the server side.
    • getTasks

      public FilterResult getTasks(FilterExpression filterExpression, int pageSize, int rowOffset) throws RemoteException
      Retrieves a limited list of tasks based on expression and offset from the start of the full result set.
      Parameters:
      filterExpression - expression used for filtering.
      pageSize - the number of results to be returned.
      rowOffset - the offset from the full result set at which the returned list will start.
      Returns:
      the limited result list as well as a count of the full result set.
      Throws:
      RemoteException - if an error occurred on the server side.
    • createFilterCriteria

      public FilterCriteria createFilterCriteria()
      Creates a new FilterCriteria, fully initialized for convenience.
      Returns:
      a newly created FilterCriteria.