public class FormConfig extends java.lang.Object implements XMLable, AppianTypeHolder, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
CAPABILITY_ALLOW_TYPE_DYNAMIC
A Dynamic Form is Allowed.
|
static int |
CAPABILITY_ALLOW_TYPE_INTERNAL
An Internal Form is Allowed.
|
static int |
CAPABILITY_ALLOW_TYPE_JSP
A JSP Form is Allowed.
|
static int |
CAPABILITY_ALLOW_TYPE_UI_EXPRESSION
A Dynamic UI Form Expression is Allowed.
|
static int |
CAPABILITY_RENDER_MOBILE
Constant representing the capability of a form to be rendered in the Appian mobile
UI.
|
static int |
CAPABILITY_RENDER_WEB
Constant representing the capability of a form to be rendered in the Appian web UI.
|
static 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.
|
static int |
FORM_IS_MOBILE_ENABLED
Bitmask that controls if this form is mobile enabled
|
static int |
FORM_TYPE_DYNAMIC
Constant for dynamic forms
|
static int |
FORM_TYPE_INTERNAL
Constant for internal forms
|
static int |
FORM_TYPE_JSP
Constant for jsp forms
|
static int |
FORM_TYPE_UI_EXPRESSION
Constant for ui designer forms
|
static int |
TASK_ALLOW_INLINE_APPROVAL
Bitmask that controls if in-line approval is allowed for the task.
|
static int |
TASK_ATTACHMENTS_MASK
Bitmask that controls if the task attachments are hidden.
|
static int |
TASK_HEADER_MASK
Bitmask that controls if the task header is hidden.
|
static int |
TASK_SAVE_BUTTON_MASK
Bitmask that controls if the task save button is hidden.
|
static int |
TASK_TOOLBAR_MASK
Bitmask that controls if the task toolbar is hidden.
|
DEFAULT_BUFFER_SIZE
Constructor and Description |
---|
FormConfig() |
Modifier and Type | Method and Description |
---|---|
void |
fillInAppianTypes(AppianTypeCache cache_)
Fills in the appian types for the form
|
static FormConfig |
fromXML(org.w3c.dom.Node formNode)
Creates a form from xml
|
static FormConfig |
fromXML(org.w3c.dom.Node formNode,
FormElement.InferFormElementCallback callback) |
DynamicForm |
getDynamicForm()
Gets the dynamic form
|
java.lang.Integer |
getHiddenSections()
Gets the bitmask which contains the informations on:
which task sections are hidden in a task form.
|
InternalForm |
getInternalForm()
Gets the internal form
|
JSPForm |
getJspForm()
Gets the jsp form
|
int |
getType()
Gets the form type
|
UiExpressionForm |
getUiExpressionForm() |
boolean |
hasStartForm()
Gets whether the form has a StartForm
|
boolean |
isEnabled()
See set method.
|
boolean |
isMobileEnabled()
Gets whether the form is mobile enabled.
|
boolean |
isUseTextBundle()
See set method.
|
void |
setDynamicForm(DynamicForm dynamicForm_)
Sets the dynamic form
|
void |
setEnabled(boolean enabled_)
Sets whether this form is enabled.
|
void |
setHiddenSections(java.lang.Integer hiddenSections)
Sets the bitmask used to control the following:
which task sections are hidden in a task form.
|
void |
setInternalForm(InternalForm internalForm_)
Sets the internal form
|
void |
setJspForm(JSPForm jspForm_)
Sets the jsp form
|
void |
setType(int type_)
Sets the form type
|
void |
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).
|
java.lang.String |
toXML()
Converts the contained form to xml
|
void |
toXML(java.lang.StringBuilder buffer_)
Converts the contained form to xml
|
public static final int FORM_TYPE_DYNAMIC
public static final int FORM_TYPE_JSP
public static final int FORM_TYPE_INTERNAL
public static final int FORM_TYPE_UI_EXPRESSION
public static final int CAPABILITY_RENDER_WEB
public static final int CAPABILITY_RENDER_MOBILE
public static final int CAPABILITY_ALLOW_TYPE_DYNAMIC
public static final int CAPABILITY_ALLOW_TYPE_JSP
public static final int CAPABILITY_ALLOW_TYPE_INTERNAL
public static final int CAPABILITY_ALLOW_TYPE_UI_EXPRESSION
public static final int CAPABILITY_REQUIRE_FORM
public static final int TASK_SAVE_BUTTON_MASK
public static final int TASK_TOOLBAR_MASK
public static final int TASK_HEADER_MASK
public static final int TASK_ATTACHMENTS_MASK
public static final int TASK_ALLOW_INLINE_APPROVAL
public static final int FORM_IS_MOBILE_ENABLED
public UiExpressionForm getUiExpressionForm()
public void setUiExpressionForm(UiExpressionForm uiExpressionForm)
uiExpressionForm
- expression to generate UI, if formType is FORM_TYPE_UI_EXPRESSIONpublic DynamicForm getDynamicForm()
DynamicForm
public void setDynamicForm(DynamicForm dynamicForm_)
dynamicForm_
- the dynamic form to setgetDynamicForm()
public InternalForm getInternalForm()
InternalForm
public void setInternalForm(InternalForm internalForm_)
internalForm_
- the internal form to setgetInternalForm()
public JSPForm getJspForm()
JSPForm
public void setJspForm(JSPForm jspForm_)
jspForm_
- the JSPForm
to setpublic int getType()
FORM_TYPE_DYNAMIC
- Dynamic
FORM_TYPE_JSP
- JSP
FORM_TYPE_INTERNAL
- Internal (i.e. HTML/PDF)
FORM_TYPE_UI_EXPRESSION
- UI Designerpublic void setType(int type_)
type_
- the form type to setgetType()
public boolean isEnabled()
public void setEnabled(boolean enabled_)
enabled_
- The enabled_ status of the form.public boolean isUseTextBundle()
public void setUseTextBundle(boolean useTextBundle_)
useTextBundle_
- The useTextBundle to set.public java.lang.String toXML()
public void toXML(java.lang.StringBuilder buffer_)
public static FormConfig fromXML(org.w3c.dom.Node formNode)
formNode
- the xml to create the form fromFormConfig
public static FormConfig fromXML(org.w3c.dom.Node formNode, FormElement.InferFormElementCallback callback)
public void fillInAppianTypes(AppianTypeCache cache_)
fillInAppianTypes
in interface AppianTypeHolder
cache_
- cache of Appian-typed objects.public java.lang.Integer getHiddenSections()
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
public void setHiddenSections(java.lang.Integer hiddenSections)
TASK_SAVE_BUTTON_MASK
,
TASK_TOOLBAR_MASK
,TASK_HEADER_MASK
, TASK_ATTACHMENTS_MASK
,
TASK_ALLOW_INLINE_APPROVAL
and FORM_IS_MOBILE_ENABLED
.
To set/reset a bit (or bits) do the following:
hiddenSections |= TASK_ALLOW_INLINE_APPROVAL
hiddenSections &= ~TASK_ALLOW_INLINE_APPROVAL
hiddenSections
- task display options bitmaskpublic boolean hasStartForm()
public boolean isMobileEnabled()
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.