NIFI-4149 - fixed contrib-check errors

This commit is contained in:
Pierre Villard 2018-04-06 20:38:04 +02:00
parent 644133dc35
commit 7cc77937d8
2 changed files with 11 additions and 10 deletions

View File

@ -30,6 +30,7 @@ import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.Validator; import org.apache.nifi.components.Validator;
import org.apache.nifi.elasticsearch.ElasticSearchClientService; import org.apache.nifi.elasticsearch.ElasticSearchClientService;
import org.apache.nifi.elasticsearch.SearchResponse; import org.apache.nifi.elasticsearch.SearchResponse;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes; import org.apache.nifi.flowfile.attributes.CoreAttributes;
import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.AbstractProcessor;
@ -83,7 +84,7 @@ public class JsonQueryElasticsearch extends AbstractProcessor {
.displayName("Index") .displayName("Index")
.description("The name of the index to read from") .description("The name of the index to read from")
.required(true) .required(true)
.expressionLanguageSupported(true) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build(); .build();
@ -92,7 +93,7 @@ public class JsonQueryElasticsearch extends AbstractProcessor {
.displayName("Type") .displayName("Type")
.description("The type of this document (used by Elasticsearch for indexing and searching)") .description("The type of this document (used by Elasticsearch for indexing and searching)")
.required(false) .required(false)
.expressionLanguageSupported(true) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build(); .build();
@ -108,14 +109,14 @@ public class JsonQueryElasticsearch extends AbstractProcessor {
"\t}\n" + "\t}\n" +
"}") "}")
.required(false) .required(false)
.expressionLanguageSupported(true) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build(); .build();
public static final PropertyDescriptor QUERY_ATTRIBUTE = new PropertyDescriptor.Builder() public static final PropertyDescriptor QUERY_ATTRIBUTE = new PropertyDescriptor.Builder()
.name("el-query-attribute") .name("el-query-attribute")
.displayName("Query Attribute") .displayName("Query Attribute")
.description("If set, the executed query will be set on each result flowfile in the specified attribute.") .description("If set, the executed query will be set on each result flowfile in the specified attribute.")
.expressionLanguageSupported(true) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.addValidator(Validator.VALID) .addValidator(Validator.VALID)
.required(false) .required(false)
.build(); .build();
@ -138,7 +139,7 @@ public class JsonQueryElasticsearch extends AbstractProcessor {
.allowableValues(SPLIT_UP_HITS_NO, SPLIT_UP_YES) .allowableValues(SPLIT_UP_HITS_NO, SPLIT_UP_YES)
.defaultValue(SPLIT_UP_HITS_NO.getValue()) .defaultValue(SPLIT_UP_HITS_NO.getValue())
.required(true) .required(true)
.expressionLanguageSupported(false) .expressionLanguageSupported(ExpressionLanguageScope.NONE)
.build(); .build();
public static final PropertyDescriptor SPLIT_UP_AGGREGATIONS = new PropertyDescriptor.Builder() public static final PropertyDescriptor SPLIT_UP_AGGREGATIONS = new PropertyDescriptor.Builder()
.name("el-rest-split-up-aggregations") .name("el-rest-split-up-aggregations")
@ -147,7 +148,7 @@ public class JsonQueryElasticsearch extends AbstractProcessor {
.allowableValues(SPLIT_UP_HITS_NO, SPLIT_UP_YES) .allowableValues(SPLIT_UP_HITS_NO, SPLIT_UP_YES)
.defaultValue(SPLIT_UP_HITS_NO.getValue()) .defaultValue(SPLIT_UP_HITS_NO.getValue())
.required(true) .required(true)
.expressionLanguageSupported(false) .expressionLanguageSupported(ExpressionLanguageScope.NONE)
.build(); .build();
public static final PropertyDescriptor CLIENT_SERVICE = new PropertyDescriptor.Builder() public static final PropertyDescriptor CLIENT_SERVICE = new PropertyDescriptor.Builder()

View File

@ -97,7 +97,7 @@ public class ConvertExcelToCSVProcessor
" is left blank then all of the sheets will be extracted from the Excel document. The list of names is case in-sensitive. Any sheets not " + " is left blank then all of the sheets will be extracted from the Excel document. The list of names is case in-sensitive. Any sheets not " +
"specified in this value will be ignored.") "specified in this value will be ignored.")
.required(false) .required(false)
.expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build(); .build();
@ -109,7 +109,7 @@ public class ConvertExcelToCSVProcessor
+ "Empty rows of data anywhere in the spreadsheet will always be skipped, no matter what this value is set to.") + "Empty rows of data anywhere in the spreadsheet will always be skipped, no matter what this value is set to.")
.required(true) .required(true)
.defaultValue("0") .defaultValue("0")
.expressionLanguageSupported(true) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR) .addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
.build(); .build();
@ -119,7 +119,7 @@ public class ConvertExcelToCSVProcessor
.description("Comma delimited list of column numbers to skip. Use the columns number and not the letter designation. " .description("Comma delimited list of column numbers to skip. Use the columns number and not the letter designation. "
+ "Use this to skip over columns anywhere in your worksheet that you don't want extracted as part of the record.") + "Use this to skip over columns anywhere in your worksheet that you don't want extracted as part of the record.")
.required(false) .required(false)
.expressionLanguageSupported(true) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build(); .build();
@ -629,4 +629,4 @@ public class ConvertExcelToCSVProcessor
this.styles = styles; this.styles = styles;
} }
} }
} }