amend FIXME to IMPL.refa because it's too much efford for now
This commit is contained in:
parent
6c30109bad
commit
d7b7d91392
@ -42,7 +42,7 @@ public class HsBookingItemEntityValidator extends HsEntityValidator<HsBookingIte
|
|||||||
).filter(Objects::nonNull).toList();
|
).filter(Objects::nonNull).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: convert into generic shape like multi-options validator
|
// TODO.refa: convert into generic shape like multi-options validator
|
||||||
private static String validateMaxTotalValue(
|
private static String validateMaxTotalValue(
|
||||||
final HsBookingItemEntity bookingItem,
|
final HsBookingItemEntity bookingItem,
|
||||||
final ValidatableProperty<?> propDef) {
|
final ValidatableProperty<?> propDef) {
|
||||||
|
@ -22,7 +22,7 @@ public abstract class HsEntityValidator<E> {
|
|||||||
|
|
||||||
protected static List<String> enrich(final String prefix, final List<String> messages) {
|
protected static List<String> enrich(final String prefix, final List<String> messages) {
|
||||||
return messages.stream()
|
return messages.stream()
|
||||||
// FIXME: this is a bit hacky, I need to find the right place to add the prefix
|
// TODO:refa: this is a bit hacky, I need to find the right place to add the prefix
|
||||||
.map(message -> message.startsWith("'") ? message : ("'" + prefix + "." + message))
|
.map(message -> message.startsWith("'") ? message : ("'" + prefix + "." + message))
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
@ -52,12 +52,6 @@ public abstract class HsEntityValidator<E> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<String> validateParentEntities(final HsBookingItemEntity bookingItem) {
|
|
||||||
return bookingItem.getParentItem() != null ?
|
|
||||||
HsBookingItemEntityValidatorRegistry.doValidate(bookingItem.getParentItem()) :
|
|
||||||
emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@SafeVarargs
|
@SafeVarargs
|
||||||
protected static List<String> sequentiallyValidate(final Supplier<List<String>>... validators) {
|
protected static List<String> sequentiallyValidate(final Supplier<List<String>>... validators) {
|
||||||
return new ArrayList<>(stream(validators)
|
return new ArrayList<>(stream(validators)
|
||||||
|
Loading…
Reference in New Issue
Block a user