@Test public void test_match_noPatterns() { assertFalse(processor.match(Collections.emptyList(), "")); assertFalse(processor.match(Collections.emptyList(), "ABC")); assertFalse(processor.match(null, "ABC")); assertFalse(processor.match(Collections.emptyList(), null)); }
protected boolean match(final List<Pattern> matchPatterns, String fieldName) { boolean match = false; if (fieldName != null && matchPatterns != null && !matchPatterns.isEmpty()) { for (Pattern p : matchPatterns) { final Matcher matcher = p.matcher(fieldName); if (matcher.matches()) { match = true; break; } } } return match; }
AbstractExtractToAttributesProcessor extends AbstractProcessor { protected boolean match(final List<Pattern> matchPatterns, String fieldName) { boolean match = false; if (fieldName != null && matchPatterns != null && !matchPatterns.isEmpty()) { for (Pattern p : matchPatterns) { final Matcher matcher = p.matcher(fieldName); if (matcher.matches()) { match = true; break; } } } return match; } }
AbstractExtractToAttributesProcessor extends AbstractProcessor { protected boolean match(final List<Pattern> matchPatterns, String fieldName) { boolean match = false; if (fieldName != null && matchPatterns != null && !matchPatterns.isEmpty()) { for (Pattern p : matchPatterns) { final Matcher matcher = p.matcher(fieldName); if (matcher.matches()) { match = true; break; } } } return match; }  }
AbstractExtractToAttributesProcessor extends AbstractProcessor { protected boolean match(final List<Pattern> matchPatterns, String fieldName) { boolean match = false; if (fieldName != null && matchPatterns != null && !matchPatterns.isEmpty()) { for (Pattern p : matchPatterns) { final Matcher matcher = p.matcher(fieldName); if (matcher.matches()) { match = true; break; } } } return match; }  @Override Set<Relationship> getRelationships(); @OnScheduled void onScheduled(final ProcessContext context); @Override void onTrigger(ProcessContext context, ProcessSession session); }
AbstractExtractToAttributesProcessor extends AbstractProcessor { protected boolean match(final List<Pattern> matchPatterns, String fieldName) { boolean match = false; if (fieldName != null && matchPatterns != null && !matchPatterns.isEmpty()) { for (Pattern p : matchPatterns) { final Matcher matcher = p.matcher(fieldName); if (matcher.matches()) { match = true; break; } } } return match; }  @Override Set<Relationship> getRelationships(); @OnScheduled void onScheduled(final ProcessContext context); @Override void onTrigger(ProcessContext context, ProcessSession session); static final Relationship REL_SUCCESS; static final Relationship REL_FAILURE; }