com.netgrif.application.engine.importer.service.DataValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.importer.service;
import com.netgrif.application.engine.importer.model.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class DataValidator implements IDataValidator {
@Override
public void checkDeprecatedAttributes(Data data) {
validateAttribute(data.getView(), "view", data.getId());
validateAttribute(data.getValid() != null && !data.getValid().isEmpty() ? data.getValid() : null, "valid", data.getId());
validateAttribute(data.getFormat(), "format", data.getId());
validateAttribute(data.getValues() != null && !data.getValues().isEmpty() ? data.getValues() : null, "values", data.getId());
}
protected void validateAttribute(Object attr, String attrName, String fieldName) {
if (attr != null) {
log.warn("Data attribute [" + attrName + "] on field [" + fieldName + "] is deprecated.");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy