Class MasterDataInstanceImportBuilderImpl
- java.lang.Object
-
- com.flowable.dataobject.engine.impl.runtime.MasterDataInstanceImportBuilderImpl
-
- All Implemented Interfaces:
MasterDataInstanceImportBuilder
public class MasterDataInstanceImportBuilderImpl extends Object implements MasterDataInstanceImportBuilder
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutorcommandExecutorprotected StringdataObjectDefinitionIdprotected StringdataObjectDefinitionKeyprotected Collection<com.fasterxml.jackson.databind.JsonNode>masterDataDocumentsprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapperprotected Booleanoverwriteprotected StringtenantIdprotected booleantenantIdSet
-
Constructor Summary
Constructors Constructor Description MasterDataInstanceImportBuilderImpl(CommandExecutor commandExecutor, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MasterDataInstanceImportBuilderaddClasspathResource(String resource)Adds a master data json file from the classpath to this builder.MasterDataInstanceImportBuilderaddInputStream(String resourceName, InputStream inputStream)Adds a master data json file to this builder.MasterDataInstanceImportBuilderaddResourceDocument(String resourceDocument)Adds a master data json document to this builder.MasterDataInstanceImportBuilderdataObjectDefinitionId(String dataObjectDefinitionId)The data object definition id that should be used when deploying the master data resource documents.MasterDataInstanceImportBuilderdataObjectDefinitionKey(String dataObjectDefinitionKey)The data object definition key that should be used when deploying the master data resource documents.Collection<MasterDataInstance>doImport()StringgetDataObjectDefinitionId()StringgetDataObjectDefinitionKey()Collection<com.fasterxml.jackson.databind.JsonNode>getMasterDataDocuments()BooleangetOverwrite()StringgetTenantId()booleanisTenantIdSet()MasterDataInstanceImportBuilderoverwrite()Before importing master data instances from the document.MasterDataInstanceImportBuildertenantId(String tenantId)The tenantId that should be used when deploying the master data resource documents.
-
-
-
Field Detail
-
commandExecutor
protected CommandExecutor commandExecutor
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
masterDataDocuments
protected Collection<com.fasterxml.jackson.databind.JsonNode> masterDataDocuments
-
tenantId
protected String tenantId
-
tenantIdSet
protected boolean tenantIdSet
-
dataObjectDefinitionKey
protected String dataObjectDefinitionKey
-
dataObjectDefinitionId
protected String dataObjectDefinitionId
-
overwrite
protected Boolean overwrite
-
-
Constructor Detail
-
MasterDataInstanceImportBuilderImpl
public MasterDataInstanceImportBuilderImpl(CommandExecutor commandExecutor, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
addInputStream
public MasterDataInstanceImportBuilder addInputStream(String resourceName, InputStream inputStream)
Description copied from interface:MasterDataInstanceImportBuilderAdds a master data json file to this builder.- Specified by:
addInputStreamin interfaceMasterDataInstanceImportBuilder
-
addClasspathResource
public MasterDataInstanceImportBuilder addClasspathResource(String resource)
Description copied from interface:MasterDataInstanceImportBuilderAdds a master data json file from the classpath to this builder.- Specified by:
addClasspathResourcein interfaceMasterDataInstanceImportBuilder
-
addResourceDocument
public MasterDataInstanceImportBuilder addResourceDocument(String resourceDocument)
Description copied from interface:MasterDataInstanceImportBuilderAdds a master data json document to this builder.- Specified by:
addResourceDocumentin interfaceMasterDataInstanceImportBuilder
-
tenantId
public MasterDataInstanceImportBuilder tenantId(String tenantId)
Description copied from interface:MasterDataInstanceImportBuilderThe tenantId that should be used when deploying the master data resource documents. If set then the tenantId from the document would be ignored.- Specified by:
tenantIdin interfaceMasterDataInstanceImportBuilder- Parameters:
tenantId- the id of the tenant to which to deploy
-
dataObjectDefinitionKey
public MasterDataInstanceImportBuilder dataObjectDefinitionKey(String dataObjectDefinitionKey)
Description copied from interface:MasterDataInstanceImportBuilderThe data object definition key that should be used when deploying the master data resource documents. If set then the dataObjectDefinitionKey from the document would be ignored.- Specified by:
dataObjectDefinitionKeyin interfaceMasterDataInstanceImportBuilder- Parameters:
dataObjectDefinitionKey- the key of the data object that should be used for deployment
-
dataObjectDefinitionId
public MasterDataInstanceImportBuilder dataObjectDefinitionId(String dataObjectDefinitionId)
Description copied from interface:MasterDataInstanceImportBuilderThe data object definition id that should be used when deploying the master data resource documents. If set then the dataObjectDefinitionKey from the document would be ignored.- Specified by:
dataObjectDefinitionIdin interfaceMasterDataInstanceImportBuilder- Parameters:
dataObjectDefinitionId- the id of the data object that should be used for deployment
-
overwrite
public MasterDataInstanceImportBuilder overwrite()
Description copied from interface:MasterDataInstanceImportBuilderBefore importing master data instances from the document. Delete all of them that matched the definition id / key in the matching tenant. This should be used with care. If set then the overwrite flag from the document would be ignored.- Specified by:
overwritein interfaceMasterDataInstanceImportBuilder
-
doImport
public Collection<MasterDataInstance> doImport()
- Specified by:
doImportin interfaceMasterDataInstanceImportBuilder
-
getMasterDataDocuments
public Collection<com.fasterxml.jackson.databind.JsonNode> getMasterDataDocuments()
-
getTenantId
public String getTenantId()
-
isTenantIdSet
public boolean isTenantIdSet()
-
getDataObjectDefinitionKey
public String getDataObjectDefinitionKey()
-
getDataObjectDefinitionId
public String getDataObjectDefinitionId()
-
getOverwrite
public Boolean getOverwrite()
-
-