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:
org.springframework.data.repository.CrudRepository<AuthorizationRest,String>,org.springframework.data.repository.PagingAndSortingRepository<AuthorizationRest,String>,org.springframework.data.repository.Repository<AuthorizationRest,String>
@Component("authz.authorization") 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
Fields Modifier and Type Field Description protected ConverterServiceconverter-
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
requestService, utils
-
-
Constructor Summary
Constructors Constructor Description AuthorizationRestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<AuthorizationRest>findAll(org.dspace.core.Context context, org.springframework.data.domain.Pageable pageable)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.AuthorizationRestfindOne(org.dspace.core.Context context, String id)Method to implement to support retrieval of a specific REST object instanceClass<AuthorizationRest>getDomainClass()The REST model supported by the repository-
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, patch, put, put, put, put, save, save, saveAll, upload, upload, upload
-
Methods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
-
-
-
Field Detail
-
converter
@Autowired protected ConverterService converter
-
-
Method Detail
-
findOne
@PreAuthorize("hasPermission(#id, \'authorization\', \'READ\')") public AuthorizationRest findOne(org.dspace.core.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 org.dspace.authorize.AuthorizeException, SQLExceptionIt 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:
org.dspace.authorize.AuthorizeExceptionSQLException
-
getDomainClass
public Class<AuthorizationRest> 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(org.dspace.core.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:
-
-