Package org.dspace.app.rest.repository
Class AuthorizationRestRepository
java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.DSpaceRestRepository<AuthorizationRest,String>
org.dspace.app.rest.repository.AuthorizationRestRepository
- All Implemented Interfaces:
Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<AuthorizationRest,,String> org.springframework.data.repository.PagingAndSortingRepository<AuthorizationRest,,String> org.springframework.data.repository.Repository<AuthorizationRest,String>
@Component("authz.authorizations")
public class AuthorizationRestRepository
extends DSpaceRestRepository<AuthorizationRest,String>
This is the repository responsible to manage Authorization Rest object
- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Field Summary
FieldsFields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<AuthorizationRest>Method to implement to support scroll of entity instances from the collection resource endpointorg.springframework.data.domain.Page<AuthorizationRest>findByObject(String uri, UUID epersonUuid, String featureName, org.springframework.data.domain.Pageable pageable) It returns the list of matching available authorizations granted to the specified eperson or to the anonymous user.org.springframework.data.domain.Page<AuthorizationRest>findByObjects(List<String> uuidList, String type, UUID epersonUuid, List<String> featureNames, org.springframework.data.domain.Pageable pageable) Method to implement to support retrieval of a specific REST object instanceThe REST model supported by the repositoryMethods 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, 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
-
converter
-
-
Constructor Details
-
AuthorizationRestRepository
public AuthorizationRestRepository()
-
-
Method Details
-
findOne
@PreAuthorize("hasPermission(#id, \'authorization\', \'READ\')") public AuthorizationRest findOne(Context context, String id) Description copied from class:DSpaceRestRepositoryMethod to implement to support retrieval of a specific REST object instance- Specified by:
findOnein classDSpaceRestRepository<AuthorizationRest,String> - Parameters:
context- the dspace contextid- the rest object id- Returns:
- the REST object identified by its ID
-
findByObject
@PreAuthorize("#epersonUuid==null || hasPermission(#epersonUuid, \'EPERSON\', \'READ\')") public org.springframework.data.domain.Page<AuthorizationRest> findByObject(String uri, UUID epersonUuid, String featureName, org.springframework.data.domain.Pageable pageable) throws AuthorizeException, SQLException, SearchServiceException It returns the list of matching available authorizations granted to the specified eperson or to the anonymous user. Only administrators and the user identified by the epersonUuid parameter can access this method- Parameters:
uri- the uri of the object to check the authorization againstepersonUuid- the eperson uuid to use in the authorization evaluationpageable- the pagination options- Returns:
- the list of matching authorization available for the requested user and object, filtered by feature if provided
- Throws:
AuthorizeExceptionSQLExceptionSearchServiceException
-
findByObjects
@PreAuthorize("#epersonUuid==null || hasPermission(#epersonUuid, \'EPERSON\', \'READ\')") public org.springframework.data.domain.Page<AuthorizationRest> findByObjects(List<String> uuidList, String type, UUID epersonUuid, List<String> featureNames, org.springframework.data.domain.Pageable pageable) throws AuthorizeException, SQLException - Throws:
AuthorizeExceptionSQLException
-
getDomainClass
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<AuthorizationRest,String>
-
findAll
public org.springframework.data.domain.Page<AuthorizationRest> 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<AuthorizationRest,String> - Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-