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 Detail

      • 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
      • 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.
      • 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.