Interface DataObjectInstanceVariableContainerBuilder
-
- All Known Implementing Classes:
DataObjectInstanceVariableContainerBuilderImpl
,GenericDataObjectInstanceVariableContainerBuilder
public interface DataObjectInstanceVariableContainerBuilder
The basic data object instance builder which might be extended with a strongly typed support by the underlyingDataObjectDataSource
implementation.- Author:
- Micha Kiener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DataObjectInstanceVariableContainerBuilder
accessibleByUser(String userId)
DataObjectInstanceVariableContainerBuilder
accessibleByUserOrGroups(String userId, Collection<String> groupKeys)
If set, the permissions to create data object instances are checked against the passed user and groups.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(String id)
Set the id of the data object definition the new instance should be based on.DataObjectInstanceVariableContainerBuilder
definitionKey(String key)
Set the key of the data object definition the new instance should be based on.Map<String,Object>
getData()
String
getDefinitionId()
String
getDefinitionKey()
String
getTenantId()
DataObjectInstanceVariableContainerBuilder
operation(String operation)
Set the key of the operation that should be used to create the object.DataObjectInstanceVariableContainerBuilder
tenantId(String tenantId)
Set the tenant id for the new data object.DataObjectInstanceVariableContainerBuilder
value(String valueName, Object value)
Generic setter for a data object field value specified by its name and value to be set.
-
-
-
Method Detail
-
definitionId
DataObjectInstanceVariableContainerBuilder definitionId(String id)
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
DataObjectInstanceVariableContainerBuilder definitionKey(String key)
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
DataObjectInstanceVariableContainerBuilder tenantId(String tenantId)
Set the tenant id for the new data object. This can be used together with the definition key for the lookup
-
operation
DataObjectInstanceVariableContainerBuilder operation(String operation)
Set the key of the operation that should be used to create the object.
-
createFromPayload
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.- 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(String valueName, 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
-
accessibleByUser
default DataObjectInstanceVariableContainerBuilder accessibleByUser(String userId)
-
accessibleByUserOrGroups
DataObjectInstanceVariableContainerBuilder accessibleByUserOrGroups(String userId, Collection<String> groupKeys)
If set, the permissions to create data object instances are checked against the passed user and groups.
-
create
DataObjectInstanceVariableContainer create()
Creates and persists the new data object instance.- Returns:
- the newly created data object instance
-
getDefinitionId
String getDefinitionId()
-
getDefinitionKey
String getDefinitionKey()
-
getTenantId
String getTenantId()
-
-