@Component(value="core.bitstream") public class BitstreamRestRepository extends DSpaceObjectRestRepository<Bitstream,BitstreamRest>
requestService, utils| Constructor and Description |
|---|
BitstreamRestRepository(BitstreamService dsoService,
BitstreamConverter dsoConverter) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
delete(Context context,
UUID id)
Method to implement to support delete of a single object instance
|
org.springframework.data.domain.Page<BitstreamRest> |
findAll(Context context,
org.springframework.data.domain.Pageable pageable)
Method to implement to support scroll of entity instances from the collection resource endpoin
|
BitstreamRest |
findOne(Context context,
UUID id)
Method to implement to support retrieval of a specific REST object instance
|
Class<BitstreamRest> |
getDomainClass()
The REST model supported by the repository
|
protected void |
patch(Context context,
javax.servlet.http.HttpServletRequest request,
String apiCategory,
String model,
UUID id,
Patch patch)
Method to implement to allow partial update of the REST object via JSON Patch
|
InputStream |
retrieve(UUID uuid) |
BitstreamResource |
wrapResource(BitstreamRest bs,
String... rels)
Wrap the REST model in a REST HAL Resource
|
patchDSpaceObject, updateDSpaceObjectaction, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, delete, delete, deleteAll, exists, findAll, findAll, findAll, findAll, findOne, patch, put, put, put, put, save, save, save, upload, upload, uploadgetRequestService, obtainContext@Autowired public BitstreamRestRepository(BitstreamService dsoService, BitstreamConverter dsoConverter)
@PreAuthorize(value="hasPermission(#id, \'BITSTREAM\', \'READ\')") public BitstreamRest findOne(Context context, UUID id)
DSpaceRestRepositoryfindOne in class DSpaceRestRepository<BitstreamRest,UUID>context - the dspace contextid - the rest object id@PreAuthorize(value="hasAuthority(\'ADMIN\')") public org.springframework.data.domain.Page<BitstreamRest> findAll(Context context, org.springframework.data.domain.Pageable pageable)
DSpaceRestRepositoryfindAll in class DSpaceRestRepository<BitstreamRest,UUID>context - the dspace contextpageable - object embedding the requested pagination info@PreAuthorize(value="hasPermission(#id, \'BITSTREAM\', \'WRITE\')") protected void patch(Context context, javax.servlet.http.HttpServletRequest request, String apiCategory, String model, UUID id, Patch patch) throws AuthorizeException, SQLException
DSpaceRestRepositorypatch in class DSpaceRestRepository<BitstreamRest,UUID>request - the http requestid - the ID of the target REST objectpatch - the JSON Patch (https://tools.ietf.org/html/rfc6902) operationAuthorizeExceptionSQLExceptionpublic Class<BitstreamRest> getDomainClass()
DSpaceRestRepositorygetDomainClass in class DSpaceRestRepository<BitstreamRest,UUID>public BitstreamResource wrapResource(BitstreamRest bs, String... rels)
DSpaceRestRepositorywrapResource in class DSpaceRestRepository<BitstreamRest,UUID>bs - the rest model instancerels - the HAL linksprotected void delete(Context context, UUID id) throws AuthorizeException
DSpaceRestRepositorydelete in class DSpaceRestRepository<BitstreamRest,UUID>context - the dspace contextid - the id of the rest object to deleteAuthorizeExceptionpublic InputStream retrieve(UUID uuid)
Copyright © 2019 DuraSpace. All rights reserved.