Class FilesystemBinaryStorageSvcImpl

java.lang.Object
ca.uhn.fhir.jpa.binary.svc.BaseBinaryStorageSvcImpl
ca.uhn.fhir.jpa.binstore.FilesystemBinaryStorageSvcImpl
All Implemented Interfaces:
IBinaryStorageSvc

  • Constructor Details

  • Method Details

    • isValidBinaryContentId

      public boolean isValidBinaryContentId(String theNewBinaryContentId)
      This implementation prevents: \ / | .
      Specified by:
      isValidBinaryContentId in interface IBinaryStorageSvc
      Overrides:
      isValidBinaryContentId in class BaseBinaryStorageSvcImpl
      Parameters:
      theNewBinaryContentId - the blob ID to validate
      Returns:
      true if the blob ID is valid, false otherwise.
    • storeBinaryContent

      @Nonnull public StoredDetails storeBinaryContent(org.hl7.fhir.instance.model.api.IIdType theResourceId, String theBlobIdOrNull, String theContentType, InputStream theInputStream, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) throws IOException
      Description copied from interface: IBinaryStorageSvc
      Store a new binary blob
      Parameters:
      theResourceId - The resource ID that owns this blob. Note that it should not be possible to retrieve a blob without both the resource ID and the blob ID being correct.
      theBlobIdOrNull - If set, forces
      theContentType - The content type to associate with this blob
      theInputStream - An InputStream to read from. This method should close the stream when it has been fully consumed.
      theRequestDetails - The operation request details.
      Returns:
      Returns details about the stored data
      Throws:
      IOException
    • fetchBinaryContentDetails

      public StoredDetails fetchBinaryContentDetails(org.hl7.fhir.instance.model.api.IIdType theResourceId, String theBlobId) throws IOException
      Throws:
      IOException
    • writeBinaryContent

      public boolean writeBinaryContent(org.hl7.fhir.instance.model.api.IIdType theResourceId, String theBlobId, OutputStream theOutputStream) throws IOException
      Returns:
      Returns true if the blob was found and written, of false if the blob was not found (i.e. it was expunged or the ID was invalid)
      Throws:
      IOException
    • expungeBinaryContent

      public void expungeBinaryContent(org.hl7.fhir.instance.model.api.IIdType theResourceId, String theBlobId)
    • fetchBinaryContent

      public byte[] fetchBinaryContent(org.hl7.fhir.instance.model.api.IIdType theResourceId, String theBlobId) throws IOException
      Description copied from interface: IBinaryStorageSvc
      Fetch the contents of the given blob
      Parameters:
      theResourceId - The resource ID
      theBlobId - The blob ID
      Returns:
      The payload as a byte array
      Throws:
      IOException