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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder to createReactiveGridFsUpload
in a fluent way.Nested classes/interfaces inherited from interface org.springframework.data.mongodb.gridfs.GridFsObject
GridFsObject.Options
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReactiveGridFsUpload.ReactiveGridFsUploadBuilder<org.bson.types.ObjectId>
fromPublisher
(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> source) Create a new instance ofReactiveGridFsUpload
for the givenPublisher
.org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>
The actual file content.TheGridFSFile.getId()
value converted into its simple java type.The filename.Additional information like file metadata (eg. contentType).
-
Method Details
-
getFileId
TheGridFSFile.getId()
value converted into its simple java type.
ABsonString
will be converted to plainString
.- Specified by:
getFileId
in interfaceGridFsObject<ID,
org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>> - Returns:
- can be null.
- See Also:
-
getFilename
Description copied from interface:GridFsObject
The filename.- Specified by:
getFilename
in interfaceGridFsObject<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 interfaceGridFsObject<ID,
org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>> - Returns:
-
getOptions
Description copied from interface:GridFsObject
Additional information like file metadata (eg. contentType).- Specified by:
getOptions
in interfaceGridFsObject<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 ofReactiveGridFsUpload
for the givenPublisher
.- Parameters:
source
- must not be null.- Returns:
- new instance of
GridFsUpload
.
-