Interface DataObjectInstanceVariableContainerBuilder
- All Known Implementing Classes:
DataObjectInstanceVariableContainerBuilderImpl
public interface DataObjectInstanceVariableContainerBuilder
The basic data object instance builder which might be extended with a strongly typed support by the underlying
DataObjectDataSource
implementation.- Author:
- Micha Kiener
-
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.
-
Method Details
-
definitionId
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. -
definitionKey
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. -
tenantId
Set the tenant id for the new data object. This can be used together with the definition key for the lookup -
createFromPayload
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.- 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
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.- 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
DataObjectInstanceVariableContainer create()Creates and persists the new data object instance.- Returns:
- the newly created data object instance
-
getDefinitionId
java.lang.String getDefinitionId() -
getDefinitionKey
java.lang.String getDefinitionKey() -
getTenantId
java.lang.String getTenantId() -
getData
java.util.Map<java.lang.String,java.lang.Object> getData()
-