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 underlying
DataObjectDataSource
implementation.- Author:
- Micha Kiener
-
Method Summary
Modifier and TypeMethodDescriptionaccessibleByUser
(String userId) accessibleByUserOrGroups
(String userId, Collection<String> groupKeys) If set, the permissions to create data object instances are checked against the passed user and groups.create()
Creates and persists the new data object instance.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.definitionId
(String id) Set the id of the data object definition the new instance should be based on.definitionKey
(String key) Set the key of the data object definition the new instance should be based on.getData()
Set the key of the operation that should be used to create the object.Set the tenant id for the new data object.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 -
operation
Set the key of the operation that should be used to create the object. -
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
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
-
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() -
getData
-