import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintFunctionalException;
import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintViolationException;
import org.openecomp.sdc.be.model.tosca.constraints.exception.PropertyConstraintException;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+@AllArgsConstructor
+@NoArgsConstructor
public class LengthConstraint extends AbstractPropertyConstraint {
@NotNull
@Override
public ConstraintType getConstraintType() {
- return null;
+ return ConstraintType.LENGTH;
}
@Override
@Override
public String getErrorMessage(ToscaType toscaType, ConstraintFunctionalException e, String propertyName) {
- return getErrorMessage(toscaType, e, propertyName, "%s length must be %s", String.valueOf(length));
+ return getErrorMessage(toscaType, e, propertyName, "%s length must be [%s]", String.valueOf(length));
}
}