@Test(expected = SuperCsvConstraintViolationException.class) public void testForbidden2() { String input = "I love Microsoft"; processor.execute(input, ANONYMOUS_CSVCONTEXT); }
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( String forbidden : forbiddenSubStrings ) { if( stringValue.contains(forbidden) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' contains the forbidden substring '%s'", value, forbidden), context, this); } } return next.execute(value, context); }
ForbidSubStr extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( String forbidden : forbiddenSubStrings ) { if( stringValue.contains(forbidden) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' contains the forbidden substring '%s'", value, forbidden), context, this); } } return next.execute(value, context); } }
ForbidSubStr extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( String forbidden : forbiddenSubStrings ) { if( stringValue.contains(forbidden) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' contains the forbidden substring '%s'", value, forbidden), context, this); } } return next.execute(value, context); } ForbidSubStr(final List<String> forbiddenSubStrings);  ForbidSubStr(final String... forbiddenSubStrings);  ForbidSubStr(final List<String> forbiddenSubStrings, final CellProcessor next);  ForbidSubStr(final String forbiddenSubString, final CellProcessor next);  ForbidSubStr(final String[] forbiddenSubStrings, final CellProcessor next); }
ForbidSubStr extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( String forbidden : forbiddenSubStrings ) { if( stringValue.contains(forbidden) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' contains the forbidden substring '%s'", value, forbidden), context, this); } } return next.execute(value, context); } ForbidSubStr(final List<String> forbiddenSubStrings);  ForbidSubStr(final String... forbiddenSubStrings);  ForbidSubStr(final List<String> forbiddenSubStrings, final CellProcessor next);  ForbidSubStr(final String forbiddenSubString, final CellProcessor next);  ForbidSubStr(final String[] forbiddenSubStrings, final CellProcessor next); Object execute(final Object value, final CsvContext context); }
ForbidSubStr extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); for( String forbidden : forbiddenSubStrings ) { if( stringValue.contains(forbidden) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' contains the forbidden substring '%s'", value, forbidden), context, this); } } return next.execute(value, context); } ForbidSubStr(final List<String> forbiddenSubStrings);  ForbidSubStr(final String... forbiddenSubStrings);  ForbidSubStr(final List<String> forbiddenSubStrings, final CellProcessor next);  ForbidSubStr(final String forbiddenSubString, final CellProcessor next);  ForbidSubStr(final String[] forbiddenSubStrings, final CellProcessor next); Object execute(final Object value, final CsvContext context);  }