Class RequestItemEmailNotifier


  • public class RequestItemEmailNotifier
    extends Object
    Send item requests and responses by email.
    Author:
    Mark H. Wood
    • Method Detail

      • sendRequest

        public static void sendRequest​(Context context,
                                       RequestItem ri,
                                       String responseLink)
                                throws IOException,
                                       SQLException
        Send the request to the approver(s).
        Parameters:
        context - current DSpace session.
        ri - the request.
        responseLink - link back to DSpace to send the response.
        Throws:
        IOException - passed through.
        SQLException - if the message was not sent.
      • sendResponse

        public static void sendResponse​(Context context,
                                        RequestItem ri,
                                        String subject,
                                        String message)
                                 throws IOException
        Send the approver's response back to the requester, with files attached if approved.
        Parameters:
        context - current DSpace session.
        ri - the request.
        subject - email subject header value.
        message - email body (may be empty).
        Throws:
        IOException - if sending failed.
      • requestOpenAccess

        public static void requestOpenAccess​(Context context,
                                             RequestItem ri)
                                      throws IOException
        Send, to a repository administrator, a request to open access to a requested object.
        Parameters:
        context - current DSpace session
        ri - the item request that the approver is handling
        Throws:
        IOException - if the message body cannot be loaded or the message cannot be sent.