Package org.dspace.app.rest.repository
Class ExternalSourceRestRepository
java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.DSpaceRestRepository<ExternalSourceRest,String>
org.dspace.app.rest.repository.ExternalSourceRestRepository
- All Implemented Interfaces:
Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<ExternalSourceRest,,String> org.springframework.data.repository.PagingAndSortingRepository<ExternalSourceRest,,String> org.springframework.data.repository.Repository<ExternalSourceRest,String>
@Component("integration.externalsources")
public class ExternalSourceRestRepository
extends DSpaceRestRepository<ExternalSourceRest,String>
This is the Repository that is responsible for the functionality and implementations coming from
ExternalSourcesRestController-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<ExternalSourceRest>Method to implement to support scroll of entity instances from the collection resource endpointorg.springframework.data.domain.Page<ExternalSourceRest>findByEntityType(Context context, org.springframework.data.domain.Pageable pageable, String entityType) Retrieves all ExternalDataProviders that supports the provided EntityType.Method to implement to support retrieval of a specific REST object instanceThe REST model supported by the repositoryorg.springframework.data.domain.Page<ExternalSourceEntryRest>getExternalSourceEntries(String externalSourceName, String query, String parent, org.springframework.data.domain.Pageable pageable) This method will retrieve all the ExternalSourceEntries for the ExternalSource for the given externalSourceName paramgetExternalSourceEntryValue(String externalSourceName, String entryId) This method will retrieve one ExternalSourceEntryResource based on the ExternalSource for the given externalSourceName and with the given entryIdMethods 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
-
Constructor Details
-
ExternalSourceRestRepository
public ExternalSourceRestRepository()
-
-
Method Details
-
getExternalSourceEntryValue
public ExternalSourceEntryRest getExternalSourceEntryValue(String externalSourceName, String entryId) This method will retrieve one ExternalSourceEntryResource based on the ExternalSource for the given externalSourceName and with the given entryId- Parameters:
externalSourceName- The externalSourceName that defines which ExternalDataProvider is usedentryId- The entryId used for the lookup- Returns:
- An ExternalSourceEntryRest object that complies with the above params
-
getExternalSourceEntries
public org.springframework.data.domain.Page<ExternalSourceEntryRest> getExternalSourceEntries(String externalSourceName, String query, String parent, org.springframework.data.domain.Pageable pageable) This method will retrieve all the ExternalSourceEntries for the ExternalSource for the given externalSourceName param- Parameters:
externalSourceName- The externalSourceName that defines which ExternalDataProvider is usedquery- The query used in the lookupparent- The parent used in the lookuppageable- The pagination object- Returns:
- A paginated list of ExternalSourceEntryResource objects that comply with the params
-
findOne
@PreAuthorize("permitAll()") public ExternalSourceRest findOne(Context context, String externalSourceName) Description copied from class:DSpaceRestRepositoryMethod to implement to support retrieval of a specific REST object instance- Specified by:
findOnein classDSpaceRestRepository<ExternalSourceRest,String> - Parameters:
context- the dspace contextexternalSourceName- the rest object id- Returns:
- the REST object identified by its ID
-
findAll
@PreAuthorize("permitAll()") public org.springframework.data.domain.Page<ExternalSourceRest> 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<ExternalSourceRest,String> - Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
findByEntityType
@PreAuthorize("permitAll()") public org.springframework.data.domain.Page<ExternalSourceRest> findByEntityType(Context context, org.springframework.data.domain.Pageable pageable, String entityType) Retrieves all ExternalDataProviders that supports the provided EntityType.- Parameters:
context- The relevant DSpace contextpageable- The pagination informationentityType- Entity type label- Returns:
-
getDomainClass
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ExternalSourceRest,String>
-