public class DeploymentBuilderImpl extends Object implements DeploymentBuilder, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
deployChangedOnly |
protected DeploymentEntity |
deployment |
protected Map<String,Set<String>> |
deploymentResourcesById |
protected Map<String,Set<String>> |
deploymentResourcesByName |
protected Set<String> |
deployments |
protected boolean |
isDuplicateFilterEnabled |
protected String |
nameFromDeployment |
protected Date |
processDefinitionsActivationDate |
protected RepositoryServiceImpl |
repositoryService |
| Constructor and Description |
|---|
DeploymentBuilderImpl(RepositoryServiceImpl repositoryService) |
| Modifier and Type | Method and Description |
|---|---|
DeploymentBuilder |
activateProcessDefinitionsOn(Date date)
Sets the date on which the process definitions contained in this deployment
will be activated.
|
protected DeploymentBuilder |
addBytes(String resourceName,
byte[] bytes) |
DeploymentBuilder |
addClasspathResource(String resource) |
DeploymentBuilder |
addDeploymentResourceById(String deploymentId,
String resourceId)
A given resource specified by id and deployment id will be added
to the new deployment to re-deploy the given resource.
|
DeploymentBuilder |
addDeploymentResourceByName(String deploymentId,
String resourceName)
A given resource specified by name and deployment id will be added
to the new deployment to re-deploy the given resource.
|
DeploymentBuilder |
addDeploymentResources(String deploymentId)
All existing resources contained by the given deployment
will be added to the new deployment to re-deploy them.
|
DeploymentBuilder |
addDeploymentResourcesById(String deploymentId,
List<String> resourceIds)
All given resources specified by id and deployment id will be added
to the new deployment to re-deploy the given resource.
|
DeploymentBuilder |
addDeploymentResourcesByName(String deploymentId,
List<String> resourceNames)
All given resources specified by name and deployment id will be added
to the new deployment to re-deploy the given resource.
|
DeploymentBuilder |
addInputStream(String resourceName,
InputStream inputStream) |
DeploymentBuilder |
addModelInstance(String resourceName,
BpmnModelInstance modelInstance)
Adds a BPMN model to the deployment.
|
DeploymentBuilder |
addModelInstance(String resourceName,
CmmnModelInstance modelInstance)
Adds a CMMN model to the deployment.
|
DeploymentBuilder |
addModelInstance(String resourceName,
DmnModelInstance modelInstance)
Adds a DMN model to the deployment.
|
DeploymentBuilder |
addString(String resourceName,
String text) |
DeploymentBuilder |
addZipInputStream(ZipInputStream zipInputStream) |
Deployment |
deploy()
Deploys all provided sources to the process engine and returns the created deployment.
|
DeploymentWithDefinitions |
deployWithResult()
Deploys all provided sources to the process engine and returns the created deployment with the deployed definitions.
|
DeploymentBuilder |
enableDuplicateFiltering()
If set, this deployment will be compared to any previous deployment.
|
DeploymentBuilder |
enableDuplicateFiltering(boolean deployChangedOnly)
Check the resources for duplicates in the set of previous deployments with
same deployment source.
|
DeploymentEntity |
getDeployment() |
Map<String,Set<String>> |
getDeploymentResourcesById() |
Map<String,Set<String>> |
getDeploymentResourcesByName() |
Set<String> |
getDeployments() |
String |
getNameFromDeployment() |
Date |
getProcessDefinitionsActivationDate() |
Collection<String> |
getResourceNames() |
boolean |
isDeployChangedOnly() |
boolean |
isDuplicateFilterEnabled() |
DeploymentBuilder |
name(String name)
Gives the deployment the given name.
|
DeploymentBuilder |
nameFromDeployment(String deploymentId)
Sets the deployment id to retrieve the deployment name from it.
|
DeploymentBuilder |
source(String source)
Sets the source of a deployment.
|
DeploymentBuilder |
tenantId(String tenantId)
Sets the tenant id of a deployment.
|
protected transient RepositoryServiceImpl repositoryService
protected DeploymentEntity deployment
protected boolean isDuplicateFilterEnabled
protected boolean deployChangedOnly
protected Date processDefinitionsActivationDate
protected String nameFromDeployment
public DeploymentBuilderImpl(RepositoryServiceImpl repositoryService)
public DeploymentBuilder addInputStream(String resourceName, InputStream inputStream)
addInputStream in interface DeploymentBuilderpublic DeploymentBuilder addClasspathResource(String resource)
addClasspathResource in interface DeploymentBuilderpublic DeploymentBuilder addString(String resourceName, String text)
addString in interface DeploymentBuilderpublic DeploymentBuilder addModelInstance(String resourceName, CmmnModelInstance modelInstance)
DeploymentBuilderaddModelInstance in interface DeploymentBuilderresourceName - resource name. See suffix requirements for resource names: DeploymentBuilder.modelInstance - model instancepublic DeploymentBuilder addModelInstance(String resourceName, BpmnModelInstance modelInstance)
DeploymentBuilderaddModelInstance in interface DeploymentBuilderresourceName - resource name. See suffix requirements for resource names: DeploymentBuilder.modelInstance - model instancepublic DeploymentBuilder addModelInstance(String resourceName, DmnModelInstance modelInstance)
DeploymentBuilderaddModelInstance in interface DeploymentBuilderresourceName - resource name. See suffix requirements for resource names: DeploymentBuilder.modelInstance - model instanceprotected DeploymentBuilder addBytes(String resourceName, byte[] bytes)
public DeploymentBuilder addZipInputStream(ZipInputStream zipInputStream)
addZipInputStream in interface DeploymentBuilderpublic DeploymentBuilder addDeploymentResources(String deploymentId)
DeploymentBuilderaddDeploymentResources in interface DeploymentBuilderpublic DeploymentBuilder addDeploymentResourceById(String deploymentId, String resourceId)
DeploymentBuilderaddDeploymentResourceById in interface DeploymentBuilderpublic DeploymentBuilder addDeploymentResourcesById(String deploymentId, List<String> resourceIds)
DeploymentBuilderaddDeploymentResourcesById in interface DeploymentBuilderpublic DeploymentBuilder addDeploymentResourceByName(String deploymentId, String resourceName)
DeploymentBuilderaddDeploymentResourceByName in interface DeploymentBuilderpublic DeploymentBuilder addDeploymentResourcesByName(String deploymentId, List<String> resourceNames)
DeploymentBuilderaddDeploymentResourcesByName in interface DeploymentBuilderpublic DeploymentBuilder name(String name)
DeploymentBuildername in interface DeploymentBuilderpublic DeploymentBuilder nameFromDeployment(String deploymentId)
DeploymentBuildernameFromDeployment in interface DeploymentBuilderpublic DeploymentBuilder enableDuplicateFiltering()
DeploymentBuilderIf set, this deployment will be compared to any previous deployment. This means that every (non-generated) resource will be compared with the provided resources of this deployment. If any resource of this deployment is different to the existing resources, all resources are re-deployed.
Deprecated: use DeploymentBuilder.enableDuplicateFiltering(boolean)
enableDuplicateFiltering in interface DeploymentBuilderpublic DeploymentBuilder enableDuplicateFiltering(boolean deployChangedOnly)
DeploymentBuilderdeployChangedOnly.enableDuplicateFiltering in interface DeploymentBuilderdeployChangedOnly - determines whether only those resources should be
deployed that have changed from the previous versions of the deployment.
If false, all of the resources are re-deployed if any resource differs.public DeploymentBuilder activateProcessDefinitionsOn(Date date)
DeploymentBuilderactivateProcessDefinitionsOn in interface DeploymentBuilderpublic DeploymentBuilder source(String source)
DeploymentBuilderSets the source of a deployment.
Furthermore if duplicate check of deployment resources is enabled (by calling
DeploymentBuilder.enableDuplicateFiltering(boolean)) then only previous deployments
with the same given source are considered to perform the duplicate check.
source in interface DeploymentBuilderpublic DeploymentBuilder tenantId(String tenantId)
DeploymentBuildertenantId in interface DeploymentBuilderpublic Deployment deploy()
DeploymentBuilderDeploys all provided sources to the process engine and returns the created deployment.
The returned Deployment instance has no information about the definitions, which are deployed
with that deployment. To access this information you can use the DeploymentBuilder.deployWithResult() method.
This method will return an instance of DeploymentWithDefinitions, which contains the information
about the successful deployed definitions.
deploy in interface DeploymentBuilderpublic DeploymentWithDefinitions deployWithResult()
DeploymentBuilderdeployWithResult in interface DeploymentBuilderpublic Collection<String> getResourceNames()
getResourceNames in interface DeploymentBuilderpublic DeploymentEntity getDeployment()
public boolean isDuplicateFilterEnabled()
public boolean isDeployChangedOnly()
public Date getProcessDefinitionsActivationDate()
public String getNameFromDeployment()
Copyright © 2021. All rights reserved.