[ https://issues.apache.org/jira/browse/NIFI-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435319#comment-16435319 ]
ASF GitHub Bot commented on NIFI-4975: -------------------------------------- Github user MikeThomsen commented on a diff in the pull request: https://github.com/apache/nifi/pull/2546#discussion_r181036257 --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/gridfs/DeleteGridFS.java --- @@ -0,0 +1,161 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.nifi.processors.mongodb.gridfs; + +import com.mongodb.client.MongoCursor; +import com.mongodb.client.gridfs.GridFSBucket; +import com.mongodb.client.gridfs.model.GridFSFile; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.components.ValidationContext; +import org.apache.nifi.components.ValidationResult; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; +import org.apache.nifi.util.StringUtils; +import org.bson.Document; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@CapabilityDescription("Deletes a file from GridFS using a file name or a query.") +@Tags({"gridfs", "delete", "mongodb"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +public class DeleteGridFS extends AbstractGridFSProcessor { + static final PropertyDescriptor QUERY = new PropertyDescriptor.Builder() + .name("delete-gridfs-query") + .displayName("Query") + .description("A valid MongoDB query to use to find and delete one or more files from GridFS.") + .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES) + .addValidator(DOCUMENT_VALIDATOR) + .required(false) + .build(); + + static final PropertyDescriptor FILE_NAME = new PropertyDescriptor.Builder() + .name("gridfs-file-name") + .displayName("File Name") --- End diff -- It's like buckets from everything I've seen, so I'll clarify that. > Add support for MongoDB GridFS > ------------------------------ > > Key: NIFI-4975 > URL: https://issues.apache.org/jira/browse/NIFI-4975 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Mike Thomsen > Assignee: Mike Thomsen > Priority: Major > > [An overview |https://docs.mongodb.com/manual/core/gridfs/]of what GridFS is. > Basic CRUD processors for handling GridFS should be added to the MongoDB NAR. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)