Class ReactiveGridFsUpload.ReactiveGridFsUploadBuilder<T>
java.lang.Object
org.springframework.data.mongodb.gridfs.ReactiveGridFsUpload.ReactiveGridFsUploadBuilder<T>
- Type Parameters:
T
- the target id type.
- Enclosing class:
- ReactiveGridFsUpload<ID>
Builder to create
ReactiveGridFsUpload
in a fluent way.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
chunkSize
(int chunkSize) Set the upload chunk size in bytes.content
(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> source) Define the content of the file to upload.contentType
(String contentType) Set the content type.Set the filename.gridFsFile
(com.mongodb.client.gridfs.model.GridFSFile gridFSFile) Set id, filename, metadata and chunk size from given file.id
(T1 id) Set the id to use.metadata
(org.bson.Document metadata) Set the file metadata.options
(GridFsObject.Options options) Set additional file information.
-
Method Details
-
content
public ReactiveGridFsUpload.ReactiveGridFsUploadBuilder<T> content(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> source) Define the content of the file to upload.- Parameters:
source
- the upload content.- Returns:
- this.
-
id
Set the id to use.- Type Parameters:
T1
-- Parameters:
id
- the id to save the content to.- Returns:
- this.
-
filename
Set the filename.- Parameters:
filename
- the filename to use.- Returns:
- this.
-
options
Set additional file information.- Parameters:
options
- must not be null.- Returns:
- this.
-
metadata
Set the file metadata.- Parameters:
metadata
- must not be null.- Returns:
-
chunkSize
Set the upload chunk size in bytes.- Parameters:
chunkSize
- use negative number for default.- Returns:
-
gridFsFile
public ReactiveGridFsUpload.ReactiveGridFsUploadBuilder<T> gridFsFile(com.mongodb.client.gridfs.model.GridFSFile gridFSFile) Set id, filename, metadata and chunk size from given file.- Parameters:
gridFSFile
- must not be null.- Returns:
- this.
-
contentType
Set the content type.- Parameters:
contentType
- must not be null.- Returns:
- this.
-
build
-