@Override public boolean validateValueForUpdate(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { for (AtlasClassificationType superType : superTypes) { ret = superType.validateValueForUpdate(obj, objName, messages) && ret; } ret = super.validateValueForUpdate(obj, objName, messages) && ret; } return ret; }
@Override public boolean validateValueForUpdate(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { for (AtlasClassificationType superType : superTypes) { ret = superType.validateValueForUpdate(obj, objName, messages) && ret; } ret = validateTimeBoundaries(obj, messages) && ret; ret = super.validateValueForUpdate(obj, objName, messages) && ret; } return ret; }
public void validateAndNormalizeForUpdate(AtlasClassification classification) throws AtlasBaseException { AtlasClassificationType type = typeRegistry.getClassificationTypeByName(classification.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.CLASSIFICATION_NOT_FOUND, classification.getTypeName()); } List<String> messages = new ArrayList<>(); type.validateValueForUpdate(classification, classification.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, messages); } type.getNormalizedValueForUpdate(classification); }
public void validateAndNormalizeForUpdate(AtlasClassification classification) throws AtlasBaseException { AtlasClassificationType type = typeRegistry.getClassificationTypeByName(classification.getTypeName()); if (type == null) { throw new AtlasBaseException(AtlasErrorCode.CLASSIFICATION_NOT_FOUND, classification.getTypeName()); } List<String> messages = new ArrayList<>(); type.validateValueForUpdate(classification, classification.getTypeName(), messages); if (!messages.isEmpty()) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, messages); } type.getNormalizedValueForUpdate(classification); } }