Class FormPayloadHelper
java.lang.Object
com.flowable.platform.common.form.FormPayloadHelper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
areValuesEqual
(Object variableValue, Object originalValue) protected static Object
convertToContentItem
(Object value, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static String
createBEExpression
(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 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) 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 String
getStartFormKey
(Map<String, List<ExtensionElement>> extensionElements) protected static FormVariable
getVariableToApply
(List<FormVariable> variableTypes) Get the first prioritized variable type from the variableTypes if exists, or the first variable type from the listprotected static boolean
isListOfType
(Object value, Class<?> listElementClass) static boolean
isStartFormSameDeployment
(Map<String, List<ExtensionElement>> extensionElements) protected static void
parseChildFormVariableList
(List<Object> variableList, List<String> parentVariableList, Map<String, Object> originalPayload, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static void
parseChildFormVariableMap
(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 boolean
protected static boolean
protected static boolean
skipVariable
(String variableName, String childName, Object variableValue, Map<String, Object> originalPayload) protected static boolean
skipVariable
(List<String> parentVariableNames, String childName, Object variableValue, Map<String, Object> originalPayload) protected static Boolean
transformAsBoolean
(Object value) protected static Object
transformAsDate
(Object value) protected static Number
transformAsNumber
(Object value, String subType) protected static Object
transformAsPotentialJsonNode
(Object value, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static Object
transformVariable
(Object submittedValue, List<FormVariable> variableTypes, com.fasterxml.jackson.databind.ObjectMapper objectMapper) protected static void
traverseVariableListForContentItems
(List<Map<String, Object>> valuesList, Set<String> contentItemIdSet, Map<String, Map<String, Object>> metadataMap) protected static void
traverseVariableMapForContentItems
(Map<String, Object> mapValue, Set<String> contentItemIdSet, Map<String, Map<String, Object>> metadataMap) protected static boolean
treatValueAsDataObject
(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
-