Class DataObjectInstanceVariableContainerBuilderImpl
java.lang.Object
com.flowable.dataobject.engine.impl.runtime.datasource.DataObjectInstanceVariableContainerBuilderImpl
- All Implemented Interfaces:
DataObjectInstanceVariableContainerBuilder
public class DataObjectInstanceVariableContainerBuilderImpl extends java.lang.Object implements DataObjectInstanceVariableContainerBuilder
- Author:
- Filip Hrisafov
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>
data
protected DataObjectDataSourceImpl
dataObjectDataSource
protected java.lang.String
definitionId
protected java.lang.String
definitionKey
protected java.lang.String
tenantId
-
Constructor Summary
Constructors Constructor Description DataObjectInstanceVariableContainerBuilderImpl(DataObjectDataSourceImpl dataObjectDataSource)
-
Method Summary
Modifier and Type Method Description DataObjectInstanceVariableContainer
create()
Creates and persists the new data object instance.DataObjectInstanceVariableContainerBuilder
createFromPayload(DataObjectHandlingContext context)
If an instance builder is used to create a new data object given by the payload sent from a form typically, this method is invoked to create the data object according the given payload data.DataObjectInstanceVariableContainerBuilder
definitionId(java.lang.String id)
Set the id of the data object definition the new instance should be based on.DataObjectInstanceVariableContainerBuilder
definitionKey(java.lang.String key)
Set the key of the data object definition the new instance should be based on.java.util.Map<java.lang.String,java.lang.Object>
getData()
java.lang.String
getDefinitionId()
java.lang.String
getDefinitionKey()
java.lang.String
getTenantId()
DataObjectInstanceVariableContainerBuilder
tenantId(java.lang.String tenantId)
Set the tenant id for the new data object.DataObjectInstanceVariableContainerBuilder
value(java.lang.String valueName, java.lang.Object value)
Generic setter for a data object field value specified by its name and value to be set.
-
Field Details
-
data
protected final java.util.Map<java.lang.String,java.lang.Object> data -
definitionKey
protected java.lang.String definitionKey -
definitionId
protected java.lang.String definitionId -
tenantId
protected java.lang.String tenantId -
dataObjectDataSource
-
-
Constructor Details
-
DataObjectInstanceVariableContainerBuilderImpl
public DataObjectInstanceVariableContainerBuilderImpl(DataObjectDataSourceImpl dataObjectDataSource)
-
-
Method Details
-
definitionId
Description copied from interface:DataObjectInstanceVariableContainerBuilder
Set the id of the data object definition the new instance should be based on. Must only be provided, if the data object definition key is not set.- Specified by:
definitionId
in interfaceDataObjectInstanceVariableContainerBuilder
-
definitionKey
Description copied from interface:DataObjectInstanceVariableContainerBuilder
Set the key of the data object definition the new instance should be based on. If set, the latest definition id is used. The key is ignored, if the definition id is set directly.- Specified by:
definitionKey
in interfaceDataObjectInstanceVariableContainerBuilder
-
tenantId
Description copied from interface:DataObjectInstanceVariableContainerBuilder
Set the tenant id for the new data object. This can be used together with the definition key for the lookup- Specified by:
tenantId
in interfaceDataObjectInstanceVariableContainerBuilder
-
createFromPayload
public DataObjectInstanceVariableContainerBuilder createFromPayload(DataObjectHandlingContext context)Description copied from interface:DataObjectInstanceVariableContainerBuilder
If an instance builder is used to create a new data object given by the payload sent from a form typically, this method is invoked to create the data object according the given payload data.- Specified by:
createFromPayload
in interfaceDataObjectInstanceVariableContainerBuilder
- Parameters:
context
- the data object context containing the data and full payload and further information for parsing the content into the data object- Returns:
- the builder instance for method chaining
-
value
public DataObjectInstanceVariableContainerBuilder value(java.lang.String valueName, java.lang.Object value)Description copied from interface:DataObjectInstanceVariableContainerBuilder
Generic setter for a data object field value specified by its name and value to be set.- Specified by:
value
in interfaceDataObjectInstanceVariableContainerBuilder
- Parameters:
valueName
- the name of the data object field to set a valuevalue
- the value to be set- Returns:
- the builder instance for method chaining
-
create
Description copied from interface:DataObjectInstanceVariableContainerBuilder
Creates and persists the new data object instance.- Specified by:
create
in interfaceDataObjectInstanceVariableContainerBuilder
- Returns:
- the newly created data object instance
-
getDefinitionId
public java.lang.String getDefinitionId()- Specified by:
getDefinitionId
in interfaceDataObjectInstanceVariableContainerBuilder
-
getDefinitionKey
public java.lang.String getDefinitionKey()- Specified by:
getDefinitionKey
in interfaceDataObjectInstanceVariableContainerBuilder
-
getTenantId
public java.lang.String getTenantId()- Specified by:
getTenantId
in interfaceDataObjectInstanceVariableContainerBuilder
-
getData
public java.util.Map<java.lang.String,java.lang.Object> getData()- Specified by:
getData
in interfaceDataObjectInstanceVariableContainerBuilder
-