Class LoaderSupport

java.lang.Object
io.jmix.ui.xml.layout.LoaderSupport

@Component("ui_LoaderSupport") public class LoaderSupport extends Object
Facilitates parsing data from XML.
  • Constructor Details

    • LoaderSupport

      public LoaderSupport()
  • Method Details

    • loadString

      public Optional<String> loadString(org.dom4j.Element element, String attributeName)
      Returns an Optional with the attribute value from the given element for the attribute with the given name, otherwise an empty Optional.
      Parameters:
      element - the element to obtain value
      attributeName - the name of the attribute value to be returned
      Returns:
      an Optional with a present String value if the specified attribute exists in the element, otherwise an empty Optional
    • loadBoolean

      public Optional<Boolean> loadBoolean(org.dom4j.Element element, String attributeName)
      Returns an Optional with the attribute value from the given element for the attribute with the given name, otherwise an empty Optional.
      Parameters:
      element - the element to obtain value
      attributeName - the name of the attribute value to be returned
      Returns:
      an Optional with a present Boolean value if the specified attribute exists in the element, otherwise an empty Optional
    • loadInteger

      public Optional<Integer> loadInteger(org.dom4j.Element element, String attributeName)
      Returns an Optional with the attribute value from the given element for the attribute with the given name, otherwise an empty Optional.
      Parameters:
      element - the element to obtain value
      attributeName - the name of the attribute value to be returned
      Returns:
      an Optional with a present Integer value if the specified attribute exists in the element, otherwise an empty Optional
    • loadEnum

      public <T extends Enum<T>> Optional<T> loadEnum(org.dom4j.Element element, Class<T> type, String attributeName)
      Returns an Optional with the attribute value from the given element for the attribute with the given name, otherwise an empty Optional.
      Parameters:
      element - the element to obtain value
      type - the enum type to be converted to
      attributeName - the name of the attribute value to be returned
      Returns:
      an Optional with a present Enum value if the specified attribute exists in the element, otherwise an empty Optional