本文整理汇总了Java中org.apache.nifi.processor.util.StandardValidators类的典型用法代码示例。如果您正苦于以下问题:Java StandardValidators类的具体用法?Java StandardValidators怎么用?Java StandardValidators使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StandardValidators类属于org.apache.nifi.processor.util包,在下文中一共展示了StandardValidators类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.name(propertyDescriptorName)
.description("Sets the environment variable '" + propertyDescriptorName + "' for the process' environment")
.dynamic(true)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
}
示例2: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
/**
*
*/
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.description("Specifies the value for '" + propertyDescriptorName
+ "' property to be set on the provided ConnectionFactory implementation.")
.name(propertyDescriptorName).addValidator(StandardValidators.NON_EMPTY_VALIDATOR).dynamic(true)
.build();
}
示例3: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
PropertyDescriptor.Builder propertyBuilder = new PropertyDescriptor.Builder()
.name(propertyDescriptorName)
.required(false)
.addValidator(StandardValidators.ATTRIBUTE_KEY_PROPERTY_NAME_VALIDATOR)
.addValidator(StandardValidators.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.STRING, true))
.expressionLanguageSupported(true)
.dynamic(true);
return propertyBuilder
.build();
}
示例4: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.name(propertyDescriptorName)
.description("Sets the environment variable '" + propertyDescriptorName + "' for the process' environment")
.dynamic(true)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
}
示例5: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
public PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) {
if (propertyDescriptorName.startsWith(PATTERN_PROPERTY_PREFIX)) {
return new PropertyDescriptor
.Builder().name(propertyDescriptorName)
.description(PATTERN_PROPERTY_PREFIX_DESC)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(true)
.dynamic(true)
.sensitive(false)
.build();
}
return null;
}
示例6: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder().name(propertyDescriptorName).required(false)
.addValidator(StandardValidators
.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.STRING, true))
.addValidator(StandardValidators.ATTRIBUTE_KEY_PROPERTY_NAME_VALIDATOR)
.expressionLanguageSupported(true).dynamic(true).build();
}
示例7: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.name(propertyDescriptorName)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(true)
.required(false)
.dynamic(true)
.build();
}
示例8: customValidate
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected Collection<ValidationResult> customValidate(final ValidationContext validationContext) {
List<ValidationResult> results = new ArrayList<>();
if (validationContext.getProperty(INSERT_COMMAND_SOURCE).getValue().equals("attribute")) {
results.add(StandardValidators.NON_BLANK_VALIDATOR.validate(
INSERT_COMMAND_ATTRIBUTE.getName(),
validationContext.getProperty(INSERT_COMMAND_ATTRIBUTE).getValue(),
validationContext));
}
return results;
}
示例9: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.description("Specifies the value for '" + propertyDescriptorName + "' in the Accumulo configuration.")
.name(propertyDescriptorName)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.dynamic(true)
.build();
}
示例10: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(
final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.name(propertyDescriptorName)
.description(
"Adds a query parameter with name '"
+ propertyDescriptorName
+ "' to the Twitter query").required(false)
.dynamic(true)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
}
示例11: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.name(propertyDescriptorName)
.required(false)
.addValidator(StandardValidators.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.STRING, true))
.addValidator(StandardValidators.ATTRIBUTE_KEY_PROPERTY_NAME_VALIDATOR)
.expressionLanguageSupported(true)
.dynamic(true)
.build();
}
示例12: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.required(false)
.name(propertyDescriptorName)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.dynamic(true)
.expressionLanguageSupported(true)
.build();
}
示例13: getSupportedDynamicPropertyDescriptor
import org.apache.nifi.processor.util.StandardValidators; //导入依赖的package包/类
/**
* Returns a PropertyDescriptor for the given name. This is for the user to be able to define their own properties
* which will be available as variables in the script
*
* @param propertyDescriptorName used to lookup if any property descriptors exist for that name
* @return a PropertyDescriptor object corresponding to the specified dynamic property name
*/
@Override
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
return new PropertyDescriptor.Builder()
.name(propertyDescriptorName)
.required(false)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(true)
.dynamic(true)
.build();
}