Package org.dspace.app.requestitem
Class RequestItemEmailNotifier
java.lang.Object
org.dspace.app.requestitem.RequestItemEmailNotifier
Send item requests and responses by email.
The "strategy" by which approvers are chosen is in an implementation of
RequestItemAuthorExtractor which is injected by the name
requestItemAuthorExtractor. See the DI configuration documents.
- Author:
- Mark H. Wood <mwood@iupui.edu>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BitstreamServiceprotected ConfigurationServiceprotected HandleServiceprotected final RequestItemAuthorExtractorprotected RequestItemService -
Constructor Summary
ConstructorsConstructorDescriptionRequestItemEmailNotifier(RequestItemAuthorExtractor requestItemAuthorExtractor) -
Method Summary
Modifier and TypeMethodDescriptionvoidrequestOpenAccess(Context context, RequestItem ri) Send, to a repository administrator, a request to open access to a requested object.voidsendRequest(Context context, RequestItem ri, String responseLink) Send the request to the approver(s).voidsendResponse(Context context, RequestItem ri, String subject, String message) Send the approver's response back to the requester, with files attached if approved.
-
Field Details
-
bitstreamService
-
configurationService
-
handleService
-
requestItemService
-
requestItemAuthorExtractor
-
-
Constructor Details
-
RequestItemEmailNotifier
-
-
Method Details
-
sendRequest
public 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 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
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.
-