Interface RequestItemService

All Known Implementing Classes:
RequestItemServiceImpl

public interface RequestItemService
Service interface class for the RequestItem object. The implementation of this class is responsible for all business logic calls for the RequestItem object and is autowired by Spring.
Author:
kevinvandevelde at atmire.com
  • Method Details

    • createRequest

      String createRequest(Context context, Bitstream bitstream, Item item, boolean allFiles, String reqEmail, String reqName, String reqMessage) throws SQLException
      Generate a request item representing the request and put it into the DB
      Parameters:
      context - The relevant DSpace Context.
      bitstream - The requested bitstream
      item - The requested item
      reqMessage - Request message text
      allFiles - true indicates that all bitstreams of this item are requested
      reqEmail - email Requester email
      reqName - Requester name
      Returns:
      the token of the request item
      Throws:
      SQLException - if database error
    • findAll

      List<RequestItem> findAll(Context context) throws SQLException
      Fetch all item requests.
      Parameters:
      context - current DSpace session.
      Returns:
      all item requests.
      Throws:
      SQLException - passed through.
    • findByToken

      RequestItem findByToken(Context context, String token)
      Retrieve a request by its token.
      Parameters:
      context - current DSpace session.
      token - the token identifying the request.
      Returns:
      the matching request, or null if not found.
    • findByItem

      Iterator<RequestItem> findByItem(Context context, Item item) throws SQLException
      Retrieve a request based on the item.
      Parameters:
      context - current DSpace session.
      item - the item to find requests for.
      Returns:
      the matching requests, or null if not found.
      Throws:
      SQLException
    • update

      void update(Context context, RequestItem requestItem)
      Save updates to the record. Only accept_request, and decision_date are set-able.
      Parameters:
      context - The relevant DSpace Context.
      requestItem - requested item
    • delete

      void delete(Context context, RequestItem request)
      Remove the record from the database.
      Parameters:
      context - current DSpace context.
      request - record to be removed.
    • isRestricted

      boolean isRestricted(Context context, DSpaceObject o) throws SQLException
      Is there at least one valid READ resource policy for this object?
      Parameters:
      context - current DSpace session.
      o - the object.
      Returns:
      true if a READ policy applies.
      Throws:
      SQLException - passed through.