Package org.dspace.app.requestitem
Class RequestItemServiceImpl
- java.lang.Object
-
- org.dspace.app.requestitem.RequestItemServiceImpl
-
- All Implemented Interfaces:
RequestItemService
public class RequestItemServiceImpl extends Object implements RequestItemService
Service implementation for the RequestItem object. This class is responsible for all business logic calls for the RequestItem object and is autowired by spring. This class should never be accessed directly.- Author:
- kevinvandevelde at atmire.com
-
-
Field Summary
Fields Modifier and Type Field Description protected RequestItemDAOrequestItemDAO
-
Constructor Summary
Constructors Modifier Constructor Description protectedRequestItemServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateRequest(Context context, Bitstream bitstream, Item item, boolean allFiles, String reqEmail, String reqName, String reqMessage)Generate a request item representing the request and put it into the DBRequestItemfindByToken(Context context, String token)voidupdate(Context context, RequestItem requestItem)Save updates to the record.
-
-
-
Field Detail
-
requestItemDAO
@Autowired(required=true) protected RequestItemDAO requestItemDAO
-
-
Method Detail
-
createRequest
public String createRequest(Context context, Bitstream bitstream, Item item, boolean allFiles, String reqEmail, String reqName, String reqMessage) throws SQLException
Description copied from interface:RequestItemServiceGenerate a request item representing the request and put it into the DB- Specified by:
createRequestin interfaceRequestItemService- Parameters:
context- The relevant DSpace Context.bitstream- The requested bitstreamitem- The requested itemallFiles- true indicates that all bitstreams of this item are requestedreqEmail- email Requester emailreqName- Requester namereqMessage- Request message text- Returns:
- the token of the request item
- Throws:
SQLException- if database error
-
findByToken
public RequestItem findByToken(Context context, String token)
- Specified by:
findByTokenin interfaceRequestItemService
-
update
public void update(Context context, RequestItem requestItem)
Description copied from interface:RequestItemServiceSave updates to the record. Only accept_request, and decision_date are set-able.- Specified by:
updatein interfaceRequestItemService- Parameters:
context- The relevant DSpace Context.requestItem- requested item
-
-