Package org.dspace.app.rest.repository
Class ItemVersionLinkRepository
java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.ItemVersionLinkRepository
- All Implemented Interfaces:
LinkRestRepository
@Component("core.items.version")
public class ItemVersionLinkRepository
extends AbstractDSpaceRestRepository
implements LinkRestRepository
This is the Repository that will take care of fetching the Version for a given Item
-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItemVersion(jakarta.servlet.http.HttpServletRequest request, UUID itemUuid, org.springframework.data.domain.Pageable optionalPageable, Projection projection) This method will return the VersionRest object from the Item that is associated with the given itemUuidMethods 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
-
ItemVersionLinkRepository
public ItemVersionLinkRepository()
-
-
Method Details
-
getItemVersion
@PreAuthorize("@versioningSecurity.isEnableVersioning() && (hasPermission(@extractorOf.getVersionIdByItemUUID(#request, #itemUuid), \'VERSION\', \'READ\') || (@extractorOf.getVersionIdByItemUUID(#request, #itemUuid) == null && hasPermission(#itemUuid,\'ITEM\',\'READ\')))") public VersionRest getItemVersion(@Nullable jakarta.servlet.http.HttpServletRequest request, UUID itemUuid, @Nullable org.springframework.data.domain.Pageable optionalPageable, Projection projection) throws SQLException This method will return the VersionRest object from the Item that is associated with the given itemUuid- Parameters:
request- The current requestitemUuid- The itemUuid used to find the Item for which we'll return the VersionRest objectoptionalPageable- Pageable if presentprojection- Current Projection- Returns:
- The VersionRest object constructed from the Version object for the Item that has the itemUuid param as UUID
- Throws:
SQLException- If something goes wrong
-