Package org.dspace.app.rest.repository
Class SiteRestRepository
java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.DSpaceRestRepository<R,UUID>
org.dspace.app.rest.repository.DSpaceObjectRestRepository<Site,SiteRest>
org.dspace.app.rest.repository.SiteRestRepository
- All Implemented Interfaces:
ReloadableEntityObjectRepository<Site,,UUID> Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<SiteRest,,UUID> org.springframework.data.repository.PagingAndSortingRepository<SiteRest,,UUID> org.springframework.data.repository.Repository<SiteRest,UUID>
@Component("core.sites")
public class SiteRestRepository
extends DSpaceObjectRestRepository<Site,SiteRest>
This is the repository responsible to manage Item Rest object
- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<SiteRest>Method to implement to support scroll of entity instances from the collection resource endpointMethod to implement to support retrieval of a specific REST object instanceThe REST model supported by the repositoryprotected voidpatch(Context context, jakarta.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 PatchMethods inherited from class org.dspace.app.rest.repository.DSpaceObjectRestRepository
findDomainObjectByPk, getPKClass, patchDSpaceObjectMethods inherited from class org.dspace.app.rest.repository.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, put, put, put, put, save, save, saveAll, setBeanName, upload, upload, uploadMethods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
Constructor Details
-
SiteRestRepository
-
-
Method Details
-
findOne
Description copied from class:DSpaceRestRepositoryMethod to implement to support retrieval of a specific REST object instance- Specified by:
findOnein classDSpaceRestRepository<SiteRest,UUID> - Parameters:
context- the dspace contextid- the rest object id- Returns:
- the REST object identified by its ID
-
findAll
public org.springframework.data.domain.Page<SiteRest> findAll(Context context, org.springframework.data.domain.Pageable pageable) Description copied from class:DSpaceRestRepositoryMethod to implement to support scroll of entity instances from the collection resource endpoint- Specified by:
findAllin classDSpaceRestRepository<SiteRest,UUID> - Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
patch
@PreAuthorize("hasAuthority(\'ADMIN\')") protected void patch(Context context, jakarta.servlet.http.HttpServletRequest request, String apiCategory, String model, UUID id, Patch patch) throws AuthorizeException, SQLException Description copied from class:DSpaceRestRepositoryMethod to implement to allow partial update of the REST object via JSON Patch- Overrides:
patchin classDSpaceRestRepository<SiteRest,UUID> request- the http requestid- the ID of the target REST objectpatch- the JSON Patch (https://tools.ietf.org/html/rfc6902) operation- Throws:
AuthorizeExceptionSQLException
-
getDomainClass
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<SiteRest,UUID>
-