Package org.dspace.app.rest.repository
Class ResearcherProfileRestRepository
java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.DSpaceRestRepository<ResearcherProfileRest,UUID>
org.dspace.app.rest.repository.ResearcherProfileRestRepository
- All Implemented Interfaces:
Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<ResearcherProfileRest,,UUID> org.springframework.data.repository.PagingAndSortingRepository<ResearcherProfileRest,,UUID> org.springframework.data.repository.Repository<ResearcherProfileRest,UUID>
@Component("eperson.profiles")
@ConditionalOnProperty("researcher-profile.entity-type")
public class ResearcherProfileRestRepository
extends DSpaceRestRepository<ResearcherProfileRest,UUID>
This is the repository responsible of exposing researcher profiles.
- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
Field Summary
FieldsFields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ResearcherProfileRestcreateAndReturn(Context context) Create a new researcher profile from scratch.protected ResearcherProfileRestcreateAndReturn(Context context, List<String> list) Create a new researcher profile claiming an already existing item.protected voidMethod to implement to support delete of a single object instanceorg.springframework.data.domain.Page<ResearcherProfileRest>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.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, 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
-
Field Details
-
NO_VISIBILITY_CHANGE_MSG
- See Also:
-
-
Constructor Details
-
ResearcherProfileRestRepository
public ResearcherProfileRestRepository()
-
-
Method Details
-
findOne
@PreAuthorize("hasPermission(#id, \'PROFILE\', \'READ\')") public ResearcherProfileRest 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<ResearcherProfileRest,UUID> - Parameters:
context- the dspace contextid- the rest object id- Returns:
- the REST object identified by its ID
-
createAndReturn
@PreAuthorize("isAuthenticated()") protected ResearcherProfileRest createAndReturn(Context context) throws AuthorizeException, SQLException Create a new researcher profile from scratch.- Overrides:
createAndReturnin classDSpaceRestRepository<ResearcherProfileRest,UUID> - Parameters:
context- the dspace context- Returns:
- the created REST object
- Throws:
AuthorizeExceptionSQLException
-
createAndReturn
protected ResearcherProfileRest createAndReturn(Context context, List<String> list) throws AuthorizeException, SQLException, RepositoryMethodNotImplementedException Create a new researcher profile claiming an already existing item.- Overrides:
createAndReturnin classDSpaceRestRepository<ResearcherProfileRest,UUID> - Parameters:
context- the dspace contextlist- The list of Strings that will be used as data for the object that's to be created This list is retrieved from the uri-list body- Returns:
- the created REST object
- Throws:
AuthorizeExceptionSQLExceptionRepositoryMethodNotImplementedException- returned by the default implementation when the operation is not supported for the entity
-
findAll
public org.springframework.data.domain.Page<ResearcherProfileRest> 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<ResearcherProfileRest,UUID> - Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
delete
@PreAuthorize("hasPermission(#id, \'PROFILE\', \'DELETE\')") protected void delete(Context context, UUID id) Description copied from class:DSpaceRestRepositoryMethod to implement to support delete of a single object instance- Overrides:
deletein classDSpaceRestRepository<ResearcherProfileRest,UUID> - Parameters:
context- the dspace contextid- the id of the rest object to delete
-
patch
@PreAuthorize("hasPermission(#id, \'PROFILE\', #patch)") protected void patch(Context context, jakarta.servlet.http.HttpServletRequest request, String apiCategory, String model, UUID id, Patch patch) throws SQLException, AuthorizeException Description copied from class:DSpaceRestRepositoryMethod to implement to allow partial update of the REST object via JSON Patch- Overrides:
patchin classDSpaceRestRepository<ResearcherProfileRest,UUID> request- the http requestid- the ID of the target REST objectpatch- the JSON Patch (https://tools.ietf.org/html/rfc6902) operation- Throws:
SQLExceptionAuthorizeException
-
getDomainClass
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ResearcherProfileRest,UUID>
-