Interface WorkflowItemService<T extends WorkflowItem>

Type Parameters:
T - Specific type of workflow.
All Superinterfaces:
InProgressSubmissionService<T>
All Known Subinterfaces:
XmlWorkflowItemService
All Known Implementing Classes:
XmlWorkflowItemServiceImpl

public interface WorkflowItemService<T extends WorkflowItem> extends InProgressSubmissionService<T>
Service interface class for the Workflow items. All WorkflowItem service classes should implement this class since it offers some basic methods which all WorkflowItems are required to have.
Author:
kevinvandevelde at atmire.com
  • Method Details

    • create

      T create(Context context, Item item, Collection collection) throws SQLException, AuthorizeException
      Wrap an Item in a WorkflowItem to place it in a Collection's workflow.
      Parameters:
      context - current DSpace session.
      item - the Item to be wrapped.
      collection - place the Item in this Collection's workflow (if any).
      Returns:
      the wrapped Item.
      Throws:
      SQLException - passed through.
      AuthorizeException - passed through.
    • find

      T find(Context context, int id) throws SQLException
      Get a workflow item from the database.
      Parameters:
      context - The relevant DSpace Context.
      id - ID of the workflow item
      Returns:
      the workflow item, or null if the ID is invalid.
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • findAll

      List<T> findAll(Context context) throws SQLException
      return all workflowitems
      Parameters:
      context - The relevant DSpace Context.
      Returns:
      List of all workflowItems in system
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • findByCollection

      List<T> findByCollection(Context context, Collection collection) throws SQLException
      Get all workflow items for a particular collection.
      Parameters:
      context - The relevant DSpace Context.
      collection - the collection
      Returns:
      array of the corresponding workflow items
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • findByItem

      T findByItem(Context context, Item item) throws SQLException
      Check to see if a particular item is currently under Workflow. If so, its WorkflowItem is returned. If not, null is returned
      Parameters:
      context - The relevant DSpace Context.
      item - the item
      Returns:
      workflow item corresponding to the item, or null
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • findBySubmitter

      List<T> findBySubmitter(Context context, EPerson ep) throws SQLException
      Get all workflow items that were original submissions by a particular e-person.
      Parameters:
      context - The relevant DSpace Context.
      ep - the eperson
      Returns:
      the corresponding workflow items
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • deleteByCollection

      void deleteByCollection(Context context, Collection collection) throws SQLException, IOException, AuthorizeException
      Delete all workflow items present in the specified collection.
      Parameters:
      context - The relevant DSpace Context.
      collection - the containing collection
      Throws:
      IOException - A general class of exceptions produced by failed or interrupted I/O operations.
      SQLException - An exception that provides information on a database access error or other errors.
      AuthorizeException - Exception indicating the current user of the context does not have permission to perform a particular action.
    • delete

      void delete(Context context, T workflowItem) throws SQLException, AuthorizeException, IOException
      Delete the specified workflow item.
      Parameters:
      context - The relevant DSpace Context.
      workflowItem - which workflow item to delete
      Throws:
      IOException - A general class of exceptions produced by failed or interrupted I/O operations.
      SQLException - An exception that provides information on a database access error or other errors.
      AuthorizeException - Exception indicating the current user of the context does not have permission to perform a particular action.