Class DataObjectRuntimeServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<DataObjectEngineConfiguration>
-
- com.flowable.dataobject.engine.impl.runtime.DataObjectRuntimeServiceImpl
-
- All Implemented Interfaces:
DataObjectRuntimeService
public class DataObjectRuntimeServiceImpl extends CommonEngineServiceImpl<DataObjectEngineConfiguration> implements DataObjectRuntimeService
-
-
Field Summary
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutor
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration
-
-
Constructor Summary
Constructors Constructor Description DataObjectRuntimeServiceImpl(DataObjectEngineConfiguration engineConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGroupIdentityLink(String lookupId, String dataObjectDefinitionKey, String groupId, String identityLinkType)
Involves a group with a data object instance.void
addUserIdentityLink(String lookupId, String dataObjectDefinitionKey, String userId, String identityLinkType)
Involves a user with a data object instance.DataObjectDeletionBuilder
createDataObjectDeletionBuilder()
Creates a new generic data object instance deletion builder to delete data objects.DataObjectInstanceEntityQuery
createDataObjectInstanceEntityQuery()
Returns a data object instance query to be used when searching for data object instances.DataObjectInstanceVariableContainerQuery
createDataObjectInstanceQuery()
Creates a new generic data object instance query to query data objects.DataObjectModificationBuilder
createDataObjectModificationBuilder()
Creates a new database schema data object modification builder to modify existing data objects.DataObjectModificationBuilder
createDataObjectModificationBuilder(String dataObjectDefinitionId)
Creates a new database schema data object modification builder to modify existing data objects.DataObjectInstanceVariableContainerBuilder
createDataObjectValueInstanceBuilder()
Creates a new generic data object instance builder to create new data objects.DataObjectInstanceVariableContainerBuilder
createDataObjectValueInstanceBuilderByDefinitionId(String dataObjectDefinitionId)
Creates a new generic data object instance builder to create new data objects.DataObjectInstanceVariableContainerBuilder
createDataObjectValueInstanceBuilderByDefinitionKey(String dataObjectDefinitionKey)
Creates a new generic data object instance builder to create new data objects.DataObjectInstanceVariableContainerBuilder
createDataObjectValueInstanceBuilderByDefinitionKeyAndTenantId(String dataObjectDefinitionKey, String tenantId)
Creates a new generic data object instance builder to create new data objects.MasterDataInstance
createMasterDataInstance(MasterDataInstanceBuilderImpl masterDataInstanceBuilder)
MasterDataInstanceBuilder
createMasterDataInstanceBuilder()
Creates a builder to add a new master data instanceMasterDataInstanceImportBuilder
createMasterDataInstanceImportBuilder()
Creates a loader to add a new master data instances from a document.MasterDataInstanceQuery
createMasterDataInstanceQuery()
Returns a master data instance query to be used when searching for master data instances.void
deleteDataObject(String lookupId, String dataObjectDefinitionId)
Deletes the specified data object given by its lookup id and data object definition.void
deleteDataObjectVariablesByInstanceId(String dataInstanceId)
Deletes data object variables by master instance idvoid
deleteGroupIdentityLink(String lookupId, String dataObjectDefinitionKey, String groupId, String identityLinkType)
Removes the association between a group and a data object instance for the given identityLinkType.void
deleteMasterDataInstancesByDefinitionId(String dataObjectDefinitionId)
Deletes master data instances by data object definition idvoid
deleteUserIdentityLink(String lookupId, String dataObjectDefinitionKey, String userId, String identityLinkType)
Removes the association between a user and a data object instance for the given identityLinkType.DataObjectInstanceVariableContainer
findDataObjectValueByDataObjectInstanceId(String instanceId)
Lookup a single data object given by its instance id.DataObjectInstanceVariableContainer
findDataObjectValueByLookupIdAndDefinitionId(String lookupId, String dataObjectDefinitionId)
Lookup a single data object given by its lookup id and definition id.DataObjectInstanceVariableContainer
findDataObjectValueByLookupIdAndDefinitionKey(String lookupId, String dataObjectDefinitionKey)
Lookup a single data object given by its lookup id and definition key.DataObjectInstanceVariableContainer
findDataObjectValueByLookupIdAndDefinitionKey(String lookupId, String dataObjectDefinitionKey, String tenantId)
Lookup a single data object given by its lookup id and definition key.protected DataObjectDefinition
getDataObjectDefinitionById(String dataObjectDefinitionId)
protected DataObjectDefinition
getDataObjectDefinitionByKey(String dataObjectDefinitionKey)
protected DataObjectDefinition
getDataObjectDefinitionByKeyAndTenantId(String dataObjectDefinitionKey, String tenantId)
protected DataObjectModel
getDataObjectModelById(String dataObjectDefinitionId)
protected DataObjectModel
getDataObjectModelByKey(String dataObjectDefinitionKey)
protected DataObjectModel
getDataObjectModelByKeyAndTenantId(String dataObjectDefinitionKey, String tenantId)
protected DataObjectRepositoryService
getDataObjectRepositoryService()
DataObjectDataSource
getDataSource(String dataSourceId)
Returns the data source given its id.List<IdentityLink>
getIdentityLinksForDataObjectInstance(String lookupId, String dataObjectDefinitionKey)
Retrieves theIdentityLink
s associated with the given data object instance.Map<String,Object>
getMasterDataInstanceVariables(String masterDataInstanceId)
Get the variables for the master data instance with the provided idvoid
loadMasterDataInstanceData(String data, String dataObjectDefinitionId)
Loads master data instance data into the data object engineMasterDataInstance
saveMasterDataInstance(MasterDataInstance masterDataInstance)
Saves an updated master data instance-
Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
Methods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
-
-
-
Constructor Detail
-
DataObjectRuntimeServiceImpl
public DataObjectRuntimeServiceImpl(DataObjectEngineConfiguration engineConfiguration)
-
-
Method Detail
-
findDataObjectValueByDataObjectInstanceId
public DataObjectInstanceVariableContainer findDataObjectValueByDataObjectInstanceId(String instanceId)
Description copied from interface:DataObjectRuntimeService
Lookup a single data object given by its instance id.- Specified by:
findDataObjectValueByDataObjectInstanceId
in interfaceDataObjectRuntimeService
- Parameters:
instanceId
- the instance id of the data object to be returned- Returns:
- the data object instance, if found, null otherwise
-
findDataObjectValueByLookupIdAndDefinitionKey
public DataObjectInstanceVariableContainer findDataObjectValueByLookupIdAndDefinitionKey(String lookupId, String dataObjectDefinitionKey)
Description copied from interface:DataObjectRuntimeService
Lookup a single data object given by its lookup id and definition key.- Specified by:
findDataObjectValueByLookupIdAndDefinitionKey
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- the lookup id of the data object to be returneddataObjectDefinitionKey
- the key of the data object definition to return a data object instance for- Returns:
- the data object instance, if found, null otherwise
-
findDataObjectValueByLookupIdAndDefinitionKey
public DataObjectInstanceVariableContainer findDataObjectValueByLookupIdAndDefinitionKey(String lookupId, String dataObjectDefinitionKey, String tenantId)
Description copied from interface:DataObjectRuntimeService
Lookup a single data object given by its lookup id and definition key.- Specified by:
findDataObjectValueByLookupIdAndDefinitionKey
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- the lookup id of the data object to be returneddataObjectDefinitionKey
- the key of the data object definition to return a data object instance fortenantId
- the tenant id to return a data object instance for- Returns:
- the data object instance, if found, null otherwise
-
findDataObjectValueByLookupIdAndDefinitionId
public DataObjectInstanceVariableContainer findDataObjectValueByLookupIdAndDefinitionId(String lookupId, String dataObjectDefinitionId)
Description copied from interface:DataObjectRuntimeService
Lookup a single data object given by its lookup id and definition id.- Specified by:
findDataObjectValueByLookupIdAndDefinitionId
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- the lookup id of the data object to be returneddataObjectDefinitionId
- the id of the data object definition to return a data object instance for- Returns:
- the data object instance, if found, null otherwise
-
createDataObjectValueInstanceBuilder
public DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilder()
Description copied from interface:DataObjectRuntimeService
Creates a new generic data object instance builder to create new data objects.- Specified by:
createDataObjectValueInstanceBuilder
in interfaceDataObjectRuntimeService
- Returns:
- the data object instance builder
-
createDataObjectValueInstanceBuilderByDefinitionKey
public DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilderByDefinitionKey(String dataObjectDefinitionKey)
Description copied from interface:DataObjectRuntimeService
Creates a new generic data object instance builder to create new data objects.- Specified by:
createDataObjectValueInstanceBuilderByDefinitionKey
in interfaceDataObjectRuntimeService
- Parameters:
dataObjectDefinitionKey
- the key of the data object definition a new instance should be created for- Returns:
- the data object instance builder
-
createDataObjectValueInstanceBuilderByDefinitionKeyAndTenantId
public DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilderByDefinitionKeyAndTenantId(String dataObjectDefinitionKey, String tenantId)
Description copied from interface:DataObjectRuntimeService
Creates a new generic data object instance builder to create new data objects.- Specified by:
createDataObjectValueInstanceBuilderByDefinitionKeyAndTenantId
in interfaceDataObjectRuntimeService
- Parameters:
dataObjectDefinitionKey
- the key of the data object definition a new instance should be created fortenantId
- the tenant of the data object definition- Returns:
- the data object instance builder
-
createDataObjectValueInstanceBuilderByDefinitionId
public DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilderByDefinitionId(String dataObjectDefinitionId)
Description copied from interface:DataObjectRuntimeService
Creates a new generic data object instance builder to create new data objects.- Specified by:
createDataObjectValueInstanceBuilderByDefinitionId
in interfaceDataObjectRuntimeService
- Parameters:
dataObjectDefinitionId
- the id of the data object definition a new instance should be created for- Returns:
- the data object instance builder
-
createDataObjectModificationBuilder
public DataObjectModificationBuilder createDataObjectModificationBuilder()
Description copied from interface:DataObjectRuntimeService
Creates a new database schema data object modification builder to modify existing data objects. As we already know the data object to be modified, this method will get a modification builder through the data source handling this specific data object.- Specified by:
createDataObjectModificationBuilder
in interfaceDataObjectRuntimeService
- Returns:
- the data object modification builder
-
createDataObjectModificationBuilder
public DataObjectModificationBuilder createDataObjectModificationBuilder(String dataObjectDefinitionId)
Description copied from interface:DataObjectRuntimeService
Creates a new database schema data object modification builder to modify existing data objects. As we already know the data object to be modified, this method will get a modification builder through the data source handling this specific data object.- Specified by:
createDataObjectModificationBuilder
in interfaceDataObjectRuntimeService
- Parameters:
dataObjectDefinitionId
- the id of the data object definition for the data object to be modified- Returns:
- the data object modification builder
-
createDataObjectInstanceQuery
public DataObjectInstanceVariableContainerQuery createDataObjectInstanceQuery()
Description copied from interface:DataObjectRuntimeService
Creates a new generic data object instance query to query data objects.- Specified by:
createDataObjectInstanceQuery
in interfaceDataObjectRuntimeService
- Returns:
- the data object query
-
createDataObjectDeletionBuilder
public DataObjectDeletionBuilder createDataObjectDeletionBuilder()
Description copied from interface:DataObjectRuntimeService
Creates a new generic data object instance deletion builder to delete data objects.- Specified by:
createDataObjectDeletionBuilder
in interfaceDataObjectRuntimeService
- Returns:
- the data object deletion builder
-
deleteDataObject
public void deleteDataObject(String lookupId, String dataObjectDefinitionId)
Description copied from interface:DataObjectRuntimeService
Deletes the specified data object given by its lookup id and data object definition.- Specified by:
deleteDataObject
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- the lookup id of the data object to be deleteddataObjectDefinitionId
- the id of the data object definition the data object is specified with
-
getIdentityLinksForDataObjectInstance
public List<IdentityLink> getIdentityLinksForDataObjectInstance(String lookupId, String dataObjectDefinitionKey)
Description copied from interface:DataObjectRuntimeService
Retrieves theIdentityLink
s associated with the given data object instance. Such anIdentityLink
informs how a certain user is involved with a data object instance- Specified by:
getIdentityLinksForDataObjectInstance
in interfaceDataObjectRuntimeService
-
addUserIdentityLink
public void addUserIdentityLink(String lookupId, String dataObjectDefinitionKey, String userId, String identityLinkType)
Description copied from interface:DataObjectRuntimeService
Involves a user with a data object instance. The type of identity link is defined by the given identityLinkType.- Specified by:
addUserIdentityLink
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- id of the lookup id, cannot be null.dataObjectDefinitionKey
- the key of the data object definition keyuserId
- id of the involved user, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).
-
addGroupIdentityLink
public void addGroupIdentityLink(String lookupId, String dataObjectDefinitionKey, String groupId, String identityLinkType)
Description copied from interface:DataObjectRuntimeService
Involves a group with a data object instance. The type of identity link is defined by the given identityLinkType.- Specified by:
addGroupIdentityLink
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- id of the lookup id, cannot be null.dataObjectDefinitionKey
- the key of the data object definition keygroupId
- id of the involved group, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).
-
deleteUserIdentityLink
public void deleteUserIdentityLink(String lookupId, String dataObjectDefinitionKey, String userId, String identityLinkType)
Description copied from interface:DataObjectRuntimeService
Removes the association between a user and a data object instance for the given identityLinkType.- Specified by:
deleteUserIdentityLink
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- id of the lookup id, cannot be null.dataObjectDefinitionKey
- the key of the data object definition keyuserId
- id of the involved user, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).
-
deleteGroupIdentityLink
public void deleteGroupIdentityLink(String lookupId, String dataObjectDefinitionKey, String groupId, String identityLinkType)
Description copied from interface:DataObjectRuntimeService
Removes the association between a group and a data object instance for the given identityLinkType.- Specified by:
deleteGroupIdentityLink
in interfaceDataObjectRuntimeService
- Parameters:
lookupId
- id of the lookup id, cannot be null.dataObjectDefinitionKey
- the key of the data object definition keygroupId
- id of the involved group, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).
-
getDataSource
public DataObjectDataSource getDataSource(String dataSourceId)
Description copied from interface:DataObjectRuntimeService
Returns the data source given its id.- Specified by:
getDataSource
in interfaceDataObjectRuntimeService
- Parameters:
dataSourceId
- the id of the data source to be returned- Returns:
- the data source
-
createDataObjectInstanceEntityQuery
public DataObjectInstanceEntityQuery createDataObjectInstanceEntityQuery()
Description copied from interface:DataObjectRuntimeService
Returns a data object instance query to be used when searching for data object instances.- Specified by:
createDataObjectInstanceEntityQuery
in interfaceDataObjectRuntimeService
- Returns:
- the query instance used to specify the data object instance query terms
-
loadMasterDataInstanceData
public void loadMasterDataInstanceData(String data, String dataObjectDefinitionId)
Description copied from interface:DataObjectRuntimeService
Loads master data instance data into the data object engine- Specified by:
loadMasterDataInstanceData
in interfaceDataObjectRuntimeService
-
createMasterDataInstanceQuery
public MasterDataInstanceQuery createMasterDataInstanceQuery()
Description copied from interface:DataObjectRuntimeService
Returns a master data instance query to be used when searching for master data instances.- Specified by:
createMasterDataInstanceQuery
in interfaceDataObjectRuntimeService
- Returns:
- the query instance used to specify the master data instance query terms
-
createMasterDataInstanceBuilder
public MasterDataInstanceBuilder createMasterDataInstanceBuilder()
Description copied from interface:DataObjectRuntimeService
Creates a builder to add a new master data instance- Specified by:
createMasterDataInstanceBuilder
in interfaceDataObjectRuntimeService
- Returns:
- the master data instance builder
-
createMasterDataInstanceImportBuilder
public MasterDataInstanceImportBuilder createMasterDataInstanceImportBuilder()
Description copied from interface:DataObjectRuntimeService
Creates a loader to add a new master data instances from a document.- Specified by:
createMasterDataInstanceImportBuilder
in interfaceDataObjectRuntimeService
- Returns:
- the master data instance loader
-
getMasterDataInstanceVariables
public Map<String,Object> getMasterDataInstanceVariables(String masterDataInstanceId)
Description copied from interface:DataObjectRuntimeService
Get the variables for the master data instance with the provided id- Specified by:
getMasterDataInstanceVariables
in interfaceDataObjectRuntimeService
- Returns:
- the master data instance variables
-
saveMasterDataInstance
public MasterDataInstance saveMasterDataInstance(MasterDataInstance masterDataInstance)
Description copied from interface:DataObjectRuntimeService
Saves an updated master data instance- Specified by:
saveMasterDataInstance
in interfaceDataObjectRuntimeService
- Returns:
- the updated master data instance
-
deleteMasterDataInstancesByDefinitionId
public void deleteMasterDataInstancesByDefinitionId(String dataObjectDefinitionId)
Description copied from interface:DataObjectRuntimeService
Deletes master data instances by data object definition id- Specified by:
deleteMasterDataInstancesByDefinitionId
in interfaceDataObjectRuntimeService
-
deleteDataObjectVariablesByInstanceId
public void deleteDataObjectVariablesByInstanceId(String dataInstanceId)
Description copied from interface:DataObjectRuntimeService
Deletes data object variables by master instance id- Specified by:
deleteDataObjectVariablesByInstanceId
in interfaceDataObjectRuntimeService
-
createMasterDataInstance
public MasterDataInstance createMasterDataInstance(MasterDataInstanceBuilderImpl masterDataInstanceBuilder)
-
getDataObjectDefinitionById
protected DataObjectDefinition getDataObjectDefinitionById(String dataObjectDefinitionId)
-
getDataObjectDefinitionByKey
protected DataObjectDefinition getDataObjectDefinitionByKey(String dataObjectDefinitionKey)
-
getDataObjectDefinitionByKeyAndTenantId
protected DataObjectDefinition getDataObjectDefinitionByKeyAndTenantId(String dataObjectDefinitionKey, String tenantId)
-
getDataObjectModelById
protected DataObjectModel getDataObjectModelById(String dataObjectDefinitionId)
-
getDataObjectModelByKey
protected DataObjectModel getDataObjectModelByKey(String dataObjectDefinitionKey)
-
getDataObjectModelByKeyAndTenantId
protected DataObjectModel getDataObjectModelByKeyAndTenantId(String dataObjectDefinitionKey, String tenantId)
-
getDataObjectRepositoryService
protected DataObjectRepositoryService getDataObjectRepositoryService()
-
-