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:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.data.repository.CrudRepository<ResearcherProfileRest,UUID>,org.springframework.data.repository.PagingAndSortingRepository<ResearcherProfileRest,UUID>,org.springframework.data.repository.Repository<ResearcherProfileRest,UUID>
@Component("eperson.profile") @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
Fields Modifier and Type Field Description static StringNO_VISIBILITY_CHANGE_MSG-
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils
-
-
Constructor Summary
Constructors Constructor Description ResearcherProfileRestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 voiddelete(Context context, UUID id)Method to implement to support delete of a single object instanceorg.springframework.data.domain.Page<ResearcherProfileRest>findAll(Context context, org.springframework.data.domain.Pageable pageable)Method to implement to support scroll of entity instances from the collection resource endpointResearcherProfileRestfindOne(Context context, UUID id)Method to implement to support retrieval of a specific REST object instanceClass<ResearcherProfileRest>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.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, upload
-
Methods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
-
-
-
Field Detail
-
NO_VISIBILITY_CHANGE_MSG
public static final String NO_VISIBILITY_CHANGE_MSG
- See Also:
- Constant Field Values
-
-
Method Detail
-
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, SQLExceptionCreate 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, javax.servlet.http.HttpServletRequest request, String apiCategory, String model, UUID id, Patch patch) throws SQLException, AuthorizeExceptionDescription 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
public Class<ResearcherProfileRest> getDomainClass()
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ResearcherProfileRest,UUID>
-
-