Class FormPayloadHelper
java.lang.Object
com.flowable.platform.common.form.FormPayloadHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanareValuesEqual(Object variableValue, Object originalValue) protected static ObjectconvertToContentItem(Object value, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static StringcreateBEExpression(String... variableNameParts) getFormDataModelListVariable(String submittedKey, FormDataModel formDataModel, List<Map<String, Object>> variables, Map<String, Object> originalPayload, Map<String, List<FormVariable>> variableTypes, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<FormVariable> dataModelVariableTypes) protected static ObjectgetFormDataModelVariable(String submittedKey, FormDataModel formDataModel, Map<String, Object> dataModelValues, Map<String, Object> originalDataModelValues, Map<String, List<FormVariable>> variableTypes, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<FormVariable> dataModelVariableTypes) protected static List<FormVariable>getFormVariables(String submittedKey, String childKey, Map<String, List<FormVariable>> variableTypes) static Map<String,List<ExtensionElement>> getPlanItemExtensionElements(String caseDefinitionId, String planItemDefinitionId) static StringgetStartFormKey(Map<String, List<ExtensionElement>> extensionElements) protected static FormVariablegetVariableToApply(List<FormVariable> variableTypes) Get the first prioritized variable type from the variableTypes if exists, or the first variable type from the listprotected static booleanisListOfType(Object value, Class<?> listElementClass) static booleanisStartFormSameDeployment(Map<String, List<ExtensionElement>> extensionElements) protected static voidparseChildFormVariableList(List<Object> variableList, List<String> parentVariableList, Map<String, Object> originalPayload, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static voidparseChildFormVariableMap(Map<String, Object> variableMap, List<String> parentVariableList, Map<String, Object> originalPayload, com.fasterxml.jackson.databind.ObjectMapper objectMapper) parseFormVariables(Map<String, Object> submittedValues, Map<String, Object> originalPayload, FlowableFormModel formModel, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static List<ContentItem>retrieveContentItems(CoreContentService contentService, Set<String> contentItemIdSet, Map<String, Map<String, Object>> metadataMap) protected static booleanprotected static booleanprotected static booleanskipVariable(String variableName, String childName, Object variableValue, Map<String, Object> originalPayload) protected static booleanskipVariable(List<String> parentVariableNames, String childName, Object variableValue, Map<String, Object> originalPayload) protected static BooleantransformAsBoolean(Object value) protected static ObjecttransformAsDate(Object value) protected static NumbertransformAsNumber(Object value, String subType) protected static ObjecttransformAsPotentialJsonNode(Object value, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static ObjecttransformVariable(Object submittedValue, List<FormVariable> variableTypes, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static voidtraverseVariableListForContentItems(List<Map<String, Object>> valuesList, Set<String> contentItemIdSet, Map<String, Map<String, Object>> metadataMap) protected static voidtraverseVariableMapForContentItems(Map<String, Object> mapValue, Set<String> contentItemIdSet, Map<String, Map<String, Object>> metadataMap) protected static booleantreatValueAsDataObject(Map<?, ?> value, FormDataModel formDataModel) validatePayload(Map<String, Object> submittedValues, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Field Details
-
BASE_EXPRESSION_KEYS
-
FE_EXPRESSION_END
- See Also:
-
FE_EXPRESSION_START
- See Also:
-
EXPRESSION_VARIABLE_DELIMITER
- See Also:
-
PRIORITIZED_VARIABLE_TYPES
-
FLOWABLE_VARIABLE_TYPE_KEY
- See Also:
-
FLOWABLE_DATA_OBJECT_VARIABLE_TYPE
- See Also:
-
FLOWABLE_DETACHED_DATA_OBJECT_VARIABLE_TYPE
- See Also:
-
-
Constructor Details
-
FormPayloadHelper
public FormPayloadHelper()
-
-
Method Details
-
validatePayload
-
parseFormVariables
-
treatValueAsDataObject
-
parseChildFormVariableMap
-
parseChildFormVariableList
-
getFormDataModelListVariable
protected static List<Object> getFormDataModelListVariable(String submittedKey, FormDataModel formDataModel, List<Map<String, Object>> variables, Map<String, Object> originalPayload, Map<String, List<FormVariable>> variableTypes, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<FormVariable> dataModelVariableTypes) -
getFormDataModelVariable
protected static Object getFormDataModelVariable(String submittedKey, FormDataModel formDataModel, Map<String, Object> dataModelValues, Map<String, Object> originalDataModelValues, Map<String, List<FormVariable>> variableTypes, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<FormVariable> dataModelVariableTypes) -
getPlanItemExtensionElements
-
getStartFormKey
-
isStartFormSameDeployment
public static boolean isStartFormSameDeployment(Map<String, List<ExtensionElement>> extensionElements) -
createBEExpression
-
convertToContentItem
-
traverseVariableListForContentItems
-
traverseVariableMapForContentItems
-
retrieveContentItems
protected static List<ContentItem> retrieveContentItems(CoreContentService contentService, Set<String> contentItemIdSet, Map<String, Map<String, Object>> metadataMap) -
skipVariable
-
skipVariable
-
skipVariable
-
skipVariable
-
areValuesEqual
-
getFormVariables
protected static List<FormVariable> getFormVariables(String submittedKey, String childKey, Map<String, List<FormVariable>> variableTypes) -
transformVariable
protected static Object transformVariable(Object submittedValue, List<FormVariable> variableTypes, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
transformAsPotentialJsonNode
-
getVariableToApply
Get the first prioritized variable type from the variableTypes if exists, or the first variable type from the list- Parameters:
variableTypes- list of variables- Returns:
- variable which is applied on the value
-
transformAsBoolean
-
transformAsDate
-
transformAsNumber
-
isListOfType
-