/** * Stores the given content into a file with the given name. * * @param content must not be {@literal null}. * @param filename must not be {@literal null} or empty. * @return a {@link Mono} emitting the {@link ObjectId} of the {@link com.mongodb.client.gridfs.model.GridFSFile} just * created. */ default Mono<ObjectId> store(Publisher<DataBuffer> content, String filename) { return store(content, filename, (Object) null); }
/** * Stores the given content into a file applying the given metadata. * * @param content must not be {@literal null}. * @param metadata can be {@literal null}. * @return a {@link Mono} emitting the {@link ObjectId} of the {@link com.mongodb.client.gridfs.model.GridFSFile} just * created. */ default Mono<ObjectId> store(Publisher<DataBuffer> content, @Nullable Object metadata) { return store(content, null, metadata); }
/** * Stores the given content into a file applying the given metadata. * * @param content must not be {@literal null}. * @param metadata can be {@literal null}. * @return a {@link Mono} emitting the {@link ObjectId} of the {@link com.mongodb.client.gridfs.model.GridFSFile} just * created. */ default Mono<ObjectId> store(Publisher<DataBuffer> content, @Nullable Document metadata) { return store(content, null, metadata); }
/** * Stores the given content into a file with the given name using the given metadata. * * @param content must not be {@literal null}. * @param filename must not be {@literal null} or empty. * @param metadata can be {@literal null}. * @return a {@link Mono} emitting the {@link ObjectId} of the {@link com.mongodb.client.gridfs.model.GridFSFile} just * created. */ default Mono<ObjectId> store(Publisher<DataBuffer> content, @Nullable String filename, @Nullable Document metadata) { return store(content, filename, null, metadata); }
/** * Stores the given content into a file with the given name using the given metadata. The metadata object will be * marshalled before writing. * * @param content must not be {@literal null}. * @param filename can be {@literal null} or empty. * @param metadata can be {@literal null}. * @return a {@link Mono} emitting the {@link ObjectId} of the {@link com.mongodb.client.gridfs.model.GridFSFile} just * created. */ default Mono<ObjectId> store(Publisher<DataBuffer> content, @Nullable String filename, @Nullable Object metadata) { return store(content, filename, null, metadata); }
/** * Stores the given content into a file with the given name and content type. * * @param content must not be {@literal null}. * @param filename must not be {@literal null} or empty. * @param contentType can be {@literal null}. * @return a {@link Mono} emitting the {@link ObjectId} of the {@link com.mongodb.client.gridfs.model.GridFSFile} just * created. */ default Mono<ObjectId> store(Publisher<DataBuffer> content, @Nullable String filename, @Nullable String contentType) { return store(content, filename, contentType, (Object) null); }