Package org.solidcoding.validation.api
Interface VoidValidator
-
public interface VoidValidator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidorElseLogError(org.slf4j.Logger logger)Users SLF4J API to log the internal failMessage at Error level.voidorElseLogInfo(org.slf4j.Logger logger)Users SLF4J API to log the internal failMessage at Info level.voidorElseLogWarn(org.slf4j.Logger logger)Users SLF4J API to log the internal failMessage at Warning level.<E extends RuntimeException>
VoidorElseThrow(Function<String,E> throwableFunction)
-
-
-
Method Detail
-
orElseThrow
<E extends RuntimeException> Void orElseThrow(Function<String,E> throwableFunction)
- Type Parameters:
E- the bound of the Exception that needs to be thrown when a rule is broken.- Parameters:
throwableFunction- the function defining the Exception that needs to be thrown when a rule is broken. The String is the stored failure message of the validation.
-
orElseLogInfo
void orElseLogInfo(org.slf4j.Logger logger)
Users SLF4J API to log the internal failMessage at Info level.- Parameters:
logger- the logger used to log the message.
-
orElseLogWarn
void orElseLogWarn(org.slf4j.Logger logger)
Users SLF4J API to log the internal failMessage at Warning level.- Parameters:
logger- the logger used to log the message.
-
orElseLogError
void orElseLogError(org.slf4j.Logger logger)
Users SLF4J API to log the internal failMessage at Error level.- Parameters:
logger- the logger used to log the message.
-
-