Class VersionsLinkRepository

java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.VersionsLinkRepository
All Implemented Interfaces:
LinkRestRepository

@Component("versioning.versionhistories.versions") public class VersionsLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepository
This is the Repository that takes care of the retrieval of the Version objects for a given VersionHistory
  • Constructor Details

    • VersionsLinkRepository

      public VersionsLinkRepository()
  • Method Details

    • getVersions

      @PreAuthorize("@versioningSecurity.isEnableVersioning() && hasPermission(#versionHistoryId, \'VERSIONHISTORY\', \'READ\')") public org.springframework.data.domain.Page<VersionRest> getVersions(@Nullable jakarta.servlet.http.HttpServletRequest request, Integer versionHistoryId, @Nullable org.springframework.data.domain.Pageable optionalPageable, Projection projection) throws SQLException
      This method will return a page of VersionRest objects found through the VersionHistory object that is resolved from the versionHistoryId parameter
      Parameters:
      request - The current request
      versionHistoryId - The ID for the VersionHistory to be used
      optionalPageable - The pageable if present
      projection - The current Projection
      Returns:
      The page containing relevant VersionRest objects
      Throws:
      SQLException - If something goes wrong