Class LoaderSupport
java.lang.Object
io.jmix.flowui.xml.layout.support.LoaderSupport
Facilitates parsing data from XML.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadBoolean(org.dom4j.Element element, String attributeName) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.voidloadBoolean(org.dom4j.Element element, String attributeName, Consumer<Boolean> setter) loadDouble(org.dom4j.Element element, String attributeName) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.voidloadDouble(org.dom4j.Element element, String attributeName, Consumer<Double> setter) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.<T extends Enum<T>>
voidloadInteger(org.dom4j.Element element, String attributeName) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.voidloadInteger(org.dom4j.Element element, String attributeName, Consumer<Integer> setter) protected StringloadResourceString(String message, String messageGroup) loadResourceString(org.dom4j.Element element, String attributeName, String messageGroup) Returns anOptionalwith the localized message defined in the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.loadResourceString(org.dom4j.Element element, String attributeName, String messageGroup, boolean emptyToNull) Returns anOptionalwith the localized message defined in the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.voidloadResourceString(org.dom4j.Element element, String attributeName, String messageGroup, Consumer<String> setter) loadString(org.dom4j.Element element, String attributeName) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.loadString(org.dom4j.Element element, String attributeName, boolean emptyToNull) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.voidloadString(org.dom4j.Element element, String attributeName, Consumer<String> setter)
-
Field Details
-
messageTools
-
-
Constructor Details
-
LoaderSupport
-
-
Method Details
-
loadString
Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional. Also returns an emptyOptionalif the attribute value is the empty string. -
loadString
public Optional<String> loadString(org.dom4j.Element element, String attributeName, boolean emptyToNull) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.- Parameters:
element- the element to obtain valueattributeName- the name of the attribute value to be returnedemptyToNull- whether to return an emptyOptionalfor empty string- Returns:
- an
Optionalwith a presentStringvalue if the specified attribute exists in the element, otherwise an emptyOptional
-
loadBoolean
Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional. -
loadInteger
Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional. -
loadDouble
Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional. -
loadEnum
public <T extends Enum<T>> Optional<T> loadEnum(org.dom4j.Element element, Class<T> type, String attributeName) Returns anOptionalwith the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional. -
loadResourceString
public Optional<String> loadResourceString(org.dom4j.Element element, String attributeName, String messageGroup) Returns anOptionalwith the localized message defined in the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional. Also returns an emptyOptionalif the attribute value is the empty string. -
loadResourceString
public Optional<String> loadResourceString(org.dom4j.Element element, String attributeName, String messageGroup, boolean emptyToNull) Returns anOptionalwith the localized message defined in the attribute value from the given element for the attribute with the given name, otherwise an emptyOptional.- Parameters:
element- the element to obtain valueattributeName- the name of the attribute value to be returnedmessageGroup- message group to useemptyToNull- whether to return an emptyOptionalfor empty string- Returns:
- an
Optionalwith a present localizedStringvalue if the specified attribute exists in the element, otherwise an emptyOptional
-
loadString
-
loadBoolean
-
loadInteger
-
loadDouble
-
loadEnum
-
loadResourceString
-
loadResourceString
-