public interface MasterDataInstanceImportBuilder
The documents being imported should have the following format:
Single tenant:
{
"dataObjectDefinitionKey": "country",
"tenantId": "acme",
"masterData": [
{...},
...
]
}
Multi tenants:
{
"dataObjectDefinitionKey": "country",
"tenantIds": [ "acme", "megacorp" ],
"masterData": [
{...},
...
]
}
If the data object definition key or id are provided then the document can also have the following format:
[
{...},
...
]
Modifier and Type | Method and Description |
---|---|
MasterDataInstanceImportBuilder |
addClasspathResource(String resource)
Adds a master data json file from the classpath to this builder.
|
MasterDataInstanceImportBuilder |
addInputStream(String resourceName,
InputStream inputStream)
Adds a master data json file to this builder.
|
MasterDataInstanceImportBuilder |
addResourceDocument(String resourceDocument)
Adds a master data json document to this builder.
|
MasterDataInstanceImportBuilder |
dataObjectDefinitionId(String dataObjectDefinitionId)
The data object definition id that should be used when deploying the master data resource documents.
|
MasterDataInstanceImportBuilder |
dataObjectDefinitionKey(String dataObjectDefinitionKey)
The data object definition key that should be used when deploying the master data resource documents.
|
Collection<MasterDataInstance> |
doImport() |
MasterDataInstanceImportBuilder |
overwrite()
Before importing master data instances from the document.
|
MasterDataInstanceImportBuilder |
tenantId(String tenantId)
The tenantId that should be used when deploying the master data resource documents.
|
MasterDataInstanceImportBuilder addInputStream(String resourceName, InputStream inputStream)
MasterDataInstanceImportBuilder addClasspathResource(String resource)
MasterDataInstanceImportBuilder addResourceDocument(String resourceDocument)
MasterDataInstanceImportBuilder tenantId(String tenantId)
tenantId
- the id of the tenant to which to deployMasterDataInstanceImportBuilder dataObjectDefinitionKey(String dataObjectDefinitionKey)
dataObjectDefinitionKey
- the key of the data object that should be used for deploymentMasterDataInstanceImportBuilder dataObjectDefinitionId(String dataObjectDefinitionId)
dataObjectDefinitionId
- the id of the data object that should be used for deploymentMasterDataInstanceImportBuilder overwrite()
Collection<MasterDataInstance> doImport()