Class FormConfig
java.lang.Object
com.appiancorp.suiteapi.process.forms.FormConfig
- All Implemented Interfaces:
XMLable
,AppianTypeHolder
,Serializable
Bean representing the formconfig
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A Dynamic Form is Allowed.static final int
An Internal Form is Allowed.static final int
A JSP Form is Allowed.static final int
A Dynamic UI Form Expression is Allowed.static final int
Constant representing the capability of a form to be rendered in the Appian mobile UI.static final int
Constant representing the capability of a form to be rendered in the Appian web UI.static final int
There must be a form (absent form is not sufficient to be capable); otherwise, absent form is allowed for other types.static final int
Bitmask that controls if this form is mobile enabledstatic final int
Constant for dynamic formsstatic final int
Constant for internal formsstatic final int
Constant for jsp formsstatic final int
Constant for ui designer formsstatic final int
Bitmask that controls if in-line approval is allowed for the task.static final int
Bitmask that controls if the task attachments are hidden.static final int
Bitmask that controls if the task header is hidden.static final int
Bitmask that controls if the task save button is hidden.static final int
Bitmask that controls if the task toolbar is hidden.Fields inherited from interface com.appiancorp.suiteapi.common.XMLable
DEFAULT_BUFFER_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
fillInAppianTypes
(AppianTypeCache cache_) Fills in the appian types for the formstatic FormConfig
Creates a form from xmlstatic FormConfig
fromXML
(Node formNode, FormElement.InferFormElementCallback callback) Gets the dynamic formGets the bitmask which contains the informations on: which task sections are hidden in a task form. if in-line approval is allowed for the task in Tempo. if the task is mobile enabled (i.e. can this form be rendered in mobile devices?)Gets the internal formGets the jsp formint
getType()
Gets the form typeboolean
Gets whether the form has a StartFormboolean
See set method.boolean
Gets whether the form is mobile enabled.boolean
See set method.void
setDynamicForm
(DynamicForm dynamicForm_) Sets the dynamic formvoid
setEnabled
(boolean enabled_) Sets whether this form is enabled.void
setHiddenSections
(Integer hiddenSections) Sets the bitmask used to control the following: which task sections are hidden in a task form. if in-line approval is allowed for the task in Tempo. if the task is mobile enabled (i.e. can this form be rendered in mobile devices?)void
setInternalForm
(InternalForm internalForm_) Sets the internal formvoid
setJspForm
(JSPForm jspForm_) Sets the jsp formvoid
setType
(int type_) Sets the form typevoid
setUiExpressionForm
(UiExpressionForm uiExpressionForm) 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).toXML()
Converts the contained form to xmlvoid
toXML
(StringBuilder buffer_) Converts the contained form to xml
-
Field Details
-
FORM_TYPE_DYNAMIC
public static final int FORM_TYPE_DYNAMICConstant for dynamic forms- See Also:
-
FORM_TYPE_JSP
public static final int FORM_TYPE_JSPConstant for jsp forms- See Also:
-
FORM_TYPE_INTERNAL
public static final int FORM_TYPE_INTERNALConstant for internal forms- See Also:
-
FORM_TYPE_UI_EXPRESSION
public static final int FORM_TYPE_UI_EXPRESSIONConstant for ui designer forms- See Also:
-
CAPABILITY_RENDER_WEB
public static final int CAPABILITY_RENDER_WEBConstant 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_MOBILEConstant 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_DYNAMICA 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_JSPA 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_INTERNALAn 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_EXPRESSIONA 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_FORMThere 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_MASKBitmask 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_MASKBitmask that controls if the task toolbar is hidden.- See Also:
-
TASK_HEADER_MASK
public static final int TASK_HEADER_MASKBitmask that controls if the task header is hidden.- See Also:
-
TASK_ATTACHMENTS_MASK
public static final int TASK_ATTACHMENTS_MASKBitmask that controls if the task attachments are hidden.- See Also:
-
TASK_ALLOW_INLINE_APPROVAL
public static final int TASK_ALLOW_INLINE_APPROVALBitmask that controls if in-line approval is allowed for the task.- See Also:
-
FORM_IS_MOBILE_ENABLED
public static final int FORM_IS_MOBILE_ENABLEDBitmask that controls if this form is mobile enabled- See Also:
-
-
Constructor Details
-
FormConfig
public FormConfig()
-
-
Method Details
-
getUiExpressionForm
- Returns:
- expression to generate UI, if formType is FORM_TYPE_UI_EXPRESSION
-
setUiExpressionForm
- Parameters:
uiExpressionForm
- expression to generate UI, if formType is FORM_TYPE_UI_EXPRESSION
-
getDynamicForm
Gets the dynamic form- Returns:
- the
DynamicForm
-
setDynamicForm
Sets the dynamic form- Parameters:
dynamicForm_
- the dynamic form to set- See Also:
-
getInternalForm
Gets the internal form- Returns:
- the
InternalForm
-
setInternalForm
Sets the internal form- Parameters:
internalForm_
- the internal form to set- See Also:
-
getJspForm
Gets the jsp form- Returns:
- the
JSPForm
-
setJspForm
Sets the jsp form- Parameters:
jspForm_
- theJSPForm
to set
-
getType
public int getType()Gets the form type- Returns:
- the form type
FORM_TYPE_DYNAMIC
- DynamicFORM_TYPE_JSP
- JSPFORM_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
Converts the contained form to xml -
toXML
Converts the contained form to xml -
fromXML
Creates a form from xml- Parameters:
formNode
- the xml to create the form from- Returns:
- the created
FormConfig
-
fromXML
-
fillInAppianTypes
Fills in the appian types for the form- Specified by:
fillInAppianTypes
in interfaceAppianTypeHolder
- Parameters:
cache_
- cache of Appian-typed objects.
-
getHiddenSections
Gets the bitmask which contains the informations on:- which task sections are hidden in a task form.
- if in-line approval is allowed for the task in Tempo.
- if the task is mobile enabled (i.e. can this form be rendered in mobile devices?)
TASK_SAVE_BUTTON_MASK
,TASK_TOOLBAR_MASK
,TASK_HEADER_MASK
,TASK_ATTACHMENTS_MASK
,TASK_ALLOW_INLINE_APPROVAL
andFORM_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
- Returns:
- task display options bitmask
-
setHiddenSections
Sets the bitmask used to control the following:- which task sections are hidden in a task form.
- if in-line approval is allowed for the task in Tempo.
- if the task is mobile enabled (i.e. can this form be rendered in mobile devices?)
TASK_SAVE_BUTTON_MASK
,TASK_TOOLBAR_MASK
,TASK_HEADER_MASK
,TASK_ATTACHMENTS_MASK
,TASK_ALLOW_INLINE_APPROVAL
andFORM_IS_MOBILE_ENABLED
. To set/reset a bit (or bits) do the following:- To set a bit do bitwise OR with the appropriate bitmask, and
set the resulted value. For example, to set the bit corresponding to in-line approval for the task,
do the following before setting the value:
hiddenSections |= TASK_ALLOW_INLINE_APPROVAL
- To reset a bit do bitwise AND with NOT of the appropriate bitmask, and
set the resulted value. For example, to reset the bit corresponding to in-line approval for the task,
do the following before setting the value:
hiddenSections &= ~TASK_ALLOW_INLINE_APPROVAL
- Parameters:
hiddenSections
- task display options bitmask
-
hasStartForm
public boolean hasStartForm()Gets whether the form has a StartForm- Returns:
- true if the form has a StartForm, false otherwise.
-
isMobileEnabled
public boolean isMobileEnabled()Gets whether the form is mobile enabled.- Returns:
- true if the form is mobile enabled, false otherwise.
-