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:
org.springframework.data.repository.CrudRepository<ExternalSourceRest,String>,org.springframework.data.repository.PagingAndSortingRepository<ExternalSourceRest,String>,org.springframework.data.repository.Repository<ExternalSourceRest,String>
@Component("integration.externalsource") public class ExternalSourceRestRepository extends DSpaceRestRepository<ExternalSourceRest,String>This is the Repository that is responsible for the functionality and implementations coming fromExternalSourcesRestController
-
-
Field Summary
-
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
requestService, utils
-
-
Constructor Summary
Constructors Constructor Description ExternalSourceRestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<ExternalSourceRest>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 endpointExternalSourceRestfindOne(org.dspace.core.Context context, String externalSourceName)Method to implement to support retrieval of a specific REST object instanceClass<ExternalSourceRest>getDomainClass()The 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 paramExternalSourceEntryRestgetExternalSourceEntryValue(String externalSourceName, String entryId)This method will retrieve one ExternalSourceEntryResource based on the ExternalSource for the given externalSourceName and with the given entryId-
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
-
-
-
-
Method Detail
-
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(org.dspace.core.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(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<ExternalSourceRest,String>- Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
getDomainClass
public Class<ExternalSourceRest> getDomainClass()
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ExternalSourceRest,String>
-
-