Class GenericDataObjectInstanceVariableContainerBuilder
- java.lang.Object
-
- com.flowable.dataobject.engine.impl.runtime.GenericDataObjectInstanceVariableContainerBuilder
-
- All Implemented Interfaces:
DataObjectInstanceVariableContainerBuilder
public class GenericDataObjectInstanceVariableContainerBuilder extends Object implements DataObjectInstanceVariableContainerBuilder
- Author:
- Filip Hrisafov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classGenericDataObjectInstanceVariableContainerBuilder.ExecuteCreation
-
Field Summary
Fields Modifier and Type Field Description protected Collection<String>accessibleByGroupsprotected booleanaccessibleBySetprotected StringaccessibleByUserprotected CommandExecutorcommandExecutorprotected DataObjectHandlingContextcontextprotected Map<String,Object>dataprotected StringdefinitionIdprotected StringdefinitionKeyprotected Stringoperationprotected StringtenantId
-
Constructor Summary
Constructors Constructor Description GenericDataObjectInstanceVariableContainerBuilder(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataObjectInstanceVariableContainerBuilderaccessibleByUserOrGroups(String userId, Collection<String> groupKeys)If set, the permissions to create data object instances are checked against the passed user and groups.DataObjectInstanceVariableContainercreate()Creates and persists the new data object instance.DataObjectInstanceVariableContainerBuildercreateFromPayload(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.DataObjectInstanceVariableContainerBuilderdefinitionId(String id)Set the id of the data object definition the new instance should be based on.DataObjectInstanceVariableContainerBuilderdefinitionKey(String key)Set the key of the data object definition the new instance should be based on.Map<String,Object>getData()StringgetDefinitionId()StringgetDefinitionKey()StringgetTenantId()DataObjectInstanceVariableContainerBuilderoperation(String operation)Set the key of the operation that should be used to create the object.DataObjectInstanceVariableContainerBuildertenantId(String tenantId)Set the tenant id for the new data object.DataObjectInstanceVariableContainerBuildervalue(String valueName, Object value)Generic setter for a data object field value specified by its name and value to be set.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flowable.dataobject.api.runtime.DataObjectInstanceVariableContainerBuilder
accessibleByUser
-
-
-
-
Field Detail
-
commandExecutor
protected final CommandExecutor commandExecutor
-
definitionId
protected String definitionId
-
definitionKey
protected String definitionKey
-
tenantId
protected String tenantId
-
operation
protected String operation
-
context
protected DataObjectHandlingContext context
-
accessibleByUser
protected String accessibleByUser
-
accessibleByGroups
protected Collection<String> accessibleByGroups
-
accessibleBySet
protected boolean accessibleBySet
-
-
Constructor Detail
-
GenericDataObjectInstanceVariableContainerBuilder
public GenericDataObjectInstanceVariableContainerBuilder(CommandExecutor commandExecutor)
-
-
Method Detail
-
definitionId
public DataObjectInstanceVariableContainerBuilder definitionId(String id)
Description copied from interface:DataObjectInstanceVariableContainerBuilderSet 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:
definitionIdin interfaceDataObjectInstanceVariableContainerBuilder
-
definitionKey
public DataObjectInstanceVariableContainerBuilder definitionKey(String key)
Description copied from interface:DataObjectInstanceVariableContainerBuilderSet 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:
definitionKeyin interfaceDataObjectInstanceVariableContainerBuilder
-
tenantId
public DataObjectInstanceVariableContainerBuilder tenantId(String tenantId)
Description copied from interface:DataObjectInstanceVariableContainerBuilderSet the tenant id for the new data object. This can be used together with the definition key for the lookup- Specified by:
tenantIdin interfaceDataObjectInstanceVariableContainerBuilder
-
operation
public DataObjectInstanceVariableContainerBuilder operation(String operation)
Description copied from interface:DataObjectInstanceVariableContainerBuilderSet the key of the operation that should be used to create the object.- Specified by:
operationin interfaceDataObjectInstanceVariableContainerBuilder
-
createFromPayload
public DataObjectInstanceVariableContainerBuilder createFromPayload(DataObjectHandlingContext context)
Description copied from interface:DataObjectInstanceVariableContainerBuilderIf 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:
createFromPayloadin 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(String valueName, Object value)
Description copied from interface:DataObjectInstanceVariableContainerBuilderGeneric setter for a data object field value specified by its name and value to be set.- Specified by:
valuein 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
-
accessibleByUserOrGroups
public DataObjectInstanceVariableContainerBuilder accessibleByUserOrGroups(String userId, Collection<String> groupKeys)
Description copied from interface:DataObjectInstanceVariableContainerBuilderIf set, the permissions to create data object instances are checked against the passed user and groups.- Specified by:
accessibleByUserOrGroupsin interfaceDataObjectInstanceVariableContainerBuilder
-
create
public DataObjectInstanceVariableContainer create()
Description copied from interface:DataObjectInstanceVariableContainerBuilderCreates and persists the new data object instance.- Specified by:
createin interfaceDataObjectInstanceVariableContainerBuilder- Returns:
- the newly created data object instance
-
getDefinitionId
public String getDefinitionId()
- Specified by:
getDefinitionIdin interfaceDataObjectInstanceVariableContainerBuilder
-
getDefinitionKey
public String getDefinitionKey()
- Specified by:
getDefinitionKeyin interfaceDataObjectInstanceVariableContainerBuilder
-
getTenantId
public String getTenantId()
- Specified by:
getTenantIdin interfaceDataObjectInstanceVariableContainerBuilder
-
getData
public Map<String,Object> getData()
- Specified by:
getDatain interfaceDataObjectInstanceVariableContainerBuilder
-
-