Class FormConfig

java.lang.Object
com.appiancorp.suiteapi.process.forms.FormConfig
All Implemented Interfaces:
XMLable, AppianTypeHolder, Serializable

public class FormConfig extends Object implements XMLable, AppianTypeHolder, Serializable
Bean representing the formconfig
See Also:
  • Field Details

    • FORM_TYPE_DYNAMIC

      public static final int FORM_TYPE_DYNAMIC
      Constant for dynamic forms
      See Also:
    • FORM_TYPE_JSP

      public static final int FORM_TYPE_JSP
      Constant for jsp forms
      See Also:
    • FORM_TYPE_INTERNAL

      public static final int FORM_TYPE_INTERNAL
      Constant for internal forms
      See Also:
    • FORM_TYPE_UI_EXPRESSION

      public static final int FORM_TYPE_UI_EXPRESSION
      Constant for ui designer forms
      See Also:
    • CAPABILITY_RENDER_WEB

      public static final int CAPABILITY_RENDER_WEB
      Constant representing the capability of a form to be rendered in the Appian web UI.
      See Also:
    • CAPABILITY_RENDER_MOBILE

      public static final int CAPABILITY_RENDER_MOBILE
      Constant representing the capability of a form to be rendered in the Appian mobile UI.
      See Also:
    • CAPABILITY_ALLOW_TYPE_DYNAMIC

      public static final int CAPABILITY_ALLOW_TYPE_DYNAMIC
      A Dynamic Form is Allowed. Only devices capable of displaying this should include this capability.
      See Also:
    • CAPABILITY_ALLOW_TYPE_JSP

      public static final int CAPABILITY_ALLOW_TYPE_JSP
      A JSP Form is Allowed. Only devices capable of displaying this should include this capability.
      See Also:
    • CAPABILITY_ALLOW_TYPE_INTERNAL

      public static final int CAPABILITY_ALLOW_TYPE_INTERNAL
      An Internal Form is Allowed. Only devices capable of displaying this should include this capability.
      See Also:
    • CAPABILITY_ALLOW_TYPE_UI_EXPRESSION

      public static final int CAPABILITY_ALLOW_TYPE_UI_EXPRESSION
      A Dynamic UI Form Expression is Allowed. Only devices capable of displaying this should include this capability.
      See Also:
    • CAPABILITY_REQUIRE_FORM

      public static final int CAPABILITY_REQUIRE_FORM
      There must be a form (absent form is not sufficient to be capable); otherwise, absent form is allowed for other types.
      See Also:
    • TASK_SAVE_BUTTON_MASK

      public static final int TASK_SAVE_BUTTON_MASK
      Bitmask that controls if the task save button is hidden. Currently shares the same bitmask as the task toolbar mask
      See Also:
    • TASK_TOOLBAR_MASK

      public static final int TASK_TOOLBAR_MASK
      Bitmask that controls if the task toolbar is hidden.
      See Also:
    • TASK_HEADER_MASK

      public static final int TASK_HEADER_MASK
      Bitmask that controls if the task header is hidden.
      See Also:
    • TASK_ATTACHMENTS_MASK

      public static final int TASK_ATTACHMENTS_MASK
      Bitmask that controls if the task attachments are hidden.
      See Also:
    • TASK_ALLOW_INLINE_APPROVAL

      public static final int TASK_ALLOW_INLINE_APPROVAL
      Bitmask that controls if in-line approval is allowed for the task.
      See Also:
    • FORM_IS_MOBILE_ENABLED

      public static final int FORM_IS_MOBILE_ENABLED
      Bitmask that controls if this form is mobile enabled
      See Also:
  • Constructor Details

    • FormConfig

      public FormConfig()
  • Method Details

    • getUiExpressionForm

      public UiExpressionForm getUiExpressionForm()
      Returns:
      expression to generate UI, if formType is FORM_TYPE_UI_EXPRESSION
    • setUiExpressionForm

      public void setUiExpressionForm(UiExpressionForm uiExpressionForm)
      Parameters:
      uiExpressionForm - expression to generate UI, if formType is FORM_TYPE_UI_EXPRESSION
    • getDynamicForm

      public DynamicForm getDynamicForm()
      Gets the dynamic form
      Returns:
      the DynamicForm
    • setDynamicForm

      public void setDynamicForm(DynamicForm dynamicForm_)
      Sets the dynamic form
      Parameters:
      dynamicForm_ - the dynamic form to set
      See Also:
    • getInternalForm

      public InternalForm getInternalForm()
      Gets the internal form
      Returns:
      the InternalForm
    • setInternalForm

      public void setInternalForm(InternalForm internalForm_)
      Sets the internal form
      Parameters:
      internalForm_ - the internal form to set
      See Also:
    • getJspForm

      public JSPForm getJspForm()
      Gets the jsp form
      Returns:
      the JSPForm
    • setJspForm

      public void setJspForm(JSPForm jspForm_)
      Sets the jsp form
      Parameters:
      jspForm_ - the JSPForm to set
    • getType

      public int getType()
      Gets the form type
      Returns:
      the form type FORM_TYPE_DYNAMIC - Dynamic FORM_TYPE_JSP - JSP FORM_TYPE_INTERNAL - Internal (i.e. HTML/PDF) FORM_TYPE_UI_EXPRESSION - UI Designer
    • setType

      public void setType(int type_)
      Sets the form type
      Parameters:
      type_ - the form type to set
      See Also:
    • isEnabled

      public boolean isEnabled()
      See set method.
      Returns:
      Returns the enabled flag.
    • setEnabled

      public void setEnabled(boolean enabled_)
      Sets whether this form is enabled. Forms, part of a Form Config Map, can be enabled/disabled at design time for a particular Locale.
      Parameters:
      enabled_ - The enabled_ status of the form.
    • isUseTextBundle

      public boolean isUseTextBundle()
      See set method.
      Returns:
      Returns the useTextBundle.
    • setUseTextBundle

      public void setUseTextBundle(boolean useTextBundle_)
      Sets if the form-element labels will be retrieved from a resource bundle when loaded at administration time (i.e. when the xml that defines the activity is loaded during the application server startup).
      Parameters:
      useTextBundle_ - The useTextBundle to set.
    • toXML

      public String toXML()
      Converts the contained form to xml
      Specified by:
      toXML in interface XMLable
      Returns:
      the xml representation of the form
    • toXML

      public void toXML(StringBuilder buffer_)
      Converts the contained form to xml
      Specified by:
      toXML in interface XMLable
      Parameters:
      buffer_ - the buffer to store the xml representation of the form
    • fromXML

      public static FormConfig fromXML(Node formNode)
      Creates a form from xml
      Parameters:
      formNode - the xml to create the form from
      Returns:
      the created FormConfig
    • fromXML

      public static FormConfig fromXML(Node formNode, FormElement.InferFormElementCallback callback)
    • fillInAppianTypes

      public void fillInAppianTypes(AppianTypeCache cache_)
      Fills in the appian types for the form
      Specified by:
      fillInAppianTypes in interface AppianTypeHolder
      Parameters:
      cache_ - cache of Appian-typed objects.
    • getHiddenSections

      public Integer getHiddenSections()
      Gets the bitmask which contains the informations on:
      1. which task sections are hidden in a task form.
      2. if in-line approval is allowed for the task in Tempo.
      3. if the task is mobile enabled (i.e. can this form be rendered in mobile devices?)
      Bits in hiddenSections are represented by the bitmasks - TASK_SAVE_BUTTON_MASK, TASK_TOOLBAR_MASK, TASK_HEADER_MASK, TASK_ATTACHMENTS_MASK, TASK_ALLOW_INLINE_APPROVAL and FORM_IS_MOBILE_ENABLED. To extract the boolean flag corresponding to a bit (or bits) in hiddenSections do bitwise AND with the appropriate bitmask and then compare it with that bitmask. For example, to know if in-line task approval is allowed for the task do the following:
      (hiddenSections & TASK_ALLOW_INLINE_APPROVAL) == TASK_ALLOW_INLINE_APPROVAL