Class FormVariable

  • All Implemented Interfaces:
    Serializable

    public final class FormVariable
    extends Object
    implements Serializable
    Models a form variable that can be created in the form designer.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • FormVariable

        public FormVariable​(String name,
                            String alias,
                            boolean serverSide)
        Parameters:
        name - Value returned by getName()
        alias - Value returned by getAlias()
        serverSide - Value returned by {@link #isServerSide())}
    • Method Detail

      • getAlias

        public String getAlias()
        Returns:
        The alias of the variable.
      • getName

        public String getName()
        Returns:
        The name of the variable.
      • isServerSide

        public boolean isServerSide()
        Returns:
        Whether the variable is available only on the server.
      • fromPersistJson

        public static FormVariable fromPersistJson​(com.alibaba.fastjson.JSONObject variable)
        Converts the JSON representation from the form designer to a form variable model.
        Parameters:
        variable - JSON object from the form designer persist representing one variable.
        Returns:
        The given variable converted to a FormVariable.
      • fromPersistJsonArray

        public static List<FormVariable> fromPersistJsonArray​(com.alibaba.fastjson.JSONArray variables)
        Converts the JSON representation from the form designer to a form variable model.
        Parameters:
        variables - JSON array from the form designer persist.
        Returns:
        The given variables converted to FormVariables.