2 * Copyright © 2016-2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openecomp.sdc.be.datamodel.utils;
18 import com.fasterxml.jackson.core.JsonProcessingException;
19 import com.fasterxml.jackson.core.type.TypeReference;
20 import com.fasterxml.jackson.databind.ObjectMapper;
21 import fj.data.Either;
22 import java.io.IOException;
23 import java.util.ArrayList;
24 import java.util.Collection;
25 import java.util.HashMap;
26 import java.util.List;
28 import java.util.Objects;
29 import org.apache.commons.collections4.CollectionUtils;
30 import org.apache.commons.collections4.ListUtils;
31 import org.apache.commons.collections4.MapUtils;
32 import org.apache.commons.lang3.ArrayUtils;
33 import org.apache.commons.lang3.StringUtils;
34 import org.openecomp.sdc.be.components.impl.ResponseFormatManager;
35 import org.openecomp.sdc.be.dao.api.ActionStatus;
36 import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition;
37 import org.openecomp.sdc.be.datatypes.elements.SubPropertyToscaFunction;
38 import org.openecomp.sdc.be.model.ComponentInstanceInput;
39 import org.openecomp.sdc.be.model.DataTypeDefinition;
40 import org.openecomp.sdc.be.model.InputDefinition;
41 import org.openecomp.sdc.be.model.PropertyConstraint;
42 import org.openecomp.sdc.be.model.PropertyDefinition;
43 import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache;
44 import org.openecomp.sdc.be.model.tosca.ToscaPropertyType;
45 import org.openecomp.sdc.be.model.tosca.ToscaType;
46 import org.openecomp.sdc.be.model.tosca.constraints.ConstraintUtil;
47 import org.openecomp.sdc.be.model.tosca.constraints.LengthConstraint;
48 import org.openecomp.sdc.be.model.tosca.constraints.MaxLengthConstraint;
49 import org.openecomp.sdc.be.model.tosca.constraints.MinLengthConstraint;
50 import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintValueDoNotMatchPropertyTypeException;
51 import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintViolationException;
52 import org.openecomp.sdc.exception.ResponseFormat;
53 import org.slf4j.Logger;
54 import org.slf4j.LoggerFactory;
56 public class PropertyValueConstraintValidationUtil {
58 private static final String UNDERSCORE = "_";
59 private static final String VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY = "%nValue provided in invalid format for %s property";
60 private static final Logger logger = LoggerFactory.getLogger(PropertyValueConstraintValidationUtil.class);
61 private static final String IGNORE_PROPERTY_VALUE_START_WITH_INPUT = "{\"get_input\":";
62 private static final String IGNORE_PROPERTY_VALUE_START_WITH_PROPERTY = "{\"get_property\":";
63 private static final String IGNORE_PROPERTY_VALUE_START_WITH_ATTRIBUTE = "{\"get_attribute\":";
64 private static final String IGNORE_PROPERTY_VALUE_INPUT = "{get_input=";
65 private static final String IGNORE_PROPERTY_VALUE_PROPERTY = "{get_property=";
66 private static final String IGNORE_PROPERTY_VALUE_ATTRIBUTE = "{get_attribute=";
67 private Map<String, DataTypeDefinition> dataTypeDefinitionCache;
68 private final ObjectMapper objectMapper = new ObjectMapper();
69 private final List<String> errorMessages = new ArrayList<>();
70 private StringBuilder completePropertyName;
71 private String completeInputName;
73 public Either<Boolean, ResponseFormat> validatePropertyConstraints(final Collection<? extends PropertyDefinition> propertyDefinitionList,
74 final ApplicationDataTypeCache applicationDataTypeCache,
77 dataTypeDefinitionCache = applicationDataTypeCache.getAll(model).left().value();
78 CollectionUtils.emptyIfNull(propertyDefinitionList).stream()
79 .filter(this::isNonToscaFunctionValuePresent)
80 .forEach(this::evaluatePropertyTypeForConstraintValidation);
81 if (CollectionUtils.isNotEmpty(errorMessages)) {
82 final String errorMsgAsString = String.join(",", errorMessages);
83 logger.debug("Properties with Invalid Data: {}", errorMsgAsString);
84 return Either.right(getResponseFormatManager().getResponseFormat(ActionStatus.INVALID_PROPERTY_VALUES, errorMsgAsString));
86 return Either.left(Boolean.TRUE);
89 private boolean isNonToscaFunctionValuePresent(PropertyDefinition propertyDefinition) {
90 if (isValueAToscaFunction(propertyDefinition)) {
93 if (propertyDefinition instanceof ComponentInstanceInput) {
94 return StringUtils.isNotEmpty(propertyDefinition.getValue());
96 if (propertyDefinition instanceof InputDefinition) {
97 return StringUtils.isNotEmpty(propertyDefinition.getDefaultValue());
99 return StringUtils.isNotEmpty(propertyDefinition.getValue() != null ? propertyDefinition.getValue() : propertyDefinition.getDefaultValue());
102 private void evaluatePropertyTypeForConstraintValidation(PropertyDefinition propertyDefinition) {
103 if (propertyDefinition == null || propertyDefinition.getType() == null || !dataTypeDefinitionCache.containsKey(
104 propertyDefinition.getType())) {
105 errorMessages.add("\nUnsupported datatype found for property " + getCompletePropertyName(propertyDefinition));
108 completeInputName = "";
109 completePropertyName = new StringBuilder();
110 if (propertyDefinition instanceof ComponentInstanceInput) {
111 setCompletePropertyName(propertyDefinition);
112 evaluateComplexTypeProperties(propertyDefinition);
115 if (propertyDefinition instanceof InputDefinition) {
116 completeInputName = propertyDefinition.getName();
117 propertyDefinition = getPropertyDefinitionObjectFromInputs(propertyDefinition);
119 if (propertyDefinition != null) {
120 List<PropertyConstraint> propertyConstraints =
121 dataTypeDefinitionCache.get(propertyDefinition.getType()).safeGetConstraints();
122 if (ToscaType.isPrimitiveType(propertyDefinition.getType())) {
123 propertyDefinition.setConstraints(org.openecomp.sdc.be.dao.utils.CollectionUtils.merge(propertyDefinition.safeGetConstraints(),
124 propertyConstraints.isEmpty() ? new ArrayList<>() : propertyConstraints));
125 evaluateConstraintsOnProperty(propertyDefinition);
126 } else if (ToscaType.isCollectionType(propertyDefinition.getType())) {
127 propertyDefinition.setConstraints(org.openecomp.sdc.be.dao.utils.CollectionUtils.merge(propertyDefinition.safeGetConstraints(),
128 propertyConstraints.isEmpty() ? new ArrayList<>() : propertyConstraints));
129 evaluateConstraintsOnProperty(propertyDefinition);
130 evaluateCollectionTypeProperties(propertyDefinition);
132 setCompletePropertyName(propertyDefinition);
133 evaluateComplexTypeProperties(propertyDefinition);
138 private void setCompletePropertyName(PropertyDefinition propertyDefinition) {
139 if (StringUtils.isNotBlank(propertyDefinition.getUniqueId())) {
140 completePropertyName.append(propertyDefinition.getUniqueId().substring(propertyDefinition.getUniqueId().lastIndexOf('.') + 1));
144 private void evaluateConstraintsOnProperty(PropertyDefinition propertyDefinition) {
145 ToscaType toscaType = ToscaType.isValidType(propertyDefinition.getType());
146 if (!isValueAToscaFunction(propertyDefinition) && CollectionUtils.isNotEmpty(propertyDefinition.getConstraints())) {
147 for (PropertyConstraint propertyConstraint : propertyDefinition.getConstraints()) {
149 propertyConstraint.initialize(toscaType, propertyDefinition.getSchema());
150 propertyConstraint.validate(propertyDefinition);
151 } catch (ConstraintValueDoNotMatchPropertyTypeException | ConstraintViolationException exception) {
152 errorMessages.add(propertyConstraint.getErrorMessage(toscaType, exception, getCompletePropertyName(propertyDefinition)));
153 } catch (IllegalArgumentException ie) {
154 errorMessages.add(ie.getMessage());
157 } else if (!isValueAToscaFunction(propertyDefinition) && ToscaType.isPrimitiveType(propertyDefinition.getType())
158 && !propertyDefinition.isToscaFunction() && !toscaType.isValidValue(
159 propertyDefinition.getValue() != null ? propertyDefinition.getValue() : propertyDefinition.getDefaultValue())) {
160 errorMessages.add(String.format("Unsupported value provided for %s property supported value type is %s.",
161 getCompletePropertyName(propertyDefinition), toscaType.getType()));
165 private boolean isValueAToscaFunction(PropertyDefinition propertyDefinition) {
166 return (propertyDefinition.getToscaFunction() != null) || (propertyDefinition.getValue() != null
167 && ((propertyDefinition.getValue().startsWith(IGNORE_PROPERTY_VALUE_START_WITH_INPUT) || propertyDefinition.getValue().startsWith(IGNORE_PROPERTY_VALUE_START_WITH_PROPERTY)
168 || propertyDefinition.getValue().startsWith(IGNORE_PROPERTY_VALUE_START_WITH_ATTRIBUTE) || propertyDefinition.getValue().startsWith(IGNORE_PROPERTY_VALUE_ATTRIBUTE)
169 || propertyDefinition.getValue().startsWith(IGNORE_PROPERTY_VALUE_PROPERTY) || propertyDefinition.getValue().startsWith(IGNORE_PROPERTY_VALUE_INPUT))));
172 private void checkAndEvaluatePrimitiveProperty(PropertyDefinition propertyDefinition, DataTypeDefinition dataTypeDefinition) {
173 if (ToscaType.isPrimitiveType(dataTypeDefinition.getName()) && CollectionUtils.isNotEmpty(dataTypeDefinition.getConstraints())) {
174 PropertyDefinition definition = new PropertyDefinition();
175 definition.setValue(propertyDefinition.getValue());
176 definition.setType(dataTypeDefinition.getName());
177 definition.setConstraints(dataTypeDefinition.getConstraints());
178 evaluateConstraintsOnProperty(propertyDefinition);
182 private void evaluateComplexTypeProperties(PropertyDefinition propertyDefinition) {
183 List<PropertyDefinition> propertyDefinitions = dataTypeDefinitionCache.get(propertyDefinition.getType()).getProperties();
185 Map<String, Object> valueMap = MapUtils
186 .emptyIfNull(ConstraintUtil.parseToCollection(propertyDefinition.getValue(), new TypeReference<>() {
188 if (CollectionUtils.isEmpty(propertyDefinitions)) {
189 checkAndEvaluatePrimitiveProperty(propertyDefinition, dataTypeDefinitionCache.get(propertyDefinition.getType()));
191 ListUtils.emptyIfNull(propertyDefinitions).forEach(prop -> evaluateRegularComplexType(propertyDefinition, prop, valueMap));
193 } catch (ConstraintValueDoNotMatchPropertyTypeException e) {
194 logger.debug(e.getMessage(), e);
195 errorMessages.add(String.format(VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY, getCompletePropertyName(propertyDefinition)));
199 private void evaluateRegularComplexType(PropertyDefinition propertyDefinition, PropertyDefinition prop, Map<String, Object> valueMap) {
201 PropertyDefinition newPropertyWithValue;
202 if (valueMap.containsKey(prop.getName())) {
203 if (propertyDefinition.getSubPropertyToscaFunctions() != null) {
204 for (SubPropertyToscaFunction subPropertyToscaFunction : propertyDefinition.getSubPropertyToscaFunctions()) {
205 final List<String> path = subPropertyToscaFunction.getSubPropertyPath();
206 if (path.size() == 1 && path.get(0).equals(prop.getName())) {
209 if (path.size() > 1) {
210 if (path.get(0).equals(propertyDefinition.getToscaSubPath()) && path.get(1).equals(prop.getName())) {
216 if (ToscaType.isPrimitiveType(prop.getType())) {
217 newPropertyWithValue = copyPropertyWithNewValue(prop, String.valueOf(valueMap.get(prop.getName())), prop.getName());
218 if (isPropertyToEvaluate(newPropertyWithValue)) {
219 evaluateConstraintsOnProperty(newPropertyWithValue);
221 } else if (ToscaType.isCollectionType(prop.getType())) {
222 newPropertyWithValue =
223 copyPropertyWithNewValue(prop,
224 objectMapper.writeValueAsString(valueMap.get(prop.getName())), prop.getName());
225 if (isPropertyToEvaluate(newPropertyWithValue)) {
226 evaluateCollectionTypeProperties(newPropertyWithValue);
229 newPropertyWithValue =
230 copyPropertyWithNewValue(prop,
231 objectMapper.writeValueAsString(valueMap.get(prop.getName())), prop.getName());
232 if (isPropertyToEvaluate(newPropertyWithValue)) {
233 evaluateComplexTypeProperties(newPropertyWithValue);
237 } catch (IOException | ConstraintValueDoNotMatchPropertyTypeException e) {
238 logger.error(e.getMessage(), e);
239 errorMessages.add(String.format(VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY, getCompletePropertyName(propertyDefinition)));
243 private boolean isPropertyToEvaluate(PropertyDefinition propertyDefinition) throws ConstraintValueDoNotMatchPropertyTypeException {
244 if (Boolean.FALSE.equals(propertyDefinition.isRequired())) {
245 if (!ToscaType.isCollectionType(propertyDefinition.getType())) {
246 return StringUtils.isNotEmpty(propertyDefinition.getValue()) &&
247 !"null".equals(propertyDefinition.getValue());
248 } else if (ToscaType.LIST == ToscaType.isValidType(propertyDefinition.getType())) {
249 Collection<?> list = ConstraintUtil.parseToCollection(null != propertyDefinition.getValue() ?
250 propertyDefinition.getValue() : propertyDefinition.getDefaultValue(), new TypeReference<List<?>>() {
252 return CollectionUtils.isNotEmpty(list);
254 Map<String, Object> valueMap = MapUtils
255 .emptyIfNull(ConstraintUtil.parseToCollection(propertyDefinition.getValue(), new TypeReference<>() {
257 return MapUtils.isNotEmpty(valueMap);
264 private void evaluateCollectionTypeProperties(PropertyDefinition propertyDefinition) {
265 ToscaType toscaPropertyType = ToscaType.isValidType(propertyDefinition.getType());
267 if (isPropertyToEvaluate(propertyDefinition)) {
268 evaluateCollectionConstraints(propertyDefinition, toscaPropertyType);
270 } catch (ConstraintValueDoNotMatchPropertyTypeException e) {
271 logger.error(e.getMessage(), e);
272 errorMessages.add(String.format(VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY, getCompletePropertyName(propertyDefinition)));
274 if (ToscaType.LIST == toscaPropertyType) {
275 evaluateListType(propertyDefinition);
276 } else if (ToscaType.MAP == toscaPropertyType) {
277 evaluateMapType(propertyDefinition);
281 private void evaluateCollectionConstraints(PropertyDefinition propertyDefinition, ToscaType toscaPropertyType) {
282 List<PropertyConstraint> constraintsList = propertyDefinition.getConstraints();
284 if (CollectionUtils.isEmpty(constraintsList)) {
287 ToscaType toscaPropertyType1;
288 if (null == toscaPropertyType) {
289 toscaPropertyType1 = ToscaType.isValidType(propertyDefinition.getType());
291 toscaPropertyType1 = toscaPropertyType;
293 constraintsList.stream()
294 .filter(this::isACollectionConstraint)
295 .forEach(propertyConstraint -> {
297 if (ToscaType.LIST == toscaPropertyType1) {
298 Collection<Object> list = ConstraintUtil.parseToCollection(propertyDefinition.getValue(), new TypeReference<>() {
300 propertyConstraint.validate(list);
301 } else if (ToscaType.MAP == toscaPropertyType1) {
302 final Map<String, Object> map = ConstraintUtil.parseToCollection(propertyDefinition.getValue(), new TypeReference<>() {
304 propertyConstraint.validate(map);
306 } catch (ConstraintValueDoNotMatchPropertyTypeException | ConstraintViolationException exception) {
307 errorMessages.add("\n" + propertyConstraint.getErrorMessage(toscaPropertyType1, exception,
308 getCompletePropertyName(propertyDefinition)));
313 private boolean isACollectionConstraint(PropertyConstraint constraint) {
314 if (constraint instanceof MaxLengthConstraint) {
317 if (constraint instanceof MinLengthConstraint) {
320 return constraint instanceof LengthConstraint;
323 private void evaluateListType(PropertyDefinition propertyDefinition) {
325 if (propertyDefinition.getSchemaType() == null) {
326 propertyDefinition.setSchema(createStringSchema());
328 Collection<?> list = ConstraintUtil.parseToCollection(null != propertyDefinition.getValue() ?
329 propertyDefinition.getValue() : propertyDefinition.getDefaultValue(), new TypeReference<List<?>>() {});
330 final Map<String, Object> map = new HashMap<>();
332 for (Object obj : list) {
333 map.put(String.valueOf(index),obj);
336 evaluateCollectionType(propertyDefinition, map);
337 } catch (ConstraintValueDoNotMatchPropertyTypeException e) {
338 logger.debug(e.getMessage(), e);
339 errorMessages.add(String.format(VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY, getCompletePropertyName(propertyDefinition)));
343 private SchemaDefinition createStringSchema() {
344 final SchemaDefinition schemaDefinition = new SchemaDefinition();
345 final PropertyDefinition schemaStringProperty = new PropertyDefinition();
346 schemaStringProperty.setType(ToscaType.STRING.getType());
347 schemaDefinition.setProperty(schemaStringProperty);
348 return schemaDefinition;
351 private void evaluateMapType(final PropertyDefinition propertyDefinition) {
353 if (propertyDefinition.getSchemaType() == null) {
354 propertyDefinition.setSchema(createStringSchema());
356 final Map<String, Object> map = ConstraintUtil.parseToCollection(propertyDefinition.getValue(), new TypeReference<>() {
358 evaluateCollectionType(propertyDefinition, map);
359 } catch (ConstraintValueDoNotMatchPropertyTypeException e) {
360 logger.debug(e.getMessage(), e);
361 errorMessages.add(String.format(VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY, getCompletePropertyName(propertyDefinition)));
365 private void evaluateCollectionPrimitiveSchemaType(final PropertyDefinition propertyDefinition,
366 final String schemaType) throws JsonProcessingException {
367 if (propertyDefinition.getSchema() != null && propertyDefinition.getSchema().getProperty() instanceof PropertyDefinition) {
368 propertyDefinition.setConstraints(((PropertyDefinition) propertyDefinition.getSchema().getProperty()).getConstraints());
369 propertyDefinition.setValue(objectMapper.readValue(propertyDefinition.getValue(), String.class));
370 propertyDefinition.setType(schemaType);
371 evaluateConstraintsOnProperty(propertyDefinition);
375 private void evaluateCollectionType(final PropertyDefinition propertyDefinition, final Map<String, Object> valueMap) {
376 final String schemaType = propertyDefinition.getSchemaType();
377 for (String mapKey : valueMap.keySet()) {
378 final Object value = valueMap.get(mapKey);
380 final PropertyDefinition propertyCopyWithNewValue = copyPropertyWithNewValue(propertyDefinition,
381 objectMapper.writeValueAsString(value),mapKey);
382 propertyCopyWithNewValue.setToscaSubPath(mapKey);
383 if (!isValueAToscaFunction(propertyCopyWithNewValue)) {
384 if (ToscaType.isPrimitiveType(schemaType)) {
385 evaluateCollectionPrimitiveSchemaType(propertyCopyWithNewValue, schemaType);
386 } else if (ToscaType.isCollectionType(schemaType)) {
387 propertyCopyWithNewValue.setType(schemaType);
388 propertyCopyWithNewValue.setSchemaType(propertyDefinition.getSchemaProperty().getSchemaType());
389 evaluateCollectionTypeProperties(propertyCopyWithNewValue);
391 propertyCopyWithNewValue.setType(schemaType);
392 completePropertyName.append(UNDERSCORE);
393 completePropertyName.append(propertyCopyWithNewValue.getName());
394 evaluateComplexTypeProperties(propertyCopyWithNewValue);
397 } catch (final Exception e) {
398 logger.debug(e.getMessage(), e);
399 errorMessages.add(String.format(VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY, getCompletePropertyName(propertyDefinition)));
404 private String getCompletePropertyName(final PropertyDefinition propertyDefinition) {
405 if (StringUtils.isNotBlank(completeInputName)) {
406 return completeInputName;
409 final String propertyName = propertyDefinition == null ? "" : propertyDefinition.getName();
410 if (StringUtils.isNotBlank(completePropertyName)) {
411 return completePropertyName + UNDERSCORE + propertyName;
417 private PropertyDefinition copyPropertyWithNewValue(final PropertyDefinition propertyToCopy, final String value, final String key) {
418 final var propertyDefinition = new PropertyDefinition(propertyToCopy);
419 if (key != null && propertyToCopy.getSubPropertyToscaFunctions() != null) {
420 propertyToCopy.getSubPropertyToscaFunctions().forEach(subPropertyToscaFunction -> {
421 final List<String> subPropertyPath = subPropertyToscaFunction.getSubPropertyPath();
422 if (subPropertyPath.get((subPropertyPath.size() - 1)).equals(key)) {
423 propertyDefinition.setToscaFunction(subPropertyToscaFunction.getToscaFunction());
427 propertyDefinition.setValue(value);
428 return propertyDefinition;
431 private PropertyDefinition getPropertyDefinitionObjectFromInputs(PropertyDefinition property) {
432 InputDefinition inputDefinition = (InputDefinition) property;
433 PropertyDefinition propertyDefinition = null;
434 if (CollectionUtils.isEmpty(inputDefinition.getProperties()) || ToscaType.isPrimitiveType(inputDefinition.getProperties().get(0).getType())) {
435 propertyDefinition = new PropertyDefinition();
436 propertyDefinition.setType(inputDefinition.getType());
437 propertyDefinition.setValue(inputDefinition.getDefaultValue());
438 propertyDefinition.setName(inputDefinition.getName());
439 propertyDefinition.setConstraints(inputDefinition.getConstraints());
440 } else if (Objects.nonNull(inputDefinition.getInputPath())) {
441 propertyDefinition = evaluateComplexTypeInputs(inputDefinition);
442 propertyDefinition.setConstraints(inputDefinition.getConstraints());
444 return propertyDefinition;
447 private PropertyDefinition evaluateComplexTypeInputs(InputDefinition inputDefinition) {
448 Map<String, Object> inputMap = new HashMap<>();
449 PropertyDefinition propertyDefinition = new PropertyDefinition();
450 String[] inputPathArr = inputDefinition.getInputPath().split("#");
451 if (inputPathArr.length > 1) {
452 inputPathArr = ArrayUtils.remove(inputPathArr, 0);
455 Map<String, Object> presentMap = inputMap;
456 for (int i = 0; i < inputPathArr.length; i++) {
457 if (i == inputPathArr.length - 1) {
458 presentMap.computeIfAbsent(inputPathArr[i], k -> inputDefinition.getDefaultValue());
460 presentMap.computeIfAbsent(inputPathArr[i], k -> new HashMap<String, Object>());
461 presentMap = (Map<String, Object>) presentMap.get(inputPathArr[i]);
464 if (CollectionUtils.isNotEmpty(inputDefinition.getProperties())) {
465 propertyDefinition.setType(inputDefinition.getProperties().get(0).getType());
467 propertyDefinition.setName(inputDefinition.getName());
468 propertyDefinition.setValue(objectMapper.writeValueAsString(inputMap));
469 } catch (IOException e) {
470 logger.error(e.getMessage(), e);
471 errorMessages.add(String.format(VALUE_PROVIDED_IN_INVALID_FORMAT_FOR_PROPERTY, inputDefinition.getName()));
473 return propertyDefinition;
476 protected ResponseFormatManager getResponseFormatManager() {
477 return ResponseFormatManager.getInstance();