Class ScanAttribute

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.ScanAttribute
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

@SideEffectFree @SupportsBatching @InputRequirement(INPUT_REQUIRED) @Tags({"scan","attributes","search","lookup","find","text"}) @CapabilityDescription("Scans the specified attributes of FlowFiles, checking to see if any of their values are present within the specified dictionary of terms") public class ScanAttribute extends org.apache.nifi.processor.AbstractProcessor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.nifi.components.PropertyDescriptor
     
    private Pattern
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    private Pattern
     
    private Set<String>
     
     
    static final String
     
    static final String
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    private static final List<org.apache.nifi.components.PropertyDescriptor>
     
    static final org.apache.nifi.processor.Relationship
     
    static final org.apache.nifi.processor.Relationship
     
    private static final Set<org.apache.nifi.processor.Relationship>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private boolean
    allMatch(org.apache.nifi.flowfile.FlowFile flowFile, Pattern attributePattern, Set<String> dictionary)
     
    private boolean
    anyMatch(org.apache.nifi.flowfile.FlowFile flowFile, Pattern attributePattern, Set<String> dictionary)
     
    private Set<String>
    createDictionary(org.apache.nifi.processor.ProcessContext context)
     
    Set<org.apache.nifi.processor.Relationship>
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
    onScheduled(org.apache.nifi.processor.ProcessContext context)
     
    void
    onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session)
     

    Methods inherited from class org.apache.nifi.processor.AbstractProcessor

    onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.processor.Processor

    isStateful, migrateProperties, migrateRelationships
  • Field Details

    • MATCH_CRITERIA_ALL

      public static final String MATCH_CRITERIA_ALL
      See Also:
    • MATCH_CRITERIA_ANY

      public static final String MATCH_CRITERIA_ANY
      See Also:
    • MATCHING_CRITERIA

      public static final org.apache.nifi.components.PropertyDescriptor MATCHING_CRITERIA
    • ATTRIBUTE_PATTERN

      public static final org.apache.nifi.components.PropertyDescriptor ATTRIBUTE_PATTERN
    • DICTIONARY_FILE

      public static final org.apache.nifi.components.PropertyDescriptor DICTIONARY_FILE
    • DICTIONARY_FILTER

      public static final org.apache.nifi.components.PropertyDescriptor DICTIONARY_FILTER
    • PROPERTY_DESCRIPTORS

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTY_DESCRIPTORS
    • REL_MATCHED

      public static final org.apache.nifi.processor.Relationship REL_MATCHED
    • REL_UNMATCHED

      public static final org.apache.nifi.processor.Relationship REL_UNMATCHED
    • RELATIONSHIPS

      private static final Set<org.apache.nifi.processor.Relationship> RELATIONSHIPS
    • dictionaryFilterPattern

      private volatile Pattern dictionaryFilterPattern
    • attributePattern

      private volatile Pattern attributePattern
    • dictionaryTerms

      private volatile Set<String> dictionaryTerms
    • fileWatcher

      private volatile SynchronousFileWatcher fileWatcher
  • Constructor Details

    • ScanAttribute

      public ScanAttribute()
  • Method Details

    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.apache.nifi.processor.AbstractSessionFactoryProcessor
    • onScheduled

      @OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) throws IOException
      Throws:
      IOException
    • createDictionary

      private Set<String> createDictionary(org.apache.nifi.processor.ProcessContext context) throws IOException
      Throws:
      IOException
    • onTrigger

      public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException
      Specified by:
      onTrigger in class org.apache.nifi.processor.AbstractProcessor
      Throws:
      org.apache.nifi.processor.exception.ProcessException
    • allMatch

      private boolean allMatch(org.apache.nifi.flowfile.FlowFile flowFile, Pattern attributePattern, Set<String> dictionary)
    • anyMatch

      private boolean anyMatch(org.apache.nifi.flowfile.FlowFile flowFile, Pattern attributePattern, Set<String> dictionary)