Class FcrepoOcflObjectSessionWrapper

java.lang.Object
org.fcrepo.persistence.ocfl.impl.FcrepoOcflObjectSessionWrapper
All Implemented Interfaces:
AutoCloseable, org.fcrepo.storage.ocfl.OcflObjectSession

public class FcrepoOcflObjectSessionWrapper extends Object implements org.fcrepo.storage.ocfl.OcflObjectSession
Wrapper around an OcflObjectSession to convert exceptions into fcrepo exceptions and time operations
Author:
pwinckles
  • Constructor Details

    • FcrepoOcflObjectSessionWrapper

      public FcrepoOcflObjectSessionWrapper(org.fcrepo.storage.ocfl.OcflObjectSession inner)
      Parameters:
      inner - the session to wrap
  • Method Details

    • sessionId

      public String sessionId()
      Specified by:
      sessionId in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • ocflObjectId

      public String ocflObjectId()
      Specified by:
      ocflObjectId in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • writeResource

      public org.fcrepo.storage.ocfl.ResourceHeaders writeResource(org.fcrepo.storage.ocfl.ResourceHeaders headers, InputStream content)
      Specified by:
      writeResource in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • writeHeaders

      public void writeHeaders(org.fcrepo.storage.ocfl.ResourceHeaders headers)
      Specified by:
      writeHeaders in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • deleteContentFile

      public void deleteContentFile(org.fcrepo.storage.ocfl.ResourceHeaders headers)
      Specified by:
      deleteContentFile in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • deleteResource

      public void deleteResource(String resourceId)
      Specified by:
      deleteResource in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • containsResource

      public boolean containsResource(String resourceId)
      Specified by:
      containsResource in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • readHeaders

      public org.fcrepo.storage.ocfl.ResourceHeaders readHeaders(String resourceId)
      Specified by:
      readHeaders in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • readHeaders

      public org.fcrepo.storage.ocfl.ResourceHeaders readHeaders(String resourceId, String versionNumber)
      Specified by:
      readHeaders in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • readContent

      public org.fcrepo.storage.ocfl.ResourceContent readContent(String resourceId)
      Specified by:
      readContent in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • readContent

      public org.fcrepo.storage.ocfl.ResourceContent readContent(String resourceId, String versionNumber)
      Specified by:
      readContent in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • readRange

      public org.fcrepo.storage.ocfl.ResourceContent readRange(String resourceId, long start, long end)
      Specified by:
      readRange in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • readRange

      public org.fcrepo.storage.ocfl.ResourceContent readRange(String resourceId, String versionNumber, long start, long end)
      Specified by:
      readRange in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • listVersions

      public List<org.fcrepo.storage.ocfl.OcflVersionInfo> listVersions(String resourceId)
      Specified by:
      listVersions in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • streamResourceHeaders

      public Stream<org.fcrepo.storage.ocfl.ResourceHeaders> streamResourceHeaders()
      Specified by:
      streamResourceHeaders in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • versionCreationTimestamp

      public void versionCreationTimestamp(OffsetDateTime timestamp)
      Specified by:
      versionCreationTimestamp in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • versionAuthor

      public void versionAuthor(String name, String address)
      Specified by:
      versionAuthor in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • versionMessage

      public void versionMessage(String message)
      Specified by:
      versionMessage in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • invalidateCache

      public void invalidateCache(String resourceId)
      Specified by:
      invalidateCache in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • commitType

      public void commitType(org.fcrepo.storage.ocfl.CommitType commitType)
      Specified by:
      commitType in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • commit

      public void commit()
      Specified by:
      commit in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • rollback

      public void rollback()
      Specified by:
      rollback in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • abort

      public void abort()
      Specified by:
      abort in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface org.fcrepo.storage.ocfl.OcflObjectSession
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.fcrepo.storage.ocfl.OcflObjectSession