@Test public void testMapperFieldValue_noPostValue() { MapFieldValueDescriptorImpl mapFieldValueDescriptor = new MapFieldValueDescriptorImpl(); MapperFieldValue mapperFieldValue = new MapperFieldValue(); assertFalse("Was not able to initialize!", mapperFieldValue.init(null, null, "someField", null, mapFieldValueDescriptor)); }
@Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); prevValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPreValue(); newValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPostValue();; if (StringUtils.isEmpty(newValue)) { logger.fatal("Map field value is empty."); return false; } return true; }
MapperFieldValue extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); prevValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPreValue(); newValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPostValue();; if (StringUtils.isEmpty(newValue)) { logger.fatal("Map field value is empty."); return false; } return true; } }
MapperFieldValue extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); prevValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPreValue(); newValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPostValue();; if (StringUtils.isEmpty(newValue)) { logger.fatal("Map field value is empty."); return false; } return true; }  }
MapperFieldValue extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); prevValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPreValue(); newValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPostValue();; if (StringUtils.isEmpty(newValue)) { logger.fatal("Map field value is empty."); return false; } return true; }  @Override boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor); @Override Object apply(Map<String, Object> jsonObj, Object value); }
MapperFieldValue extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); prevValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPreValue(); newValue = ((MapFieldValueDescriptor)mapFieldDescriptor).getPostValue();; if (StringUtils.isEmpty(newValue)) { logger.fatal("Map field value is empty."); return false; } return true; }  @Override boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor); @Override Object apply(Map<String, Object> jsonObj, Object value);  }