Package org.dspace.app.rest.repository
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-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<VersionRest>getVersions(jakarta.servlet.http.HttpServletRequest request, Integer versionHistoryId, org.springframework.data.domain.Pageable optionalPageable, Projection projection) This method will return a page of VersionRest objects found through the VersionHistory object that is resolved from the versionHistoryId parameterMethods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.app.rest.repository.LinkRestRepository
isEmbeddableRelation
-
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 requestversionHistoryId- The ID for the VersionHistory to be usedoptionalPageable- The pageable if presentprojection- The current Projection- Returns:
- The page containing relevant VersionRest objects
- Throws:
SQLException- If something goes wrong
-