Package nz.org.riskscape.engine.bind
Interface ParamProblems
- All Superinterfaces:
ProblemFactory
-
Method Summary
Modifier and TypeMethodDescriptionapplyingDefault
(String paramName, Object defaultValue) No '' value was provided, using default value of ' ' static ParamProblems
get()
A parameter was given, but it was ignored.ignoredWithHints
(Set<String> keys, Set<String> available) A parameter was given, but it was ignored.invalidFor
(Object thing) Use when the parameters for a given object are invalid, e.g.mutuallyExclusive
(String paramA, String paramB) '' and ' ' cannot both be specified at the same time noBindingAvailable
(Class<?> from, Class<?> to) There was no binder available to bindfrom
->to
.noBindingAvailableForParameter
(Parameter parameter, Class<?> from, Class<?> to) As above, but with a parameter for contextstatic Problem
oneOfTheseRequired
(String... paramNames) Convenience wrapper foroneOfTheseRequired(List)
(because Arrays don't render very nicely in error messages).oneOfTheseRequired
(List<String> paramNames) Return this when there are a set of optional parameters, but at least one of them is requiredwrongNumberGiven
(String paramName, String expected, int given)
-
Method Details
-
get
-
applyingDefault
No '
' value was provided, using default value of ' ' -
mutuallyExclusive
'
' and ' ' cannot both be specified at the same time -
wrongNumberGiven
-
oneOfTheseRequired
Return this when there are a set of optional parameters, but at least one of them is required
-
oneOfTheseRequired
Convenience wrapper for
oneOfTheseRequired(List)
(because Arrays don't render very nicely in error messages). -
invalidFor
Use when the parameters for a given object are invalid, e.g. produces a message like: here was a problem with the parameters for
-
ignored
A parameter was given, but it was ignored.
-
ignoredWithHints
A parameter was given, but it was ignored.
-
noBindingAvailable
There was no binder available to bind
from
->to
. This is not usually an error a user can do anything about, but this problem is here to i18n the exception -
noBindingAvailableForParameter
As above, but with a parameter for context
-