Class ReactiveGridFsUpload<ID>

java.lang.Object
org.springframework.data.mongodb.gridfs.ReactiveGridFsUpload<ID>
All Implemented Interfaces:
GridFsObject<ID,org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>>

public class ReactiveGridFsUpload<ID> extends Object implements GridFsObject<ID,org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>>
Upload descriptor for a GridFS file upload.
Since:
3.0
Author:
Christoph Strobl, Mark Paluch
  • Method Details

    • getFileId

      @Nullable public ID getFileId()
      The GridFSFile.getId() value converted into its simple java type.
      A BsonString will be converted to plain String.
      Specified by:
      getFileId in interface GridFsObject<ID,org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>>
      Returns:
      can be null.
      See Also:
    • getFilename

      public String getFilename()
      Description copied from interface: GridFsObject
      The filename.
      Specified by:
      getFilename in interface GridFsObject<ID,org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>>
      Returns:
    • getContent

      public org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> getContent()
      Description copied from interface: GridFsObject
      The actual file content.
      Specified by:
      getContent in interface GridFsObject<ID,org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>>
      Returns:
    • getOptions

      public GridFsObject.Options getOptions()
      Description copied from interface: GridFsObject
      Additional information like file metadata (eg. contentType).
      Specified by:
      getOptions in interface GridFsObject<ID,org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>>
      Returns:
      never null.
    • fromPublisher

      public static ReactiveGridFsUpload.ReactiveGridFsUploadBuilder<org.bson.types.ObjectId> fromPublisher(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> source)
      Create a new instance of ReactiveGridFsUpload for the given Publisher.
      Parameters:
      source - must not be null.
      Returns:
      new instance of GridFsUpload.