Class YMLUtil
java.lang.Object
com.illumon.iris.db.v2.routing.impl.yaml.YMLUtil
Functions to help
DataRoutingServiceYmlImpl
parse yml files.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Boolean
getOptionalBoolean
(Map<?, Object> yml, String tag, String context) Convenience: cast the value of key to a Boolean, or throw aDataRoutingConfigurationException
.static String
getOptionalString
(Map<?, Object> yml, String tag, String context) Convenience: cast the value of key to a String, or throw aDataRoutingConfigurationException
.
-
Constructor Details
-
YMLUtil
public YMLUtil()
-
-
Method Details
-
getOptionalString
@Nullable public static String getOptionalString(@NotNull Map<?, Object> yml, @NotNull String tag, @NotNull String context) Convenience: cast the value of key to a String, or throw aDataRoutingConfigurationException
. Also callsreplaceTokens(Object)
on the value.- Parameters:
yml
- a yml maptag
- the key to getcontext
- string for context in the possible exception- Returns:
- a (possibly null) String value for the tag
-
getOptionalBoolean
@Nullable public static Boolean getOptionalBoolean(@NotNull Map<?, Object> yml, @NotNull String tag, @NotNull String context) Convenience: cast the value of key to a Boolean, or throw aDataRoutingConfigurationException
.- Parameters:
yml
- a yml maptag
- the key to getcontext
- optional string for context in the possible exception- Returns:
- a (possibly null) Boolean value for the tag
-