Class XFormVariableDescriptor


  • public final class XFormVariableDescriptor
    extends Object
    Wrapper for a variable JSON object from the form persist (designer.getPersist().variables). Contains several methods for accessing the data in a structured manner.
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • XFormVariableDescriptor

        public XFormVariableDescriptor​(com.alibaba.fastjson.JSONObject variableJson)
        Wraps a variable JSON object and provides additional methods for accessing the properties of the variable.
        Parameters:
        variableJson - Variable JSON object to wrap.
    • Method Detail

      • getAlias

        public String getAlias()
        Returns:
        The alias of the variable, which provides an alternative way to reference the variable. The getName() does not allow special characters.
      • getDefaultValue

        public String getDefaultValue()
        Returns:
        The default value for the variable when a new form record is created.
      • getId

        public String getId()
        Returns:
        A string with a unique ID of the variable. Usually this has the format xi-var-[number].
      • getIndex

        public long getIndex()
        Returns:
        The numerical (0-based) index of the variable.
      • getName

        public String getName()
        Returns:
        The name of the variable, which is also the name attribute of the hidden input field.
      • isServerOnly

        public boolean isServerOnly()
        Returns:
        Whether the variable is available only on the server.