Class PreviewModel

  • All Implemented Interfaces:
    Serializable

    public final class PreviewModel
    extends Object
    implements Serializable
    POJO model for the state of the form preview within the designer.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • PreviewModel

        public PreviewModel​(String stateName,
                            String userGroupName)
        Creates a new POJO with the given initial data.
        Parameters:
        stateName - Value returned by getStateName().
        userGroupName - Value returned by getUserGroupName().
    • Method Detail

      • getStateName

        public String getStateName()
        Returns:
        The name of the state for which to render the preview. Different states may result in different form elements being visible. No state when empty.
      • getUserGroupName

        public String getUserGroupName()
        Returns:
        The name of the user group for which to render the preview. Different user groups may see different form elements. No user group when empty.
      • isShowDebugTools

        public boolean isShowDebugTools()
        Returns:
        Whether the debug tools are shown initially when the preview is opened.
      • setShowDebugTools

        public void setShowDebugTools​(boolean showDebugTools)
        Parameters:
        showDebugTools - Whether the debug tools are shown initially when the preview is opened.
      • setStateName

        public void setStateName​(String stateName)
        Parameters:
        stateName - The name of the state for which to render the preview. Different states may result in different form elements being visible. No state when empty.
      • setUserGroupName

        public void setUserGroupName​(String userGroupName)
        Parameters:
        userGroupName - The name of the user group for which to render the preview. Different user groups may see different form elements. No user group when empty.
      • empty

        public static PreviewModel empty()
        Returns:
        A new empty preview model with no state and no user group.