@Override
public Map<String, Validator> getEmbeddedValidations(String key) {
if (key.equals(EMBEDDED_EXTRACTORS)) {
final ImmutableMap.Builder<String, Validator> validations = ImmutableMap.builder();
validations.put(Extractor.FIELD_ID, new FilledStringValidator());
validations.put(Extractor.FIELD_TITLE, new FilledStringValidator());
validations.put(Extractor.FIELD_TYPE, new FilledStringValidator());
validations.put(Extractor.FIELD_CURSOR_STRATEGY, new FilledStringValidator());
validations.put(Extractor.FIELD_TARGET_FIELD, new FilledStringValidator());
validations.put(Extractor.FIELD_SOURCE_FIELD, new FilledStringValidator());
validations.put(Extractor.FIELD_CREATOR_USER_ID, new FilledStringValidator());
validations.put(Extractor.FIELD_EXTRACTOR_CONFIG, new MapValidator());
}
if (key.equals(EMBEDDED_STATIC_FIELDS)) {
return ImmutableMap.<String, Validator>of(
FIELD_STATIC_FIELD_KEY, new FilledStringValidator(),
FIELD_STATIC_FIELD_VALUE, new FilledStringValidator());
}
return Collections.emptyMap();
}