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
  • 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 request
      itemUuid - The itemUuid used to find the Item for which we'll return the VersionRest object
      optionalPageable - Pageable if present
      projection - 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