Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ allprojects {
group = "io.flamingock"
version = "1.3.0-SNAPSHOT"

extra["generalUtilVersion"] = "1.5.1"
extra["generalUtilVersion"] = "1.5.2"
extra["templateApiVersion"] = "1.3.2"
extra["coreApiVersion"] = "1.3.1"
extra["sqlVersion"] = "1.2.0"
Expand Down
5 changes: 5 additions & 0 deletions cloud/flamingock-cloud-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ dependencies {

description = "Cloud Edition public API definitions"

val coreApiVersion: String by extra
dependencies {
api("io.flamingock:flamingock-core-api:${coreApiVersion}")
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2026 Flamingock (https://www.flamingock.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.cloud.api.error;

import java.util.Map;

public interface FlamingockError {

String getCode();

boolean getRecoverable();

String getPublicMessage();

String getInternalMessage();

Map<String, Object> getParameters();
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,39 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.internal.common.cloud.audit;
package io.flamingock.cloud.api.request;

import io.flamingock.api.RecoveryStrategy;
import io.flamingock.internal.common.core.audit.AuditTxType;

public class AuditEntryRequest {

private final String stageId;
private final String taskId;
private final String author;
private final long appliedAtEpochMillis;
private final Status state;
private final String className;
private final String methodName;
private final Object metadata;
private final long executionMillis;
private final String executionHostname;
private final String errorTrace;
private final ChangeType type;
private final AuditTxType txStrategy;
private final String targetSystemId;
private final String order;
private final RecoveryStrategy recoveryStrategy;
private final Boolean transactionFlag;
private String stageId;
private String taskId;
private String author;
private long appliedAtEpochMillis;
private AuditEntryStatus state;
private String className;
private String methodName;
private Object metadata;
private long executionMillis;
private String executionHostname;
private String errorTrace;
private ChangeType type;
private CloudAuditTxType txStrategy;
private String targetSystemId;
private String order;
private RecoveryStrategy recoveryStrategy;
private Boolean transactionFlag;
protected Boolean systemChange;//TODO not in server

public AuditEntryRequest() {
}

public AuditEntryRequest(String stageId,
String taskId,
String author,
long appliedAtEpochMillis,
Status state,
AuditEntryStatus state,
ChangeType type,
String className,
String methodName,
Expand All @@ -52,7 +54,7 @@ public AuditEntryRequest(String stageId,
Object metadata,
boolean systemChange,
String errorTrace,
AuditTxType txStrategy,
CloudAuditTxType txStrategy,
String targetSystemId,
String order,
RecoveryStrategy recoveryStrategy,
Expand Down Expand Up @@ -94,7 +96,7 @@ public long getAppliedAtEpochMillis() {
return appliedAtEpochMillis;
}

public Status getState() {
public AuditEntryStatus getState() {
return state;
}

Expand Down Expand Up @@ -130,7 +132,7 @@ public ChangeType getType() {
return type;
}

public AuditTxType getTxStrategy() {
public CloudAuditTxType getTxStrategy() {
return txStrategy;
}

Expand All @@ -152,7 +154,7 @@ public Boolean getTransactionFlag() {

public enum ChangeType {STANDARD_CODE, STANDARD_TEMPLATE, MONGOCK_EXECUTION, MONGOCK_BEFORE}

public enum Status {
public enum AuditEntryStatus {
STARTED,
APPLIED,
FAILED,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2025 Flamingock (https://www.flamingock.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.cloud.api.request;

public enum CloudAuditTxType {
NON_TX,
TX_SHARED, // SharedTx (Target system the same as the audit store)
TX_SEPARATE_WITH_MARKER, // SimpleTx (Target system is not the audit store). With marker
TX_SEPARATE_NO_MARKER; // SimpleTx (Target system is not the audit store). Without marker

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright 2026 Flamingock (https://www.flamingock.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.cloud.api.request;

public class LockAcquisitionRequest {

private long acquiredForMillis;
private String lastAcquisitionId;
private Long elapsedMillis;

public LockAcquisitionRequest() {
}

public LockAcquisitionRequest(long acquiredForMillis, String lastAcquisitionId, Long elapsedMillis) {
this.acquiredForMillis = acquiredForMillis;
this.lastAcquisitionId = lastAcquisitionId;
this.elapsedMillis = elapsedMillis;
}

public long getAcquiredForMillis() {
return acquiredForMillis;
}

public void setAcquiredForMillis(long acquiredForMillis) {
this.acquiredForMillis = acquiredForMillis;
}

public String getLastAcquisitionId() {
return lastAcquisitionId;
}

public void setLastAcquisitionId(String lastAcquisitionId) {
this.lastAcquisitionId = lastAcquisitionId;
}

public Long getElapsedMillis() {
return elapsedMillis;
}

public void setElapsedMillis(Long elapsedMillis) {
this.elapsedMillis = elapsedMillis;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.internal.common.cloud.lock;
package io.flamingock.cloud.api.request;

public class LockExtensionRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,35 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.internal.common.cloud.auth;
package io.flamingock.cloud.api.request;

public class AuthRequest {
public class TokenExchangeRequest {

private final String apiToken;
private final String serviceName;
private final String environmentName;
private String apiToken;
private String serviceName;
private String environmentName;

public AuthRequest(String apiToken, String serviceName, String environmentName) {
public TokenExchangeRequest() {
}

public TokenExchangeRequest(String apiToken, String serviceName, String environmentName) {
this.apiToken = apiToken;
this.serviceName = serviceName;
this.environmentName = environmentName;
}

public void setApiToken(String apiToken) {
this.apiToken = apiToken;
}

public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}

public void setEnvironmentName(String environmentName) {
this.environmentName = environmentName;
}

public String getApiToken() {
return apiToken;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* Copyright 2026 Flamingock (https://www.flamingock.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.cloud.api.response;

import io.flamingock.cloud.api.request.ClientSubmission;

import java.time.Instant;

public class ExecutionFullResponse {

private String executionId;
private long environmentId;
private long serviceId;
private String runnerId;
private Instant startedAt;
private ClientSubmission clientSubmission;
private PipelineResponse pipeline;

public ExecutionFullResponse() {
}

public ExecutionFullResponse(String executionId, long environmentId, long serviceId, String runnerId,
Instant startedAt, ClientSubmission clientSubmission, PipelineResponse pipeline) {
this.executionId = executionId;
this.environmentId = environmentId;
this.serviceId = serviceId;
this.runnerId = runnerId;
this.startedAt = startedAt;
this.clientSubmission = clientSubmission;
this.pipeline = pipeline;
}

public String getExecutionId() { return executionId; }
public void setExecutionId(String executionId) { this.executionId = executionId; }

public long getEnvironmentId() { return environmentId; }
public void setEnvironmentId(long environmentId) { this.environmentId = environmentId; }

public long getServiceId() { return serviceId; }
public void setServiceId(long serviceId) { this.serviceId = serviceId; }

public String getRunnerId() { return runnerId; }
public void setRunnerId(String runnerId) { this.runnerId = runnerId; }

public Instant getStartedAt() { return startedAt; }
public void setStartedAt(Instant startedAt) { this.startedAt = startedAt; }

public ClientSubmission getClientSubmission() { return clientSubmission; }
public void setClientSubmission(ClientSubmission clientSubmission) { this.clientSubmission = clientSubmission; }

public PipelineResponse getPipeline() { return pipeline; }
public void setPipeline(PipelineResponse pipeline) { this.pipeline = pipeline; }

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ExecutionFullResponse that = (ExecutionFullResponse) o;
return environmentId == that.environmentId && serviceId == that.serviceId
&& java.util.Objects.equals(executionId, that.executionId)
&& java.util.Objects.equals(runnerId, that.runnerId)
&& java.util.Objects.equals(startedAt, that.startedAt)
&& java.util.Objects.equals(clientSubmission, that.clientSubmission)
&& java.util.Objects.equals(pipeline, that.pipeline);
}

@Override
public int hashCode() {
return java.util.Objects.hash(executionId, environmentId, serviceId, runnerId, startedAt, clientSubmission, pipeline);
}
}
Loading
Loading