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>,org.springframework.data.repository.CrudRepository<SiteRest,UUID>,org.springframework.data.repository.PagingAndSortingRepository<SiteRest,UUID>,org.springframework.data.repository.Repository<SiteRest,UUID>
@Component("core.site") 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 Constructor Description SiteRestRepository(SiteService dsoService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<SiteRest>findAll(Context context, org.springframework.data.domain.Pageable pageable)Method to implement to support scroll of entity instances from the collection resource endpointSiteRestfindOne(Context context, UUID id)Method to implement to support retrieval of a specific REST object instanceClass<SiteRest>getDomainClass()The REST model supported by the repositoryprotected voidpatch(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-
Methods inherited from class org.dspace.app.rest.repository.DSpaceObjectRestRepository
findDomainObjectByPk, getPKClass, patchDSpaceObject
-
Methods inherited from class org.dspace.app.rest.repository.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, put, put, put, put, save, save, saveAll, upload, upload, upload
-
Methods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
-
-
-
Constructor Detail
-
SiteRestRepository
@Autowired public SiteRestRepository(SiteService dsoService)
-
-
Method Detail
-
findOne
@PreAuthorize("permitAll()") public SiteRest findOne(Context context, UUID id)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, javax.servlet.http.HttpServletRequest request, String apiCategory, String model, UUID id, Patch patch) throws AuthorizeException, SQLExceptionDescription 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
public Class<SiteRest> getDomainClass()
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<SiteRest,UUID>
-
-