Class ImmutableExecutionHistory.DetachedExecution.Builder
java.lang.Object
com.chutneytesting.server.core.domain.execution.history.ImmutableExecutionHistory.DetachedExecution.Builder
- Enclosing class:
- ImmutableExecutionHistory.DetachedExecution
@NotThreadSafe
public static final class ImmutableExecutionHistory.DetachedExecution.Builder
extends Object
Builds instances of type
DetachedExecution.
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 newDetachedExecution.campaignReport(CampaignExecutionReport campaignReport) Initializes the optional valuecampaignReportto campaignReport.campaignReport(Optional<? extends CampaignExecutionReport> campaignReport) Initializes the optional valuecampaignReportto campaignReport.Initializes the optional valuedatasetIdto datasetId.Initializes the optional valuedatasetIdto datasetId.datasetVersion(int datasetVersion) Initializes the optional valuedatasetVersionto datasetVersion.datasetVersion(Optional<Integer> datasetVersion) Initializes the optional valuedatasetVersionto datasetVersion.duration(long duration) Initializes the value for thedurationattribute.environment(String environment) Initializes the value for theenvironmentattribute.Initializes the optional valueerrorto error.Initializes the optional valueerrorto error.from(ExecutionHistory.DetachedExecution instance) Fill a builder with attribute values from the providedcom.chutneytesting.server.core.domain.execution.history.ExecutionHistory.DetachedExecutioninstance.from(ExecutionHistory.ExecutionProperties instance) Fill a builder with attribute values from the providedcom.chutneytesting.server.core.domain.execution.history.ExecutionHistory.ExecutionPropertiesinstance.from(com.chutneytesting.server.core.domain.execution.history.HavingReport instance) Fill a builder with attribute values from the providedcom.chutneytesting.server.core.domain.execution.history.HavingReportinstance.Initializes the optional valueinfoto info.Initializes the optional valueinfoto info.Initializes the value for thereportattribute.status(ServerReportStatus status) Initializes the value for thestatusattribute.testCaseTitle(String testCaseTitle) Initializes the value for thetestCaseTitleattribute.time(LocalDateTime time) Initializes the value for thetimeattribute.Initializes the value for theuserattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder from(com.chutneytesting.server.core.domain.execution.history.HavingReport instance) Fill a builder with attribute values from the providedcom.chutneytesting.server.core.domain.execution.history.HavingReportinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder from(ExecutionHistory.ExecutionProperties instance) Fill a builder with attribute values from the providedcom.chutneytesting.server.core.domain.execution.history.ExecutionHistory.ExecutionPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder from(ExecutionHistory.DetachedExecution instance) Fill a builder with attribute values from the providedcom.chutneytesting.server.core.domain.execution.history.ExecutionHistory.DetachedExecutioninstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
time
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder time(LocalDateTime time) Initializes the value for thetimeattribute.- Parameters:
time- The value for time- Returns:
thisbuilder for use in a chained invocation
-
duration
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder duration(long duration) Initializes the value for thedurationattribute.- Parameters:
duration- The value for duration- Returns:
thisbuilder for use in a chained invocation
-
status
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder status(ServerReportStatus status) Initializes the value for thestatusattribute.- Parameters:
status- The value for status- Returns:
thisbuilder for use in a chained invocation
-
info
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder info(String info) Initializes the optional valueinfoto info.- Parameters:
info- The value for info- Returns:
thisbuilder for chained invocation
-
info
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder info(Optional<String> info) Initializes the optional valueinfoto info.- Parameters:
info- The value for info- Returns:
thisbuilder for use in a chained invocation
-
error
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder error(String error) Initializes the optional valueerrorto error.- Parameters:
error- The value for error- Returns:
thisbuilder for chained invocation
-
error
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder error(Optional<String> error) Initializes the optional valueerrorto error.- Parameters:
error- The value for error- Returns:
thisbuilder for use in a chained invocation
-
testCaseTitle
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder testCaseTitle(String testCaseTitle) Initializes the value for thetestCaseTitleattribute.- Parameters:
testCaseTitle- The value for testCaseTitle- Returns:
thisbuilder for use in a chained invocation
-
environment
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder environment(String environment) Initializes the value for theenvironmentattribute.- Parameters:
environment- The value for environment- Returns:
thisbuilder for use in a chained invocation
-
datasetId
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder datasetId(String datasetId) Initializes the optional valuedatasetIdto datasetId.- Parameters:
datasetId- The value for datasetId- Returns:
thisbuilder for chained invocation
-
datasetId
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder datasetId(Optional<String> datasetId) Initializes the optional valuedatasetIdto datasetId.- Parameters:
datasetId- The value for datasetId- Returns:
thisbuilder for use in a chained invocation
-
datasetVersion
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder datasetVersion(int datasetVersion) Initializes the optional valuedatasetVersionto datasetVersion.- Parameters:
datasetVersion- The value for datasetVersion- Returns:
thisbuilder for chained invocation
-
datasetVersion
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder datasetVersion(Optional<Integer> datasetVersion) Initializes the optional valuedatasetVersionto datasetVersion.- Parameters:
datasetVersion- The value for datasetVersion- Returns:
thisbuilder for use in a chained invocation
-
user
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder user(String user) Initializes the value for theuserattribute.- Parameters:
user- The value for user- Returns:
thisbuilder for use in a chained invocation
-
campaignReport
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder campaignReport(CampaignExecutionReport campaignReport) Initializes the optional valuecampaignReportto campaignReport.- Parameters:
campaignReport- The value for campaignReport- Returns:
thisbuilder for chained invocation
-
campaignReport
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder campaignReport(Optional<? extends CampaignExecutionReport> campaignReport) Initializes the optional valuecampaignReportto campaignReport.- Parameters:
campaignReport- The value for campaignReport- Returns:
thisbuilder for use in a chained invocation
-
report
@CanIgnoreReturnValue public final ImmutableExecutionHistory.DetachedExecution.Builder report(String report) Initializes the value for thereportattribute.- Parameters:
report- The value for report- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newDetachedExecution.- Returns:
- An immutable instance of DetachedExecution
- Throws:
IllegalStateException- if any required attributes are missing
-