Class DataObjectOperations
java.lang.Object
com.flowable.dataobject.engine.impl.runtime.datasource.DataObjectOperations
- Author:
- Filip Hrisafov
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ServiceRegistryDataObjectModel
asServiceRegistryDataObjectModel
(DataObjectModel dataObjectModel) protected BpmnError
createBpmnError
(String code, String message, RestServiceInvocationResponse response, String tenantId) createDataObjectInstance
(Map<String, Object> data, Object lookupIdValue, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel, String tenantId) createDetachedDataObjectInstance
(com.fasterxml.jackson.databind.node.ObjectNode data, String lookupIdValue, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel, String tenantId) int
delete
(DataObjectInstanceVariableContainer entity, DataObjectModel dataObjectModel) int
delete
(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) fieldsAsSet
(Iterable<String> fields) protected Map<String,
ServiceRegistryFieldMapping> getFieldMappingsByName
(ServiceRegistryDataObjectModel objectModel) getLookupId
(Map<String, Object> data, DataObjectDefinition dataObjectDefinition, DataObjectModel objectModel) protected String
protected PlatformEngineConfigurationApi
getServiceDefinitionModel
(DataObjectDefinition dataObjectDefinition, DataObjectModel objectModel) protected ServiceRegistryEngineConfigurationApi
protected ServiceRegistryRepositoryService
protected ServiceRegistryRuntimeService
int
insert
(DataObjectInstanceVariableContainer entity, DataObjectModel dataObjectModel) insert
(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) protected ServiceInvocationResultResponse
invokeServiceAndGetResult
(DataObjectInstanceVariableContainer entity, ServiceRegistryDataObjectModel objectModel, String operationKey, String operationType, String tenantId, Map<String, ServiceRegistryFieldMapping> fieldMappingsByName, boolean logMissingProperties) protected <R> R
invokeServiceAndGetResult
(String operation, String operationType, Map<String, Object> serviceData, String tenantId, ServiceRegistryDataObjectModel registryDataObjectModel, Function<ServiceInvocationBuilder, R> builderInvocationFunction) protected Object
parseInputValue
(com.fasterxml.jackson.databind.node.ArrayNode values, String tenantId) protected Object
parseInputValue
(com.fasterxml.jackson.databind.node.ObjectNode value, String tenantId) parseInputValue
(Object value, String tenantId) protected Object
parseInputValue
(List<Object> values, String tenantId) protected Object
parseInputValue
(Map<String, Object> value, String tenantId) protected Object
parseValue
(com.fasterxml.jackson.databind.JsonNode value) protected Object
parseValue
(ServiceRegistryFieldMapping fieldMapping, Object value, DataObjectInstanceVariableContainer entity) protected Object
parseValue
(Object value) protected Boolean
parseValueAsBoolean
(Object value) protected Object
parseValueAsDataObject
(ServiceRegistryFieldMapping fieldMapping, Object value, String tenantId) protected Date
parseValueAsDate
(Object value, DataObjectInstanceVariableContainer entity) protected Double
parseValueAsDouble
(Object value) protected Integer
parseValueAsInteger
(Object value) protected com.fasterxml.jackson.databind.JsonNode
parseValueAsJson
(Object value, DataObjectInstanceVariableContainer entity) protected LocalDate
parseValueAsLocalDate
(Object value, DataObjectInstanceVariableContainer entity) protected Long
parseValueAsLong
(Object value) protected String
parseValueAsText
(Object value) protected List<DataObjectInstanceVariableContainer>
parseValuesAsListOfDataObjects
(Object value, DataObjectDefinition definition, ServiceRegistryDataObjectModel model) protected DataObjectInstanceVariableContainer
parseValuesAsSingleDataObject
(Object value, DataObjectDefinition definition, ServiceRegistryDataObjectModel model) selectById
(String id, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) selectList
(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) selectSingle
(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) protected DataObjectInstanceVariableContainer
toDataObjectInstanceVariableContainer
(ServiceInvocationResultResponse invocationResult, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel registryDataObjectModel) protected boolean
treatInputValueAsDataObject
(com.fasterxml.jackson.databind.JsonNode value) protected boolean
treatInputValueAsDataObject
(Map<?, ?> value) int
update
(DataObjectInstanceVariableContainer entity, DataObjectModel dataObjectModel) update
(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) protected void
updateValuesInEntity
(DataObjectInstanceVariableContainer entity, ServiceInvocationResultResponse invocationResult, List<ServiceRegistryFieldMapping> fieldMappings) protected void
updateValuesInEntity
(DataObjectInstanceVariableContainer entity, Predicate<String> hasValueCheck, Function<String, Object> valueProvider, List<ServiceRegistryFieldMapping> fieldMappings)
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
DEFINITION_ID_REPRESENTATION_KEY
- See Also:
-
DEFINITION_KEY_REPRESENTATION_KEY
- See Also:
-
FLOWABLE_VARIABLE_TYPE_KEY
- See Also:
-
FLOWABLE_DATA_OBJECT_MODEL_KEY
- See Also:
-
FLOWABLE_DATA_OBJECT_VARIABLE_TYPE
- See Also:
-
FLOWABLE_DETACHED_DATA_OBJECT_VARIABLE_TYPE
- See Also:
-
-
Constructor Details
-
DataObjectOperations
public DataObjectOperations()
-
-
Method Details
-
getServiceDefinitionModel
public ServiceDefinitionModel getServiceDefinitionModel(DataObjectDefinition dataObjectDefinition, DataObjectModel objectModel) -
getLookupId
public Object getLookupId(Map<String, Object> data, DataObjectDefinition dataObjectDefinition, DataObjectModel objectModel) -
getLookupIdName
-
selectById
public DataObjectInstanceVariableContainer selectById(String id, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) -
selectSingle
public DataObjectInstanceVariableContainer selectSingle(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) -
toDataObjectInstanceVariableContainer
protected DataObjectInstanceVariableContainer toDataObjectInstanceVariableContainer(ServiceInvocationResultResponse invocationResult, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel registryDataObjectModel) -
selectList
public List<DataObjectInstanceVariableContainer> selectList(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) -
insert
public DataObjectInstanceVariableContainer insert(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) -
insert
-
update
public DataObjectInstanceVariableContainer update(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) -
update
-
delete
public int delete(String operation, Map<String, Object> serviceData, DataObjectDefinition dataObjectDefinition, DataObjectModel dataObjectModel) -
delete
-
parseInputValue
-
parseInputValue
-
parseInputValue
-
parseInputValue
-
parseInputValue
-
treatInputValueAsDataObject
-
treatInputValueAsDataObject
protected boolean treatInputValueAsDataObject(com.fasterxml.jackson.databind.JsonNode value) -
asServiceRegistryDataObjectModel
protected ServiceRegistryDataObjectModel asServiceRegistryDataObjectModel(DataObjectModel dataObjectModel) -
getFieldMappingsByName
protected Map<String,ServiceRegistryFieldMapping> getFieldMappingsByName(ServiceRegistryDataObjectModel objectModel) -
invokeServiceAndGetResult
protected ServiceInvocationResultResponse invokeServiceAndGetResult(DataObjectInstanceVariableContainer entity, ServiceRegistryDataObjectModel objectModel, String operationKey, String operationType, String tenantId, Map<String, ServiceRegistryFieldMapping> fieldMappingsByName, boolean logMissingProperties) -
invokeServiceAndGetResult
protected <R> R invokeServiceAndGetResult(String operation, String operationType, Map<String, Object> serviceData, String tenantId, ServiceRegistryDataObjectModel registryDataObjectModel, Function<ServiceInvocationBuilder, R> builderInvocationFunction) -
updateValuesInEntity
protected void updateValuesInEntity(DataObjectInstanceVariableContainer entity, ServiceInvocationResultResponse invocationResult, List<ServiceRegistryFieldMapping> fieldMappings) -
updateValuesInEntity
protected void updateValuesInEntity(DataObjectInstanceVariableContainer entity, Predicate<String> hasValueCheck, Function<String, Object> valueProvider, List<ServiceRegistryFieldMapping> fieldMappings) -
fieldsAsSet
-
parseValue
protected Object parseValue(ServiceRegistryFieldMapping fieldMapping, Object value, DataObjectInstanceVariableContainer entity) -
parseValueAsText
-
parseValueAsBoolean
-
parseValueAsDouble
-
parseValueAsInteger
-
parseValueAsLong
-
parseValueAsDate
-
parseValueAsLocalDate
-
parseValueAsJson
protected com.fasterxml.jackson.databind.JsonNode parseValueAsJson(Object value, DataObjectInstanceVariableContainer entity) -
parseValueAsDataObject
protected Object parseValueAsDataObject(ServiceRegistryFieldMapping fieldMapping, Object value, String tenantId) -
parseValuesAsListOfDataObjects
protected List<DataObjectInstanceVariableContainer> parseValuesAsListOfDataObjects(Object value, DataObjectDefinition definition, ServiceRegistryDataObjectModel model) -
parseValuesAsSingleDataObject
protected DataObjectInstanceVariableContainer parseValuesAsSingleDataObject(Object value, DataObjectDefinition definition, ServiceRegistryDataObjectModel model) -
parseValue
-
parseValue
-
getServiceRegistryConfigurationApi
-
getPlatformEngineConfigurationApi
-
getServiceRegistryRuntimeService
-
getServiceRegistryRepositoryService
-
createBpmnError
protected BpmnError createBpmnError(String code, String message, RestServiceInvocationResponse response, String tenantId) -
createDataObjectInstance
public DataObjectInstanceVariableContainer createDataObjectInstance(Map<String, Object> data, Object lookupIdValue, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel, String tenantId) -
createDetachedDataObjectInstance
public DetachedDataObjectInstanceVariableContainer createDetachedDataObjectInstance(com.fasterxml.jackson.databind.node.ObjectNode data, String lookupIdValue, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel, String tenantId)
-