Class ImmutableProcess.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.deployment.ImmutableProcess.Builder
- Enclosing class:
- ImmutableProcess
Builds instances of type
ImmutableProcess.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableProcess.clear()Clear the builder to the initial state.final ImmutableProcess.BuilderFill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.deployment.Processinstance.final ImmutableProcess.Builderfrom(ProcessMetadataValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.deployment.ProcessMetadataValueinstance.final ImmutableProcess.BuilderwithBpmnProcessId(String bpmnProcessId) Initializes the value for thebpmnProcessIdattribute.final ImmutableProcess.BuilderwithChecksum(byte... checksum) Initializes the value for thechecksumattribute.final ImmutableProcess.BuilderwithDuplicate(boolean duplicate) Initializes the value for theduplicateattribute.final ImmutableProcess.BuilderwithProcessDefinitionKey(long processDefinitionKey) Initializes the value for theprocessDefinitionKeyattribute.final ImmutableProcess.BuilderwithResource(byte... resource) Initializes the value for theresourceattribute.final ImmutableProcess.BuilderwithResourceName(String resourceName) Initializes the value for theresourceNameattribute.final ImmutableProcess.BuilderwithVersion(int version) Initializes the value for theversionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.deployment.Processinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.deployment.ProcessMetadataValueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withBpmnProcessId
Initializes the value for thebpmnProcessIdattribute.- Parameters:
bpmnProcessId- The value for bpmnProcessId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withVersion
Initializes the value for theversionattribute.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
withProcessDefinitionKey
Initializes the value for theprocessDefinitionKeyattribute.- Parameters:
processDefinitionKey- The value for processDefinitionKey- Returns:
thisbuilder for use in a chained invocation
-
withResourceName
Initializes the value for theresourceNameattribute.- Parameters:
resourceName- The value for resourceName (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withChecksum
Initializes the value for thechecksumattribute.- Parameters:
checksum- The elements for checksum- Returns:
thisbuilder for use in a chained invocation
-
withDuplicate
Initializes the value for theduplicateattribute.- Parameters:
duplicate- The value for duplicate- Returns:
thisbuilder for use in a chained invocation
-
withResource
Initializes the value for theresourceattribute.- Parameters:
resource- The elements for resource- Returns:
thisbuilder for use in a chained invocation
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableProcess.- Returns:
- An immutable instance of Process
- Throws:
IllegalStateException- if any required attributes are missing
-