Package org.dspace.app.requestitem
Class RequestItemEmailNotifier
- java.lang.Object
-
- org.dspace.app.requestitem.RequestItemEmailNotifier
-
public class RequestItemEmailNotifier extends Object
Send item requests and responses by email.- Author:
- Mark H. Wood
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidrequestOpenAccess(Context context, RequestItem ri)Send, to a repository administrator, a request to open access to a requested object.static voidsendRequest(Context context, RequestItem ri, String responseLink)Send the request to the approver(s).static voidsendResponse(Context context, RequestItem ri, String subject, String message)Send the approver's response back to the requester, with files attached if approved.
-
-
-
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 sessionri- the item request that the approver is handling- Throws:
IOException- if the message body cannot be loaded or the message cannot be sent.
-
-