private boolean stale(StateChangeHandler handler, IntegrationDeployment integrationDeployment) { if (integrationDeployment == null || handler == null) { return true; } IntegrationDeploymentState desiredState = integrationDeployment.getTargetState(); return desiredState.equals(integrationDeployment.getCurrentState()); } }
public int getIntegrationVersion() { return deployment.getSpec().getVersion(); }
public IntegrationDeployment encrypt(IntegrationDeployment integrationDeployment) { return new IntegrationDeployment.Builder() .createFrom(integrationDeployment) .spec(new IntegrationDeploymentSpec.Builder().createFrom(integrationDeployment.getSpec()).steps(encrypt(integrationDeployment.getSpec().getSteps())).build()) .build(); }
private static IntegrationDeployment newDeployment(List<Step> steps) { return new IntegrationDeployment.Builder().spec(new IntegrationDeploymentSpec.Builder().steps(steps).build()).currentState(IntegrationDeploymentState.Active).build(); } }
public Integration encrypt(Integration integration) { return new Integration.Builder() .createFrom(integration) .steps(encrypt(integration.getSteps())) .build(); }
private static Integration newIntegration(List<Step> steps) { return new Integration.Builder() .id("test") .name("test") .steps(steps) .build(); } }
public String getName() { return integration.getName(); }
public StepKind getStepKind() { return step.getStepKind(); }
public Optional<String> getId() { return integration.getId(); }
public boolean isDraft() { return deployment.map(x -> x.getVersion() != integration.getVersion()).orElse(true); }
public Optional<String> getDescription() { return integration.getDescription(); }
public IntegrationDeploymentState getTargetState() { return deployment.getTargetState(); } }
public IntegrationDeploymentState getCurrentState() { return deployment.getCurrentState(); }
public Kind getKind() { return step.getKind(); }
public SortedSet<String> getTags() { return integration.getTags(); }
public Optional<String> getId() { return step.getId(); }
public long getUpdatedAt() { return deployment.getUpdatedAt(); }
public String getName() { return step.getName(); }
public int getVersion() { return integration.getVersion(); }
private boolean stale(StateChangeHandler handler, IntegrationDeployment integrationDeployment) { if (integrationDeployment == null || handler == null) { return true; } IntegrationDeploymentState desiredState = integrationDeployment.getTargetState(); return desiredState.equals(integrationDeployment.getCurrentState()); } }