Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2671#discussion_r185738577
  
    --- Diff: 
nifi-nar-bundles/nifi-marklogic-bundle/nifi-marklogic-processors/src/main/java/com/marklogic/nifi/processor/AbstractMarkLogicProcessor.java
 ---
    @@ -0,0 +1,104 @@
    +/*
    + * 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 com.marklogic.nifi.processor;
    +
    +import com.marklogic.client.DatabaseClient;
    +import com.marklogic.nifi.controller.DatabaseClientService;
    +import com.marklogic.nifi.controller.DatabaseClientService;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.components.ValidationContext;
    +import org.apache.nifi.components.ValidationResult;
    +import org.apache.nifi.components.Validator;
    +import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
    +import org.apache.nifi.processor.ProcessContext;
    +import org.apache.nifi.processor.ProcessorInitializationContext;
    +import org.apache.nifi.processor.Relationship;
    +import org.apache.nifi.processor.util.StandardValidators;
    +
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.List;
    +import java.util.Set;
    +
    +/**
    + * Defines common properties for MarkLogic processors.
    + */
    +public abstract class AbstractMarkLogicProcessor extends 
AbstractSessionFactoryProcessor {
    +
    +    protected List<PropertyDescriptor> properties;
    +    protected Set<Relationship> relationships;
    +
    +    // NiFi requires a validator for every property, even those that don't 
need any validation
    +    protected static Validator NO_VALIDATION_VALIDATOR = new Validator() {
    --- End diff --
    
    `Validator.VALID` does the same thing.


---

Reply via email to