Class 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
  • 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 used
      entryId - 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 used
      query - The query used in the lookup
      parent - The parent used in the lookup
      pageable - 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: DSpaceRestRepository
      Method to implement to support retrieval of a specific REST object instance
      Specified by:
      findOne in class DSpaceRestRepository<ExternalSourceRest,String>
      Parameters:
      context - the dspace context
      externalSourceName - 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: DSpaceRestRepository
      Method to implement to support scroll of entity instances from the collection resource endpoint
      Specified by:
      findAll in class DSpaceRestRepository<ExternalSourceRest,String>
      Parameters:
      context - the dspace context
      pageable - 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 context
      pageable - The pagination information
      entityType - Entity type label
      Returns:
    • getDomainClass

      public Class<ExternalSourceRest> getDomainClass()
      Description copied from class: DSpaceRestRepository
      The REST model supported by the repository
      Specified by:
      getDomainClass in class DSpaceRestRepository<ExternalSourceRest,String>