Class DbServiceInvoker
java.lang.Object
com.flowable.serviceregistry.engine.impl.invoker.db.DbServiceInvoker
- All Implemented Interfaces:
ServiceInvoker
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final int
protected ServiceRegistryEngineConfiguration
-
Constructor Summary
ConstructorDescriptionDbServiceInvoker
(ServiceRegistryEngineConfiguration serviceRegistryEngineConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<String>
asCollectionOfStrings
(Object object, ServiceInvocationVariablesContainer variablesContainer) protected DbColumnMapping
asDbColumnMapping
(ColumnMapping columnMapping) protected int
asInt
(Object object, int valueIfNull, ServiceInvocationVariablesContainer variablesContainer) protected QueryParameter
asQueryParameter
(QueryColumnMapping queryColumn, ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, ServiceInvocationVariablesContainer variablesContainer, Object value) protected String
protected Map<String,
List<DbColumnMapping>> columnsByName
(ServiceDefinitionModel model, DBServiceOperationConfig config, Function<DBServiceOperationConfig, Collection<DbColumnMapping>> columnsProvider) protected JoinTableConfig
createJoinTableConfig
(ColumnMapping columnMapping, String tenantId, String owningTableName, ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, long id) protected List<JoinTableConfig>
createJoinTableConfigs
(ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, DBServiceOperationConfig operationConfig, String tenantId) protected List<JoinTableConfig>
createJoinTableConfigs
(ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, BiPredicate<String, ColumnMapping> shouldUseMappingRelation, String tenantId) createSafeInValuesList
(Collection<String> values) protected Collection<com.flowable.serviceregistry.engine.impl.invoker.db.WhereClauseComponent>
createWhereClause
(ServiceInvocationVariablesContainer variableContainer, ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, DBServiceOperationConfig operationConfig) protected Collection<String>
extractAccessibleByGroups
(ServiceInvocationVariablesContainer variablesContainer, DBServiceOperationConfig operationConfig, ServiceRegistryDataObjectModel dataObjectModel) protected Object
extractAccessibleByObject
(ServiceInvocationVariablesContainer variablesContainer, DBServiceOperationConfig operationConfig, ServiceRegistryDataObjectModel dataObjectModel, Function<PermissionDefinition, String> parameterNameExtractor, String defaultParameterName) protected String
extractAccessibleByUser
(ServiceInvocationVariablesContainer variablesContainer, DBServiceOperationConfig operationConfig, ServiceRegistryDataObjectModel dataObjectModel) protected QueryParameter
extractLookupIdQueryParameter
(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, Object lookupIdValue) protected int
extractPagingParameter
(ServiceInvocationVariablesContainer variableContainer, DBServiceOperationConfig operationConfig, Function<SelectPaging, String> parameterMapper, String defaultParameterName, int valueIfNull) protected Collection<OrderParameter>
extractSortParameters
(ServiceInvocationVariablesContainer variablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceOperation operation, DBServiceOperationConfig operationConfig, boolean lookupIdFallback) protected ColumnMapping
findColumnMapping
(String columnMapping, ServiceDefinitionModel model) protected ColumnMapping
findColumnMappingMandatory
(String columnMapping, ServiceDefinitionModel model) protected org.apache.commons.lang3.tuple.Pair<ServiceDefinitionModel,
ServiceRegistryDataObjectModel> findReferenceServiceDefinitionModel
(ColumnMapping columnMapping, String tenantId, ServiceRegistryDataObjectModel dataObjectModel) protected Map<String,
ServiceInputParameter> inputParametersByName
(ServiceDefinitionModel model, ServiceOperation operation) protected Map<String,
List<DbColumnMapping>> insertColumnsByName
(ServiceDefinitionModel model, DBServiceOperationConfig config) invoke
(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvocationContext context) invokeList
(ServiceDefinitionModel serviceDefinition, ServiceOperation serviceOperation, ServiceInvocationContext serviceInvocationContext) protected int
performDelete
(ServiceInvocationVariablesContainer serviceInvocationVariablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceRegistryDataObjectModel dataObjectModel, DBServiceOperationConfig operationConfig) protected DatabaseServiceInvocationResponse
performSearch
(ServiceInvocationVariablesContainer serviceInvocationVariablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceRegistryDataObjectModel dataObjectModel, ServiceOperation serviceOperation, DBServiceOperationConfig operationConfig) protected int
performUpdate
(ServiceInvocationVariablesContainer serviceInvocationVariablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceRegistryDataObjectModel dataObjectModel, ServiceOperation serviceOperation, DBServiceOperationConfig operationConfig) protected DBServiceOperationConfig
readOperationConfig
(ServiceDefinitionModel model, ServiceOperation operation) protected String
resolveSortColumnName
(SortPropertyMapping sortPropertyMapping, ServiceDefinitionModel model) protected void
setSafeInValueLists
(DatabaseGenericInstanceQuery databaseGenericInstanceQuery) sortPropertiesByName
(ServiceDefinitionModel model, DBServiceOperationConfig config) protected Map<String,
List<DbColumnMapping>> updateColumnsByName
(ServiceDefinitionModel model, DBServiceOperationConfig config)
-
Field Details
-
KEY
- See Also:
-
MAX_ENTRIES_IN_CLAUSE
public static final int MAX_ENTRIES_IN_CLAUSE- See Also:
-
serviceRegistryEngineConfiguration
-
-
Constructor Details
-
DbServiceInvoker
-
-
Method Details
-
invoke
public DatabaseServiceInvocationResponse invoke(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvocationContext context) - Specified by:
invoke
in interfaceServiceInvoker
-
createJoinTableConfigs
protected List<JoinTableConfig> createJoinTableConfigs(ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, DBServiceOperationConfig operationConfig, String tenantId) -
createJoinTableConfigs
protected List<JoinTableConfig> createJoinTableConfigs(ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, BiPredicate<String, ColumnMapping> shouldUseMappingRelation, String tenantId) -
createJoinTableConfig
protected JoinTableConfig createJoinTableConfig(ColumnMapping columnMapping, String tenantId, String owningTableName, ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, long id) -
findReferenceServiceDefinitionModel
protected org.apache.commons.lang3.tuple.Pair<ServiceDefinitionModel,ServiceRegistryDataObjectModel> findReferenceServiceDefinitionModel(ColumnMapping columnMapping, String tenantId, ServiceRegistryDataObjectModel dataObjectModel) -
invokeList
public List<ServiceInvocationResponse> invokeList(ServiceDefinitionModel serviceDefinition, ServiceOperation serviceOperation, ServiceInvocationContext serviceInvocationContext) - Specified by:
invokeList
in interfaceServiceInvoker
-
sortPropertiesByName
protected Map<String,String> sortPropertiesByName(ServiceDefinitionModel model, DBServiceOperationConfig config) -
resolveSortColumnName
protected String resolveSortColumnName(SortPropertyMapping sortPropertyMapping, ServiceDefinitionModel model) -
insertColumnsByName
protected Map<String,List<DbColumnMapping>> insertColumnsByName(ServiceDefinitionModel model, DBServiceOperationConfig config) -
updateColumnsByName
protected Map<String,List<DbColumnMapping>> updateColumnsByName(ServiceDefinitionModel model, DBServiceOperationConfig config) -
columnsByName
protected Map<String,List<DbColumnMapping>> columnsByName(ServiceDefinitionModel model, DBServiceOperationConfig config, Function<DBServiceOperationConfig, Collection<DbColumnMapping>> columnsProvider) -
asDbColumnMapping
-
inputParametersByName
protected Map<String,ServiceInputParameter> inputParametersByName(ServiceDefinitionModel model, ServiceOperation operation) -
performSearch
protected DatabaseServiceInvocationResponse performSearch(ServiceInvocationVariablesContainer serviceInvocationVariablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceRegistryDataObjectModel dataObjectModel, ServiceOperation serviceOperation, DBServiceOperationConfig operationConfig) -
performUpdate
protected int performUpdate(ServiceInvocationVariablesContainer serviceInvocationVariablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceRegistryDataObjectModel dataObjectModel, ServiceOperation serviceOperation, DBServiceOperationConfig operationConfig) -
performDelete
protected int performDelete(ServiceInvocationVariablesContainer serviceInvocationVariablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceRegistryDataObjectModel dataObjectModel, DBServiceOperationConfig operationConfig) -
extractPagingParameter
protected int extractPagingParameter(ServiceInvocationVariablesContainer variableContainer, DBServiceOperationConfig operationConfig, Function<SelectPaging, String> parameterMapper, String defaultParameterName, int valueIfNull) -
extractAccessibleByUser
protected String extractAccessibleByUser(ServiceInvocationVariablesContainer variablesContainer, DBServiceOperationConfig operationConfig, ServiceRegistryDataObjectModel dataObjectModel) -
extractAccessibleByGroups
protected Collection<String> extractAccessibleByGroups(ServiceInvocationVariablesContainer variablesContainer, DBServiceOperationConfig operationConfig, ServiceRegistryDataObjectModel dataObjectModel) -
extractAccessibleByObject
protected Object extractAccessibleByObject(ServiceInvocationVariablesContainer variablesContainer, DBServiceOperationConfig operationConfig, ServiceRegistryDataObjectModel dataObjectModel, Function<PermissionDefinition, String> parameterNameExtractor, String defaultParameterName) -
createWhereClause
protected Collection<com.flowable.serviceregistry.engine.impl.invoker.db.WhereClauseComponent> createWhereClause(ServiceInvocationVariablesContainer variableContainer, ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, DBServiceOperationConfig operationConfig) -
asQueryParameter
protected QueryParameter asQueryParameter(QueryColumnMapping queryColumn, ServiceDefinitionModel model, ServiceRegistryDataObjectModel dataObjectModel, ServiceInvocationVariablesContainer variablesContainer, Object value) -
findColumnMappingMandatory
protected ColumnMapping findColumnMappingMandatory(String columnMapping, ServiceDefinitionModel model) -
findColumnMapping
-
readOperationConfig
protected DBServiceOperationConfig readOperationConfig(ServiceDefinitionModel model, ServiceOperation operation) -
extractLookupIdQueryParameter
protected QueryParameter extractLookupIdQueryParameter(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, Object lookupIdValue) -
extractSortParameters
protected Collection<OrderParameter> extractSortParameters(ServiceInvocationVariablesContainer variablesContainer, ServiceDefinitionModel serviceDefinitionModel, ServiceOperation operation, DBServiceOperationConfig operationConfig, boolean lookupIdFallback) -
setSafeInValueLists
-
createSafeInValuesList
-
asInt
protected int asInt(Object object, int valueIfNull, ServiceInvocationVariablesContainer variablesContainer) -
asString
-
asCollectionOfStrings
protected Collection<String> asCollectionOfStrings(Object object, ServiceInvocationVariablesContainer variablesContainer)
-