Class ReactiveGridFsUpload<ID>
java.lang.Object
org.springframework.data.mongodb.gridfs.ReactiveGridFsUpload<ID>
- All Implemented Interfaces:
GridFsObject<ID,
org.reactivestreams.Publisher<DataBuffer>>
public class ReactiveGridFsUpload<ID>
extends Object
implements GridFsObject<ID,org.reactivestreams.Publisher<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<DataBuffer> source) Create a new instance ofReactiveGridFsUpload
for the givenPublisher
.org.reactivestreams.Publisher<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<DataBuffer>> - Returns:
- can be null.
- See Also:
-
getFilename
Description copied from interface:GridFsObject
The filename.- Specified by:
getFilename
in interfaceGridFsObject<ID,
org.reactivestreams.Publisher<DataBuffer>> - Returns:
-
getContent
Description copied from interface:GridFsObject
The actual file content.- Specified by:
getContent
in interfaceGridFsObject<ID,
org.reactivestreams.Publisher<DataBuffer>> - Returns:
-
getOptions
Description copied from interface:GridFsObject
Additional information like file metadata (eg. contentType).- Specified by:
getOptions
in interfaceGridFsObject<ID,
org.reactivestreams.Publisher<DataBuffer>> - Returns:
- never null.
-
fromPublisher
public static ReactiveGridFsUpload.ReactiveGridFsUploadBuilder<org.bson.types.ObjectId> fromPublisher(org.reactivestreams.Publisher<DataBuffer> source) Create a new instance ofReactiveGridFsUpload
for the givenPublisher
.- Parameters:
source
- must not be null.- Returns:
- new instance of
GridFsUpload
.
-