Interface RequestItemService
-
- All Known Implementing Classes:
RequestItemServiceImpl
public interface RequestItemServiceService 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 Summary
All Methods Instance Methods Abstract 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 DBvoiddelete(Context context, RequestItem request)Remove the record from the database.List<RequestItem>findAll(Context context)Fetch all item requests.Iterator<RequestItem>findByItem(Context context, Item item)Retrieve a request based on the item.RequestItemfindByToken(Context context, String token)Retrieve a request by its token.booleanisRestricted(Context context, DSpaceObject o)Is there at least one valid READ resource policy for this object?voidupdate(Context context, RequestItem requestItem)Save updates to the record.
-
-
-
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 bitstreamitem- The requested itemreqMessage- Request message textallFiles- true indicates that all bitstreams of this item are requestedreqEmail- email Requester emailreqName- Requester name- Returns:
- the token of the request item
- Throws:
SQLException- if database error
-
findAll
List<RequestItem> findAll(Context context) throws SQLException
Fetch all item requests.- Parameters:
context- current DSpace session.- Returns:
- all item requests.
- Throws:
SQLException- passed through.
-
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.
-
findByItem
Iterator<RequestItem> findByItem(Context context, Item item) throws SQLException
Retrieve a request based on the item.- Parameters:
context- current DSpace session.item- the item to find requests for.- Returns:
- the matching requests, or null if not found.
- Throws:
SQLException
-
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.
-
-