@Component(value="submission.workspaceitem") public class WorkspaceItemRestRepository extends DSpaceRestRepository<WorkspaceItemRest,Integer>
| Modifier and Type | Field and Description |
|---|---|
static String |
OPERATION_PATH_SECTIONS |
requestService, utils| Constructor and Description |
|---|
WorkspaceItemRestRepository() |
| Modifier and Type | Method and Description |
|---|---|
protected WorkspaceItemRest |
createAndReturn(Context context)
Method to implement to support the creation of a new instance.
|
protected void |
delete(Context context,
Integer id)
Method to implement to support delete of a single object instance
|
org.springframework.data.domain.Page<WorkspaceItemRest> |
findAll(Context context,
org.springframework.data.domain.Pageable pageable)
Method to implement to support scroll of entity instances from the collection resource endpoin
|
org.springframework.data.domain.Page<WorkspaceItemRest> |
findBySubmitter(UUID submitterID,
org.springframework.data.domain.Pageable pageable) |
WorkspaceItemRest |
findOne(Context context,
Integer id)
Method to implement to support retrieval of a specific REST object instance
|
Class<WorkspaceItemRest> |
getDomainClass()
The REST model supported by the repository
|
void |
patch(Context context,
javax.servlet.http.HttpServletRequest request,
String apiCategory,
String model,
Integer id,
Patch patch)
Method to implement to allow partial update of the REST object via JSON Patch
|
protected WorkspaceItemRest |
save(Context context,
WorkspaceItemRest wsi)
Method to implement to support full update of a REST object.
|
Iterable<WorkspaceItemRest> |
upload(Context context,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.multipart.MultipartFile uploadfile)
Method to implement to support bulk creation of objects from a file
|
WorkspaceItemRest |
upload(javax.servlet.http.HttpServletRequest request,
String apiCategory,
String model,
Integer id,
org.springframework.web.multipart.MultipartFile file)
Method to implement to attach/upload a file to a specific REST object
|
WorkspaceItemResource |
wrapResource(WorkspaceItemRest witem,
String... rels)
Wrap the REST model in a REST HAL Resource
|
action, action, count, createAndReturn, createAndReturn, createAndReturn, delete, delete, delete, deleteAll, exists, findAll, findAll, findAll, findAll, findOne, patch, put, put, put, put, save, save, uploadgetRequestService, obtainContextpublic static final String OPERATION_PATH_SECTIONS
public WorkspaceItemRestRepository()
throws SubmissionConfigReaderException
SubmissionConfigReaderExceptionpublic WorkspaceItemRest findOne(Context context, Integer id)
DSpaceRestRepositoryfindOne in class DSpaceRestRepository<WorkspaceItemRest,Integer>context - the dspace contextid - the rest object idpublic org.springframework.data.domain.Page<WorkspaceItemRest> findAll(Context context, org.springframework.data.domain.Pageable pageable)
DSpaceRestRepositoryfindAll in class DSpaceRestRepository<WorkspaceItemRest,Integer>context - the dspace contextpageable - object embedding the requested pagination infopublic org.springframework.data.domain.Page<WorkspaceItemRest> findBySubmitter(UUID submitterID, org.springframework.data.domain.Pageable pageable)
protected WorkspaceItemRest createAndReturn(Context context) throws SQLException, AuthorizeException
DSpaceRestRepositorycreateAndReturn in class DSpaceRestRepository<WorkspaceItemRest,Integer>context - the dspace contextSQLExceptionAuthorizeExceptionprotected WorkspaceItemRest save(Context context, WorkspaceItemRest wsi)
DSpaceRestRepositorysave in class DSpaceRestRepository<WorkspaceItemRest,Integer>context - the dspace contextwsi - the REST object to updatepublic Class<WorkspaceItemRest> getDomainClass()
DSpaceRestRepositorygetDomainClass in class DSpaceRestRepository<WorkspaceItemRest,Integer>public WorkspaceItemResource wrapResource(WorkspaceItemRest witem, String... rels)
DSpaceRestRepositorywrapResource in class DSpaceRestRepository<WorkspaceItemRest,Integer>witem - the rest model instancerels - the HAL linkspublic WorkspaceItemRest upload(javax.servlet.http.HttpServletRequest request, String apiCategory, String model, Integer id, org.springframework.web.multipart.MultipartFile file) throws Exception
DSpaceRestRepositoryupload in class DSpaceRestRepository<WorkspaceItemRest,Integer>request - the http requestid - the ID of the target REST objectfile - the uploaded fileExceptionpublic void patch(Context context, javax.servlet.http.HttpServletRequest request, String apiCategory, String model, Integer id, Patch patch) throws SQLException, AuthorizeException
DSpaceRestRepositorypatch in class DSpaceRestRepository<WorkspaceItemRest,Integer>request - the http requestid - the ID of the target REST objectpatch - the JSON Patch (https://tools.ietf.org/html/rfc6902) operationSQLExceptionAuthorizeExceptionprotected void delete(Context context, Integer id) throws AuthorizeException
DSpaceRestRepositorydelete in class DSpaceRestRepository<WorkspaceItemRest,Integer>context - the dspace contextid - the id of the rest object to deleteAuthorizeExceptionpublic Iterable<WorkspaceItemRest> upload(Context context, javax.servlet.http.HttpServletRequest request, org.springframework.web.multipart.MultipartFile uploadfile) throws SQLException, FileNotFoundException, IOException, AuthorizeException
DSpaceRestRepositoryupload in class DSpaceRestRepository<WorkspaceItemRest,Integer>request - the http requestuploadfile - the file to processSQLExceptionFileNotFoundExceptionIOExceptionAuthorizeExceptionCopyright © 2019 DuraSpace. All rights reserved.