f, @Param("o") String o, @Param("s") String s);
-
- /**
- * Finds Tenants
- *  Finds Tenants with pagination params and filters - can order on `id` - can search
- * on `displayName` - can filter on `displayName` Warning: Since Bonita 7.12, multi-tenancy is deprecated
- * Note, this is equivalent to the other searchTenants
method,
- * but with the query parameters collected into a single Map parameter. This
- * is convenient for services with optional query parameters, especially when
- * used with the {@link SearchTenantsQueryParams} class that allows for
- * building up this map in a fluent style.
- *
- * @param queryParams Map of query parameters as name-value pairs
- * The following elements may be specified in the query map:
- *
- * - p - index of the page to display (required)
- * - c - maximum number of elements to retrieve (required)
- * - f - can filter on attributes with the format f={filter\\_name}={filter\\_value} with the name/value pair as url encoded string.
- * (optional)
- * - o - can order on attributes (optional)
- * - s - can search on attributes (optional)
- *
- * @return List<Tenant>
- * @deprecated
- */
- @Deprecated
- @RequestLine("GET /API/platform/tenant?p={p}&c={c}&f={f}&o={o}&s={s}")
- @Headers({
- "Accept: application/json",
- })
- List searchTenants(@QueryMap(encoded = true) SearchTenantsQueryParams queryParams);
-
- /**
- * Finds Tenants
- *  Finds Tenants with pagination params and filters - can order on `id` - can search
- * on `displayName` - can filter on `displayName` Warning: Since Bonita 7.12, multi-tenancy is deprecated
- * Note, this is equivalent to the other searchTenants
that receives the query parameters as a map,
- * but this one also exposes the Http response headers
- *
- * @param queryParams Map of query parameters as name-value pairs
- * The following elements may be specified in the query map:
- *
- * - p - index of the page to display (required)
- * - c - maximum number of elements to retrieve (required)
- * - f - can filter on attributes with the format f={filter\\_name}={filter\\_value} with the name/value pair as url encoded string.
- * (optional)
- * - o - can order on attributes (optional)
- * - s - can search on attributes (optional)
- *
- * @return List<Tenant>
- * @deprecated
- */
- @Deprecated
- @RequestLine("GET /API/platform/tenant?p={p}&c={c}&f={f}&o={o}&s={s}")
- @Headers({
- "Accept: application/json",
- })
- ApiResponse> searchTenantsWithHttpInfo(@QueryMap(encoded = true) SearchTenantsQueryParams queryParams);
-
- /**
- * A convenience class for generating query parameters for the
- * searchTenants
method in a fluent style.
- */
- public static class SearchTenantsQueryParams extends HashMap {
-
- public SearchTenantsQueryParams p(final Integer value) {
- put("p", EncodingUtils.encode(value));
- return this;
- }
-
- public SearchTenantsQueryParams c(final Integer value) {
- put("c", EncodingUtils.encode(value));
- return this;
- }
-
- public SearchTenantsQueryParams f(final List value) {
- put("f", EncodingUtils.encodeCollection(value, "multi"));
- return this;
- }
-
- public SearchTenantsQueryParams o(final String value) {
- put("o", EncodingUtils.encode(value));
- return this;
- }
-
- public SearchTenantsQueryParams s(final String value) {
- put("s", EncodingUtils.encode(value));
- return this;
- }
- }
-
- /**
- * Update the Tenant by ID
- *   Update a Tenant
- * Warning: Since Bonita 7.12, multi-tenancy is deprecated
- *
- * @param id ID of the Tenant to update. In Subscription edition, it is mandatory; not in Community edition, as there is only one tenant (required)
- * @param tenantUpdateRequest Partial Tenant description (required)
- * @deprecated
- */
- @Deprecated
- @RequestLine("PUT /API/platform/tenant/{id}")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- void updateTenantById(@Param("id") String id, TenantUpdateRequest tenantUpdateRequest);
-
- /**
- * Update the Tenant by ID
- * Similar to updateTenantById
but it also returns the http response headers .
- *   Update a Tenant
- * Warning: Since Bonita 7.12, multi-tenancy is deprecated
- *
- * @param id ID of the Tenant to update. In Subscription edition, it is mandatory; not in Community edition, as there is only one tenant (required)
- * @param tenantUpdateRequest Partial Tenant description (required)
- * @deprecated
- */
- @Deprecated
- @RequestLine("PUT /API/platform/tenant/{id}")
- @Headers({
- "Content-Type: application/json",
- "Accept: application/json",
- })
- ApiResponse updateTenantByIdWithHttpInfo(@Param("id") String id, TenantUpdateRequest tenantUpdateRequest);
-
-}
diff --git a/src/main/java/org/bonitasoft/web/client/api/UploadApi.java b/src/main/java/org/bonitasoft/web/client/api/UploadApi.java
index 9bfa9544..36710d44 100644
--- a/src/main/java/org/bonitasoft/web/client/api/UploadApi.java
+++ b/src/main/java/org/bonitasoft/web/client/api/UploadApi.java
@@ -96,8 +96,8 @@ public interface UploadApi extends ApiClient.Api {
/**
* Upload a file
- * Upload file. **NOTE:** If this file is a BDM zip, to do this, your tenant services need to be paused. In Enterprise editions, if you have an access control
- * file installed on your tenant, you need to delete it before installing or updating your BDM.
+ * Upload file. **NOTE:** If this file is a BDM zip, to do this, Maintenance mode needs to be enabled. In Enterprise editions, if you have an access control
+ * file installed, you need to delete it before installing or updating your BDM.
*
* @param file (optional)
* @return String
@@ -112,8 +112,8 @@ public interface UploadApi extends ApiClient.Api {
/**
* Upload a file
* Similar to uploadFile
but it also returns the http response headers .
- * Upload file. **NOTE:** If this file is a BDM zip, to do this, your tenant services need to be paused. In Enterprise editions, if you have an access control
- * file installed on your tenant, you need to delete it before installing or updating your BDM.
+ * Upload file. **NOTE:** If this file is a BDM zip, to do this, Maintenance mode needs to be enabled. In Enterprise editions, if you have an access control
+ * file installed, you need to delete it before installing or updating your BDM.
*
* @param file (optional)
* @return A ApiResponse that wraps the response boyd and the http headers.
diff --git a/src/main/java/org/bonitasoft/web/client/feign/BonitaFeignClient.java b/src/main/java/org/bonitasoft/web/client/feign/BonitaFeignClient.java
index 4c202961..4af4b3cc 100644
--- a/src/main/java/org/bonitasoft/web/client/feign/BonitaFeignClient.java
+++ b/src/main/java/org/bonitasoft/web/client/feign/BonitaFeignClient.java
@@ -62,13 +62,8 @@ public String getUrl() {
@Override
public Session login(String username, String password) {
- return login(username, password, DEFAULT_TENANT_ID);
- }
-
- @Override
- public Session login(String username, String password, String tenant) {
- log.info("Try login user {} on tenant {}", username, tenant);
- Session session = loginService.login(username, password, tenant);
+ log.info("Try login user {}", username);
+ Session session = loginService.login(username, password);
log.debug("User logged in: {}", session);
return session;
}
diff --git a/src/main/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginService.java b/src/main/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginService.java
index 711698f0..dd702d0a 100644
--- a/src/main/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginService.java
+++ b/src/main/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginService.java
@@ -21,7 +21,7 @@
import java.io.IOException;
import java.io.InputStream;
-import org.bonitasoft.web.client.api.PortalAuthenticationApi;
+import org.bonitasoft.web.client.api.AuthenticationApi;
import org.bonitasoft.web.client.api.SessionApi;
import org.bonitasoft.web.client.exception.ClientException;
import org.bonitasoft.web.client.exception.UnauthorizedException;
@@ -46,15 +46,15 @@ public class BonitaLoginService implements LoginService {
private final BonitaCookieAuth bonitaCookieAuth;
@Override
- public Session login(String username, String password, String tenant) {
- log.debug("Login with user '{}' on tenant '{}'...", username, tenant);
+ public Session login(String username, String password) {
+ log.debug("Login with user '{}'...", username);
boolean loginSucceeded;
int loginStatus;
String loginReason = "";
- final PortalAuthenticationApi portalAuthenticationApi = apiProvider.get(PortalAuthenticationApi.class);
- try (Response loginResponse = portalAuthenticationApi.login(username, password, tenant, "false", "")) {
+ final AuthenticationApi portalAuthenticationApi = apiProvider.get(AuthenticationApi.class);
+ try (Response loginResponse = portalAuthenticationApi.login(username, password, "false", "")) {
loginStatus = loginResponse.status();
loginSucceeded = (loginStatus == 200 || loginStatus == 204);
if (loginSucceeded) {
@@ -91,7 +91,7 @@ public Session getSession() {
@Override
public void logout() {
log.debug("Logout...");
- apiProvider.get(PortalAuthenticationApi.class).logout("false");
+ apiProvider.get(AuthenticationApi.class).logout("false");
bonitaCookieAuth.clearSessionCookie();
log.debug("Logout completed.");
}
diff --git a/src/main/java/org/bonitasoft/web/client/model/ActivityVariable.java b/src/main/java/org/bonitasoft/web/client/model/ActivityVariable.java
index c1807d46..15fb2b45 100644
--- a/src/main/java/org/bonitasoft/web/client/model/ActivityVariable.java
+++ b/src/main/java/org/bonitasoft/web/client/model/ActivityVariable.java
@@ -30,8 +30,6 @@
* concerned by this resource, not transient variables.
*/
@JsonPropertyOrder({
- ActivityVariable.JSON_PROPERTY_TENANT_ID,
- ActivityVariable.JSON_PROPERTY_TENANT_ID_STRING,
ActivityVariable.JSON_PROPERTY_ID,
ActivityVariable.JSON_PROPERTY_ID_STRING,
ActivityVariable.JSON_PROPERTY_NAME,
@@ -48,12 +46,6 @@ public class ActivityVariable implements Serializable {
private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_TENANT_ID = "tenantId";
- private String tenantId;
-
- public static final String JSON_PROPERTY_TENANT_ID_STRING = "tenantId_string";
- private String tenantIdString;
-
public static final String JSON_PROPERTY_ID = "id";
private String id;
@@ -123,56 +115,6 @@ public static ContainerTypeEnum fromValue(String value) {
public ActivityVariable() {
}
- public ActivityVariable tenantId(String tenantId) {
-
- this.tenantId = tenantId;
- return this;
- }
-
- /**
- * The ID of the tenant where the current user is logged in (technical information)
- *
- * @return tenantId
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_TENANT_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getTenantId() {
- return tenantId;
- }
-
- @JsonProperty(JSON_PROPERTY_TENANT_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTenantId(String tenantId) {
- this.tenantId = tenantId;
- }
-
- public ActivityVariable tenantIdString(String tenantIdString) {
-
- this.tenantIdString = tenantIdString;
- return this;
- }
-
- /**
- * number (since 7.0.1)
- *
- * @return tenantIdString
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_TENANT_ID_STRING)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getTenantIdString() {
- return tenantIdString;
- }
-
- @JsonProperty(JSON_PROPERTY_TENANT_ID_STRING)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTenantIdString(String tenantIdString) {
- this.tenantIdString = tenantIdString;
- }
-
public ActivityVariable id(String id) {
this.id = id;
@@ -433,9 +375,7 @@ public boolean equals(Object o) {
return false;
}
ActivityVariable activityVariable = (ActivityVariable) o;
- return Objects.equals(this.tenantId, activityVariable.tenantId) &&
- Objects.equals(this.tenantIdString, activityVariable.tenantIdString) &&
- Objects.equals(this.id, activityVariable.id) &&
+ return Objects.equals(this.id, activityVariable.id) &&
Objects.equals(this.idString, activityVariable.idString) &&
Objects.equals(this.name, activityVariable.name) &&
Objects.equals(this.description, activityVariable.description) &&
@@ -449,16 +389,14 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(tenantId, tenantIdString, id, idString, name, description, transientData, className,
- containerId, containerIdString, containerType, value);
+ return Objects.hash(id, idString, name, description, transientData, className, containerId, containerIdString,
+ containerType, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActivityVariable {\n");
- sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n");
- sb.append(" tenantIdString: ").append(toIndentedString(tenantIdString)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" idString: ").append(toIndentedString(idString)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
diff --git a/src/main/java/org/bonitasoft/web/client/model/ArchivedProcessInstanceComment.java b/src/main/java/org/bonitasoft/web/client/model/ArchivedProcessInstanceComment.java
index 0e5b0a12..be4ca763 100644
--- a/src/main/java/org/bonitasoft/web/client/model/ArchivedProcessInstanceComment.java
+++ b/src/main/java/org/bonitasoft/web/client/model/ArchivedProcessInstanceComment.java
@@ -29,7 +29,6 @@
@JsonPropertyOrder({
ArchivedProcessInstanceComment.JSON_PROPERTY_ID,
ArchivedProcessInstanceComment.JSON_PROPERTY_CONTENT,
- ArchivedProcessInstanceComment.JSON_PROPERTY_TENANT_ID,
ArchivedProcessInstanceComment.JSON_PROPERTY_PROCESS_INSTANCE_ID,
ArchivedProcessInstanceComment.JSON_PROPERTY_POST_DATE,
ArchivedProcessInstanceComment.JSON_PROPERTY_USER_ID,
@@ -46,9 +45,6 @@ public class ArchivedProcessInstanceComment implements Serializable {
public static final String JSON_PROPERTY_CONTENT = "content";
private String content;
- public static final String JSON_PROPERTY_TENANT_ID = "tenantId";
- private String tenantId;
-
public static final String JSON_PROPERTY_PROCESS_INSTANCE_ID = "processInstanceId";
private String processInstanceId;
@@ -114,31 +110,6 @@ public void setContent(String content) {
this.content = content;
}
- public ArchivedProcessInstanceComment tenantId(String tenantId) {
-
- this.tenantId = tenantId;
- return this;
- }
-
- /**
- * the id of the tenant the comment is associated to
- *
- * @return tenantId
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_TENANT_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getTenantId() {
- return tenantId;
- }
-
- @JsonProperty(JSON_PROPERTY_TENANT_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTenantId(String tenantId) {
- this.tenantId = tenantId;
- }
-
public ArchivedProcessInstanceComment processInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
@@ -250,7 +221,6 @@ public boolean equals(Object o) {
ArchivedProcessInstanceComment archivedProcessInstanceComment = (ArchivedProcessInstanceComment) o;
return Objects.equals(this.id, archivedProcessInstanceComment.id) &&
Objects.equals(this.content, archivedProcessInstanceComment.content) &&
- Objects.equals(this.tenantId, archivedProcessInstanceComment.tenantId) &&
Objects.equals(this.processInstanceId, archivedProcessInstanceComment.processInstanceId) &&
Objects.equals(this.postDate, archivedProcessInstanceComment.postDate) &&
Objects.equals(this.userId, archivedProcessInstanceComment.userId) &&
@@ -259,7 +229,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(id, content, tenantId, processInstanceId, postDate, userId, archivedDate);
+ return Objects.hash(id, content, processInstanceId, postDate, userId, archivedDate);
}
@Override
@@ -268,7 +238,6 @@ public String toString() {
sb.append("class ArchivedProcessInstanceComment {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
- sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n");
sb.append(" processInstanceId: ").append(toIndentedString(processInstanceId)).append("\n");
sb.append(" postDate: ").append(toIndentedString(postDate)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
diff --git a/src/main/java/org/bonitasoft/web/client/model/BDMAccessControl.java b/src/main/java/org/bonitasoft/web/client/model/BDMAccessControl.java
index 343562fc..8a461a0e 100644
--- a/src/main/java/org/bonitasoft/web/client/model/BDMAccessControl.java
+++ b/src/main/java/org/bonitasoft/web/client/model/BDMAccessControl.java
@@ -138,7 +138,7 @@ public BDMAccessControl lastUpdatedBy(String lastUpdatedBy) {
}
/**
- * If `lastUpdatedBy: -1` it means that the access control were last installed or updated by tenant_technical_user.
+ * If `lastUpdatedBy: -1` it means that the access control were last installed or updated by technical admin.
*
* @return lastUpdatedBy
*/
diff --git a/src/main/java/org/bonitasoft/web/client/model/Bdm.java b/src/main/java/org/bonitasoft/web/client/model/Bdm.java
index 2ce6fdd7..21ff3979 100644
--- a/src/main/java/org/bonitasoft/web/client/model/Bdm.java
+++ b/src/main/java/org/bonitasoft/web/client/model/Bdm.java
@@ -167,7 +167,7 @@ public Bdm lastUpdatedBy(String lastUpdatedBy) {
}
/**
- * This value is always -1 because only the tenant_technical_user can install BDM.
+ * This value is always -1 because only the technical admin can install BDM.
*
* @return lastUpdatedBy
*/
diff --git a/src/main/java/org/bonitasoft/web/client/model/Group.java b/src/main/java/org/bonitasoft/web/client/model/Group.java
index 8f753223..a0c4a2a9 100644
--- a/src/main/java/org/bonitasoft/web/client/model/Group.java
+++ b/src/main/java/org/bonitasoft/web/client/model/Group.java
@@ -287,7 +287,7 @@ public Group createdByUserId(String createdByUserId) {
}
/**
- * id of the user who created the group (-1 if the group was created by the tenant admin or by an organisation import)
+ * id of the user who created the group (-1 if the group was created by the technical admin or by an organisation import)
*
* @return createdByUserId
*/
diff --git a/src/main/java/org/bonitasoft/web/client/model/Membership.java b/src/main/java/org/bonitasoft/web/client/model/Membership.java
index c05c8934..1cea02dd 100644
--- a/src/main/java/org/bonitasoft/web/client/model/Membership.java
+++ b/src/main/java/org/bonitasoft/web/client/model/Membership.java
@@ -113,7 +113,7 @@ public Membership assignedByUserId(String assignedByUserId) {
}
/**
- * id of the user who created the membership (-1 if the role was created by the tenant admin or by an organisation import)
+ * id of the user who created the membership (-1 if the role was created by the technical admin or by an organisation import)
*
* @return assignedByUserId
*/
diff --git a/src/main/java/org/bonitasoft/web/client/model/ProcessInstanceComment.java b/src/main/java/org/bonitasoft/web/client/model/ProcessInstanceComment.java
index 4fda1d3c..a1bbd55f 100644
--- a/src/main/java/org/bonitasoft/web/client/model/ProcessInstanceComment.java
+++ b/src/main/java/org/bonitasoft/web/client/model/ProcessInstanceComment.java
@@ -29,7 +29,6 @@
@JsonPropertyOrder({
ProcessInstanceComment.JSON_PROPERTY_ID,
ProcessInstanceComment.JSON_PROPERTY_CONTENT,
- ProcessInstanceComment.JSON_PROPERTY_TENANT_ID,
ProcessInstanceComment.JSON_PROPERTY_PROCESS_INSTANCE_ID,
ProcessInstanceComment.JSON_PROPERTY_POST_DATE,
ProcessInstanceComment.JSON_PROPERTY_USER_ID
@@ -45,9 +44,6 @@ public class ProcessInstanceComment implements Serializable {
public static final String JSON_PROPERTY_CONTENT = "content";
private String content;
- public static final String JSON_PROPERTY_TENANT_ID = "tenantId";
- private String tenantId;
-
public static final String JSON_PROPERTY_PROCESS_INSTANCE_ID = "processInstanceId";
private String processInstanceId;
@@ -110,31 +106,6 @@ public void setContent(String content) {
this.content = content;
}
- public ProcessInstanceComment tenantId(String tenantId) {
-
- this.tenantId = tenantId;
- return this;
- }
-
- /**
- * the id of the tenant the comment is associated to
- *
- * @return tenantId
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_TENANT_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getTenantId() {
- return tenantId;
- }
-
- @JsonProperty(JSON_PROPERTY_TENANT_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTenantId(String tenantId) {
- this.tenantId = tenantId;
- }
-
public ProcessInstanceComment processInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
@@ -221,7 +192,6 @@ public boolean equals(Object o) {
ProcessInstanceComment processInstanceComment = (ProcessInstanceComment) o;
return Objects.equals(this.id, processInstanceComment.id) &&
Objects.equals(this.content, processInstanceComment.content) &&
- Objects.equals(this.tenantId, processInstanceComment.tenantId) &&
Objects.equals(this.processInstanceId, processInstanceComment.processInstanceId) &&
Objects.equals(this.postDate, processInstanceComment.postDate) &&
Objects.equals(this.userId, processInstanceComment.userId);
@@ -229,7 +199,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(id, content, tenantId, processInstanceId, postDate, userId);
+ return Objects.hash(id, content, processInstanceId, postDate, userId);
}
@Override
@@ -238,7 +208,6 @@ public String toString() {
sb.append("class ProcessInstanceComment {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
- sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n");
sb.append(" processInstanceId: ").append(toIndentedString(processInstanceId)).append("\n");
sb.append(" postDate: ").append(toIndentedString(postDate)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
diff --git a/src/main/java/org/bonitasoft/web/client/model/Role.java b/src/main/java/org/bonitasoft/web/client/model/Role.java
index 86f8eece..be991d6c 100644
--- a/src/main/java/org/bonitasoft/web/client/model/Role.java
+++ b/src/main/java/org/bonitasoft/web/client/model/Role.java
@@ -225,7 +225,7 @@ public Role createdByUserId(String createdByUserId) {
}
/**
- * Id of the user who created the role (-1 if the role was created by the tenant admin or by an organisation import)
+ * Id of the user who created the role (-1 if the role was created by the technical admin or by an organisation import)
*
* @return createdByUserId
*/
diff --git a/src/main/java/org/bonitasoft/web/client/model/SystemTenant.java b/src/main/java/org/bonitasoft/web/client/model/SystemTenant.java
deleted file mode 100644
index b977f28c..00000000
--- a/src/main/java/org/bonitasoft/web/client/model/SystemTenant.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Copyright (C) 2024-2023 BonitaSoft S.A.
- * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2.0 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.bonitasoft.web.client.model;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- *
- */
-@JsonPropertyOrder({
- SystemTenant.JSON_PROPERTY_ID,
- SystemTenant.JSON_PROPERTY_PAUSED
-})
-@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
-public class SystemTenant implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- public static final String JSON_PROPERTY_ID = "id";
- private String id;
-
- public static final String JSON_PROPERTY_PAUSED = "paused";
- private Boolean paused;
-
- public SystemTenant() {
- }
-
- public SystemTenant id(String id) {
-
- this.id = id;
- return this;
- }
-
- /**
- * system tenant id
- *
- * @return id
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getId() {
- return id;
- }
-
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setId(String id) {
- this.id = id;
- }
-
- public SystemTenant paused(Boolean paused) {
-
- this.paused = paused;
- return this;
- }
-
- /**
- * whether the system tenant is paused or not
- *
- * @return paused
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_PAUSED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public Boolean getPaused() {
- return paused;
- }
-
- @JsonProperty(JSON_PROPERTY_PAUSED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setPaused(Boolean paused) {
- this.paused = paused;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SystemTenant systemTenant = (SystemTenant) o;
- return Objects.equals(this.id, systemTenant.id) &&
- Objects.equals(this.paused, systemTenant.paused);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, paused);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SystemTenant {\n");
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" paused: ").append(toIndentedString(paused)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
diff --git a/src/main/java/org/bonitasoft/web/client/model/Tenant.java b/src/main/java/org/bonitasoft/web/client/model/Tenant.java
deleted file mode 100644
index ec4c564e..00000000
--- a/src/main/java/org/bonitasoft/web/client/model/Tenant.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/**
- * Copyright (C) 2024-2023 BonitaSoft S.A.
- * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2.0 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.bonitasoft.web.client.model;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Since Bonita 7.12, tenant management is deprecated
- *
- * @deprecated
- */
-@Deprecated
-@JsonPropertyOrder({
- Tenant.JSON_PROPERTY_ID,
- Tenant.JSON_PROPERTY_CREATION,
- Tenant.JSON_PROPERTY_ICON,
- Tenant.JSON_PROPERTY_NAME,
- Tenant.JSON_PROPERTY_DESCRIPTION,
- Tenant.JSON_PROPERTY_USERNAME,
- Tenant.JSON_PROPERTY_PASSWORD,
- Tenant.JSON_PROPERTY_STATE
-})
-@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
-public class Tenant implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- public static final String JSON_PROPERTY_ID = "id";
- private String id;
-
- public static final String JSON_PROPERTY_CREATION = "creation";
- private String creation;
-
- public static final String JSON_PROPERTY_ICON = "icon";
- private String icon;
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
-
- public static final String JSON_PROPERTY_DESCRIPTION = "description";
- private String description;
-
- public static final String JSON_PROPERTY_USERNAME = "username";
- private String username;
-
- public static final String JSON_PROPERTY_PASSWORD = "password";
- private String password;
-
- /**
- * the tenant state
- */
- public enum StateEnum {
-
- ACTIVATED("ACTIVATED"),
-
- DEACTIVATED("DEACTIVATED");
-
- private String value;
-
- StateEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static StateEnum fromValue(String value) {
- for (StateEnum b : StateEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- throw new IllegalArgumentException("Unexpected value '" + value + "'");
- }
- }
-
- public static final String JSON_PROPERTY_STATE = "state";
- private StateEnum state;
-
- public Tenant() {
- }
-
- public Tenant id(String id) {
-
- this.id = id;
- return this;
- }
-
- /**
- * id of the tenant
- *
- * @return id
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getId() {
- return id;
- }
-
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setId(String id) {
- this.id = id;
- }
-
- public Tenant creation(String creation) {
-
- this.creation = creation;
- return this;
- }
-
- /**
- * the creation date
- *
- * @return creation
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_CREATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getCreation() {
- return creation;
- }
-
- @JsonProperty(JSON_PROPERTY_CREATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCreation(String creation) {
- this.creation = creation;
- }
-
- public Tenant icon(String icon) {
-
- this.icon = icon;
- return this;
- }
-
- /**
- * the path of the icon
- *
- * @return icon
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_ICON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getIcon() {
- return icon;
- }
-
- @JsonProperty(JSON_PROPERTY_ICON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public Tenant name(String name) {
-
- this.name = name;
- return this;
- }
-
- /**
- * the name of the tenant
- *
- * @return name
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getName() {
- return name;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setName(String name) {
- this.name = name;
- }
-
- public Tenant description(String description) {
-
- this.description = description;
- return this;
- }
-
- /**
- * the description
- *
- * @return description
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_DESCRIPTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getDescription() {
- return description;
- }
-
- @JsonProperty(JSON_PROPERTY_DESCRIPTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Tenant username(String username) {
-
- this.username = username;
- return this;
- }
-
- /**
- * the username
- *
- * @return username
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_USERNAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getUsername() {
- return username;
- }
-
- @JsonProperty(JSON_PROPERTY_USERNAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUsername(String username) {
- this.username = username;
- }
-
- public Tenant password(String password) {
-
- this.password = password;
- return this;
- }
-
- /**
- * the password
- *
- * @return password
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_PASSWORD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getPassword() {
- return password;
- }
-
- @JsonProperty(JSON_PROPERTY_PASSWORD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setPassword(String password) {
- this.password = password;
- }
-
- public Tenant state(StateEnum state) {
-
- this.state = state;
- return this;
- }
-
- /**
- * the tenant state
- *
- * @return state
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_STATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public StateEnum getState() {
- return state;
- }
-
- @JsonProperty(JSON_PROPERTY_STATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setState(StateEnum state) {
- this.state = state;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- Tenant tenant = (Tenant) o;
- return Objects.equals(this.id, tenant.id) &&
- Objects.equals(this.creation, tenant.creation) &&
- Objects.equals(this.icon, tenant.icon) &&
- Objects.equals(this.name, tenant.name) &&
- Objects.equals(this.description, tenant.description) &&
- Objects.equals(this.username, tenant.username) &&
- Objects.equals(this.password, tenant.password) &&
- Objects.equals(this.state, tenant.state);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, creation, icon, name, description, username, password, state);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class Tenant {\n");
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" creation: ").append(toIndentedString(creation)).append("\n");
- sb.append(" icon: ").append(toIndentedString(icon)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" description: ").append(toIndentedString(description)).append("\n");
- sb.append(" username: ").append(toIndentedString(username)).append("\n");
- sb.append(" password: ").append("*").append("\n");
- sb.append(" state: ").append(toIndentedString(state)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
diff --git a/src/main/java/org/bonitasoft/web/client/model/TenantCreateRequest.java b/src/main/java/org/bonitasoft/web/client/model/TenantCreateRequest.java
deleted file mode 100644
index 2310f714..00000000
--- a/src/main/java/org/bonitasoft/web/client/model/TenantCreateRequest.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * Copyright (C) 2024-2023 BonitaSoft S.A.
- * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2.0 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.bonitasoft.web.client.model;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * Since Bonita 7.12, tenant creation is deprecated
- *
- * @deprecated
- */
-@Deprecated
-@JsonPropertyOrder({
- TenantCreateRequest.JSON_PROPERTY_NAME,
- TenantCreateRequest.JSON_PROPERTY_DESCRIPTION,
- TenantCreateRequest.JSON_PROPERTY_USERNAME,
- TenantCreateRequest.JSON_PROPERTY_PASSWORD
-})
-@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
-public class TenantCreateRequest implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
-
- public static final String JSON_PROPERTY_DESCRIPTION = "description";
- private String description;
-
- public static final String JSON_PROPERTY_USERNAME = "username";
- private String username;
-
- public static final String JSON_PROPERTY_PASSWORD = "password";
- private String password;
-
- public TenantCreateRequest() {
- }
-
- public TenantCreateRequest name(String name) {
-
- this.name = name;
- return this;
- }
-
- /**
- * the name of the tenant
- *
- * @return name
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getName() {
- return name;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setName(String name) {
- this.name = name;
- }
-
- public TenantCreateRequest description(String description) {
-
- this.description = description;
- return this;
- }
-
- /**
- * the description
- *
- * @return description
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_DESCRIPTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getDescription() {
- return description;
- }
-
- @JsonProperty(JSON_PROPERTY_DESCRIPTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDescription(String description) {
- this.description = description;
- }
-
- public TenantCreateRequest username(String username) {
-
- this.username = username;
- return this;
- }
-
- /**
- * the username
- *
- * @return username
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_USERNAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getUsername() {
- return username;
- }
-
- @JsonProperty(JSON_PROPERTY_USERNAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUsername(String username) {
- this.username = username;
- }
-
- public TenantCreateRequest password(String password) {
-
- this.password = password;
- return this;
- }
-
- /**
- * the password
- *
- * @return password
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_PASSWORD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getPassword() {
- return password;
- }
-
- @JsonProperty(JSON_PROPERTY_PASSWORD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setPassword(String password) {
- this.password = password;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- TenantCreateRequest tenantCreateRequest = (TenantCreateRequest) o;
- return Objects.equals(this.name, tenantCreateRequest.name) &&
- Objects.equals(this.description, tenantCreateRequest.description) &&
- Objects.equals(this.username, tenantCreateRequest.username) &&
- Objects.equals(this.password, tenantCreateRequest.password);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, description, username, password);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class TenantCreateRequest {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" description: ").append(toIndentedString(description)).append("\n");
- sb.append(" username: ").append(toIndentedString(username)).append("\n");
- sb.append(" password: ").append("*").append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
diff --git a/src/main/java/org/bonitasoft/web/client/model/TenantPauseRequest.java b/src/main/java/org/bonitasoft/web/client/model/TenantPauseRequest.java
deleted file mode 100644
index 077b67eb..00000000
--- a/src/main/java/org/bonitasoft/web/client/model/TenantPauseRequest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * Copyright (C) 2024-2023 BonitaSoft S.A.
- * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2.0 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.bonitasoft.web.client.model;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-/**
- * TenantPauseRequest
- */
-@JsonPropertyOrder({
- TenantPauseRequest.JSON_PROPERTY_PAUSED
-})
-@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
-public class TenantPauseRequest implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- public static final String JSON_PROPERTY_PAUSED = "paused";
- private String paused;
-
- public TenantPauseRequest() {
- }
-
- public TenantPauseRequest paused(String paused) {
-
- this.paused = paused;
- return this;
- }
-
- /**
- * wether the system tenant should be paused or not
- *
- * @return paused
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_PAUSED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getPaused() {
- return paused;
- }
-
- @JsonProperty(JSON_PROPERTY_PAUSED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setPaused(String paused) {
- this.paused = paused;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- TenantPauseRequest tenantPauseRequest = (TenantPauseRequest) o;
- return Objects.equals(this.paused, tenantPauseRequest.paused);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(paused);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class TenantPauseRequest {\n");
- sb.append(" paused: ").append(toIndentedString(paused)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
diff --git a/src/main/java/org/bonitasoft/web/client/model/TenantUpdateRequest.java b/src/main/java/org/bonitasoft/web/client/model/TenantUpdateRequest.java
deleted file mode 100644
index acecd6ac..00000000
--- a/src/main/java/org/bonitasoft/web/client/model/TenantUpdateRequest.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
- * Copyright (C) 2024-2023 BonitaSoft S.A.
- * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2.0 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.bonitasoft.web.client.model;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Since Bonita 7.12, tenant update is deprecated
- *
- * @deprecated
- */
-@Deprecated
-@JsonPropertyOrder({
- TenantUpdateRequest.JSON_PROPERTY_NAME,
- TenantUpdateRequest.JSON_PROPERTY_DESCRIPTION,
- TenantUpdateRequest.JSON_PROPERTY_USERNAME,
- TenantUpdateRequest.JSON_PROPERTY_PASSWORD,
- TenantUpdateRequest.JSON_PROPERTY_ICON,
- TenantUpdateRequest.JSON_PROPERTY_STATE
-})
-@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
-public class TenantUpdateRequest implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
-
- public static final String JSON_PROPERTY_DESCRIPTION = "description";
- private String description;
-
- public static final String JSON_PROPERTY_USERNAME = "username";
- private String username;
-
- public static final String JSON_PROPERTY_PASSWORD = "password";
- private String password;
-
- public static final String JSON_PROPERTY_ICON = "icon";
- private String icon;
-
- /**
- * the tenant state
- */
- public enum StateEnum {
-
- ACTIVATED("ACTIVATED"),
-
- DEACTIVATED("DEACTIVATED");
-
- private String value;
-
- StateEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static StateEnum fromValue(String value) {
- for (StateEnum b : StateEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- throw new IllegalArgumentException("Unexpected value '" + value + "'");
- }
- }
-
- public static final String JSON_PROPERTY_STATE = "state";
- private StateEnum state;
-
- public TenantUpdateRequest() {
- }
-
- public TenantUpdateRequest name(String name) {
-
- this.name = name;
- return this;
- }
-
- /**
- * the name of the tenant
- *
- * @return name
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getName() {
- return name;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setName(String name) {
- this.name = name;
- }
-
- public TenantUpdateRequest description(String description) {
-
- this.description = description;
- return this;
- }
-
- /**
- * the description
- *
- * @return description
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_DESCRIPTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getDescription() {
- return description;
- }
-
- @JsonProperty(JSON_PROPERTY_DESCRIPTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDescription(String description) {
- this.description = description;
- }
-
- public TenantUpdateRequest username(String username) {
-
- this.username = username;
- return this;
- }
-
- /**
- * the username
- *
- * @return username
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_USERNAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getUsername() {
- return username;
- }
-
- @JsonProperty(JSON_PROPERTY_USERNAME)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUsername(String username) {
- this.username = username;
- }
-
- public TenantUpdateRequest password(String password) {
-
- this.password = password;
- return this;
- }
-
- /**
- * the password
- *
- * @return password
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_PASSWORD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getPassword() {
- return password;
- }
-
- @JsonProperty(JSON_PROPERTY_PASSWORD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setPassword(String password) {
- this.password = password;
- }
-
- public TenantUpdateRequest icon(String icon) {
-
- this.icon = icon;
- return this;
- }
-
- /**
- * the path of the icon
- *
- * @return icon
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_ICON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public String getIcon() {
- return icon;
- }
-
- @JsonProperty(JSON_PROPERTY_ICON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public TenantUpdateRequest state(StateEnum state) {
-
- this.state = state;
- return this;
- }
-
- /**
- * the tenant state
- *
- * @return state
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_STATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
-
- public StateEnum getState() {
- return state;
- }
-
- @JsonProperty(JSON_PROPERTY_STATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setState(StateEnum state) {
- this.state = state;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- TenantUpdateRequest tenantUpdateRequest = (TenantUpdateRequest) o;
- return Objects.equals(this.name, tenantUpdateRequest.name) &&
- Objects.equals(this.description, tenantUpdateRequest.description) &&
- Objects.equals(this.username, tenantUpdateRequest.username) &&
- Objects.equals(this.password, tenantUpdateRequest.password) &&
- Objects.equals(this.icon, tenantUpdateRequest.icon) &&
- Objects.equals(this.state, tenantUpdateRequest.state);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, description, username, password, icon, state);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class TenantUpdateRequest {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" description: ").append(toIndentedString(description)).append("\n");
- sb.append(" username: ").append(toIndentedString(username)).append("\n");
- sb.append(" password: ").append("*").append("\n");
- sb.append(" icon: ").append(toIndentedString(icon)).append("\n");
- sb.append(" state: ").append(toIndentedString(state)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
diff --git a/src/main/java/org/bonitasoft/web/client/services/LoginService.java b/src/main/java/org/bonitasoft/web/client/services/LoginService.java
index 1c281265..b263fdff 100644
--- a/src/main/java/org/bonitasoft/web/client/services/LoginService.java
+++ b/src/main/java/org/bonitasoft/web/client/services/LoginService.java
@@ -20,7 +20,7 @@
public interface LoginService {
- Session login(String username, String password, String tenant);
+ Session login(String username, String password);
Session getSession();
diff --git a/src/main/java/org/bonitasoft/web/client/services/SystemService.java b/src/main/java/org/bonitasoft/web/client/services/SystemService.java
index 4aff497a..d447a27d 100644
--- a/src/main/java/org/bonitasoft/web/client/services/SystemService.java
+++ b/src/main/java/org/bonitasoft/web/client/services/SystemService.java
@@ -20,7 +20,7 @@
public interface SystemService {
- boolean isTenantPaused();
+ boolean isMaintenanceModeEnabled();
License getLicense();
diff --git a/src/main/java/org/bonitasoft/web/client/services/impl/DefaultBdmService.java b/src/main/java/org/bonitasoft/web/client/services/impl/DefaultBdmService.java
index 637e0006..de4bd4c5 100644
--- a/src/main/java/org/bonitasoft/web/client/services/impl/DefaultBdmService.java
+++ b/src/main/java/org/bonitasoft/web/client/services/impl/DefaultBdmService.java
@@ -21,22 +21,12 @@
import java.io.File;
import java.util.List;
-import org.bonitasoft.web.client.BonitaClient;
-import org.bonitasoft.web.client.api.BdmAccessControlApi;
-import org.bonitasoft.web.client.api.BdmApi;
-import org.bonitasoft.web.client.api.BusinessDataQueryApi;
+import org.bonitasoft.web.client.api.*;
import org.bonitasoft.web.client.api.BusinessDataQueryApi.SearchBusinessDataQueryParams;
-import org.bonitasoft.web.client.api.SystemTenantApi;
-import org.bonitasoft.web.client.api.UploadApi;
import org.bonitasoft.web.client.exception.ClientException;
import org.bonitasoft.web.client.exception.LicenseException;
import org.bonitasoft.web.client.feign.ApiProvider;
-import org.bonitasoft.web.client.model.BDMAccessControl;
-import org.bonitasoft.web.client.model.BDMInstallRequest;
-import org.bonitasoft.web.client.model.Bdm;
-import org.bonitasoft.web.client.model.BusinessData;
-import org.bonitasoft.web.client.model.TenantPauseRequest;
-import org.bonitasoft.web.client.model.TenantResourceState;
+import org.bonitasoft.web.client.model.*;
import org.bonitasoft.web.client.services.BdmService;
import org.bonitasoft.web.client.services.impl.base.AbstractService;
import org.bonitasoft.web.client.services.impl.base.ClientContext;
@@ -60,12 +50,11 @@ public DefaultBdmService(
public void importBDM(File bdm) {
log.info("Importing Business Data Model file: {}", bdm.getName());
- // Pause tenant
- log.debug("Pausing tenant ...");
- SystemTenantApi tenantApi = apiProvider.get(SystemTenantApi.class);
- tenantApi.updateSystemTenant(
- BonitaClient.DEFAULT_TENANT_ID, new TenantPauseRequest().paused("true"));
- log.debug("Tenant paused");
+ log.debug("Enabling Maintenance mode ...");
+ MaintenanceApi maintenanceApi = apiProvider.get(MaintenanceApi.class);
+ maintenanceApi.updateMaintenanceDetails(
+ new MaintenanceDetails().maintenanceState(MaintenanceDetails.MaintenanceStateEnum.ENABLED));
+ log.debug("Maintenance mode enabled");
deleteBdmAccessControlIfNeeded();
@@ -77,11 +66,10 @@ public void importBDM(File bdm) {
bdmApi.installBDM(new BDMInstallRequest().fileUpload(uploadedFileName));
log.debug("BDM file installed");
- // Restart tenant
- log.debug("Resuming tenant ...");
- tenantApi.updateSystemTenant(
- BonitaClient.DEFAULT_TENANT_ID, new TenantPauseRequest().paused("false"));
- log.debug("Tenant Resumed");
+ log.debug("Disabling Maintenance mode ...");
+ maintenanceApi.updateMaintenanceDetails(
+ new MaintenanceDetails().maintenanceState(MaintenanceDetails.MaintenanceStateEnum.DISABLED));
+ log.debug("Maintenance mode disabled");
log.info("Business Data Model deployed successfully.");
}
diff --git a/src/main/java/org/bonitasoft/web/client/services/impl/DefaultSystemService.java b/src/main/java/org/bonitasoft/web/client/services/impl/DefaultSystemService.java
index f9863107..4a30fe87 100644
--- a/src/main/java/org/bonitasoft/web/client/services/impl/DefaultSystemService.java
+++ b/src/main/java/org/bonitasoft/web/client/services/impl/DefaultSystemService.java
@@ -17,11 +17,10 @@
package org.bonitasoft.web.client.services.impl;
import static java.util.Optional.ofNullable;
-import static org.bonitasoft.web.client.BonitaClient.DEFAULT_TENANT_ID;
-import org.bonitasoft.web.client.api.SystemTenantApi;
+import org.bonitasoft.web.client.api.MaintenanceApi;
import org.bonitasoft.web.client.feign.ApiProvider;
-import org.bonitasoft.web.client.model.SystemTenant;
+import org.bonitasoft.web.client.model.MaintenanceDetails;
import org.bonitasoft.web.client.services.SystemService;
import org.bonitasoft.web.client.services.impl.base.AbstractService;
import org.bonitasoft.web.client.services.impl.base.ClientContext;
@@ -39,12 +38,13 @@ public DefaultSystemService(
}
@Override
- public boolean isTenantPaused() {
- log.info("Check if tenant is paused");
- SystemTenantApi tenantApi = apiProvider.get(SystemTenantApi.class);
- final SystemTenant systemTenant = tenantApi.getSystemTenant(DEFAULT_TENANT_ID);
- boolean paused = ofNullable(systemTenant.getPaused()).orElse(false);
- log.debug("Tenant paused: {}", paused);
- return paused;
+ public boolean isMaintenanceModeEnabled() {
+ log.info("Check if Maintenance mode is enabled");
+ MaintenanceApi maintenanceApi = apiProvider.get(MaintenanceApi.class);
+ final MaintenanceDetails maintenanceDetails = maintenanceApi.getMaintenanceDetails();
+ MaintenanceDetails.MaintenanceStateEnum maintenanceState = ofNullable(maintenanceDetails.getMaintenanceState())
+ .orElse(MaintenanceDetails.MaintenanceStateEnum.DISABLED);
+ log.debug("Maintenance State: {}", maintenanceState);
+ return MaintenanceDetails.MaintenanceStateEnum.ENABLED == maintenanceState;
}
}
diff --git a/src/test/java/org/bonitasoft/web/client/BonitaClientIT.java b/src/test/java/org/bonitasoft/web/client/BonitaClientIT.java
index 9acad2b1..9bc99483 100644
--- a/src/test/java/org/bonitasoft/web/client/BonitaClientIT.java
+++ b/src/test/java/org/bonitasoft/web/client/BonitaClientIT.java
@@ -105,7 +105,7 @@ class BonitaClientIT {
private static final BonitaContainer extends BonitaContainer>> BONITA_CONTAINER = new BonitaContainer<>(
BONITA_DOCKER_IMAGE);
- private static final Semver _10_2 = new Semver("10.2", SemverType.LOOSE);
+ private static final Semver _10_2 = new Semver("10.2.0", SemverType.LOOSE);
private BonitaClient bonitaClient;
diff --git a/src/test/java/org/bonitasoft/web/client/feign/BonitaClientTest.java b/src/test/java/org/bonitasoft/web/client/feign/BonitaClientTest.java
index 55392e92..7d2d0f26 100644
--- a/src/test/java/org/bonitasoft/web/client/feign/BonitaClientTest.java
+++ b/src/test/java/org/bonitasoft/web/client/feign/BonitaClientTest.java
@@ -21,7 +21,6 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
-import org.bonitasoft.web.client.BonitaClient;
import org.bonitasoft.web.client.services.ApplicationService;
import org.bonitasoft.web.client.services.BdmService;
import org.bonitasoft.web.client.services.LoginService;
@@ -63,7 +62,7 @@ void mocks_are_in_place() {
}
@Test
- void when_no_tenant_provided_should_log_with_default_tenant() {
+ void should_log_in() {
// Given
client = spy(client);
String username = "test";
@@ -73,8 +72,7 @@ void when_no_tenant_provided_should_log_with_default_tenant() {
client.login(username, password);
// Then
- verify(client).login(username, password, BonitaClient.DEFAULT_TENANT_ID);
- verify(loginService).login(username, password, BonitaClient.DEFAULT_TENANT_ID);
+ verify(loginService).login(username, password);
}
@Test
diff --git a/src/test/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginServiceTest.java b/src/test/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginServiceTest.java
index 7ecf5069..9ce54de1 100644
--- a/src/test/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginServiceTest.java
+++ b/src/test/java/org/bonitasoft/web/client/invoker/auth/BonitaLoginServiceTest.java
@@ -19,13 +19,11 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.bonitasoft.web.client.TestUtils.mockResponseBuilder;
import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.lenient;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
import java.nio.charset.StandardCharsets;
-import org.bonitasoft.web.client.api.PortalAuthenticationApi;
+import org.bonitasoft.web.client.api.AuthenticationApi;
import org.bonitasoft.web.client.api.SessionApi;
import org.bonitasoft.web.client.feign.ApiProvider;
import org.bonitasoft.web.client.model.Session;
@@ -50,14 +48,14 @@ class BonitaLoginServiceTest {
@Mock
private BonitaCookieAuth bonitaCookieAuth;
@Mock
- private PortalAuthenticationApi authenticationApi;
+ private AuthenticationApi authenticationApi;
@Mock
private SessionApi sessionApi;
@BeforeEach
void setUp() {
loginService = new BonitaLoginService(apiProvider, objectMapper, bonitaCookieAuth);
- lenient().when(apiProvider.get(PortalAuthenticationApi.class)).thenReturn(authenticationApi);
+ lenient().when(apiProvider.get(AuthenticationApi.class)).thenReturn(authenticationApi);
lenient().when(apiProvider.get(SessionApi.class)).thenReturn(sessionApi);
}
@@ -76,7 +74,7 @@ void login_should_work_with_204_response() throws Exception {
final String username = "someone";
final Response loginResponse = mockResponseBuilder().status(204).build();
- when(authenticationApi.login(anyString(), anyString(), anyString(), anyString(), anyString()))
+ when(authenticationApi.login(anyString(), anyString(), anyString(), anyString()))
.thenReturn(loginResponse);
final Response sessionResponse = mockResponseBuilder()
@@ -86,30 +84,7 @@ void login_should_work_with_204_response() throws Exception {
when(sessionApi.getSession()).thenReturn(sessionResponse);
// When
- final Session session = loginService.login(username, "myPass", "1");
-
- // Then
- assertThat(session).isNotNull();
- assertThat(session.getUserName()).isEqualTo(username);
- }
-
- @Test
- void login_should_work_with_200_response() throws Exception {
- // Given
- final String username = "someone";
-
- final Response loginResponse = mockResponseBuilder().status(200).build();
- when(authenticationApi.login(anyString(), anyString(), anyString(), anyString(), anyString()))
- .thenReturn(loginResponse);
-
- final Response sessionResponse = mockResponseBuilder()
- .status(200)
- .body(objectMapper.writeValueAsBytes(new Session().userName(username)))
- .build();
- when(sessionApi.getSession()).thenReturn(sessionResponse);
-
- // When
- final Session session = loginService.login(username, "myPass", "1");
+ final Session session = loginService.login(username, "myPass");
// Then
assertThat(session).isNotNull();
diff --git a/src/test/java/org/bonitasoft/web/client/services/impl/DefaultBdmServiceTest.java b/src/test/java/org/bonitasoft/web/client/services/impl/DefaultBdmServiceTest.java
index f61e2d46..18bd3137 100644
--- a/src/test/java/org/bonitasoft/web/client/services/impl/DefaultBdmServiceTest.java
+++ b/src/test/java/org/bonitasoft/web/client/services/impl/DefaultBdmServiceTest.java
@@ -19,25 +19,15 @@
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.bonitasoft.web.client.TestUtils.getClasspathFile;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.lenient;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.*;
import java.io.File;
-import org.bonitasoft.web.client.BonitaClient;
-import org.bonitasoft.web.client.api.BdmAccessControlApi;
-import org.bonitasoft.web.client.api.BdmApi;
-import org.bonitasoft.web.client.api.BusinessDataQueryApi;
-import org.bonitasoft.web.client.api.LicenseApi;
-import org.bonitasoft.web.client.api.SystemTenantApi;
-import org.bonitasoft.web.client.api.UploadApi;
+import org.bonitasoft.web.client.api.*;
import org.bonitasoft.web.client.exception.LicenseException;
import org.bonitasoft.web.client.feign.ApiProvider;
import org.bonitasoft.web.client.model.BDMAccessControl;
-import org.bonitasoft.web.client.model.TenantPauseRequest;
+import org.bonitasoft.web.client.model.MaintenanceDetails;
import org.bonitasoft.web.client.model.TenantResourceState;
import org.bonitasoft.web.client.services.impl.base.CachingClientContext;
import org.bonitasoft.web.client.services.impl.base.ClientContext;
@@ -72,7 +62,7 @@ class DefaultBdmServiceTest {
private UploadApi uploadApi;
@Mock
- private SystemTenantApi tenantApi;
+ private MaintenanceApi maintenanceApi;
@Mock
private LicenseApi licenseApi;
@@ -87,7 +77,7 @@ void setUp() {
new DefaultBdmService(clientContext, apiProvider, new BdmResponseConverter(objectMapper, apiProvider)));
lenient().when(apiProvider.get(LicenseApi.class)).thenReturn(licenseApi);
- lenient().when(apiProvider.get(SystemTenantApi.class)).thenReturn(tenantApi);
+ lenient().when(apiProvider.get(MaintenanceApi.class)).thenReturn(maintenanceApi);
lenient().when(apiProvider.get(BdmApi.class)).thenReturn(bdmApi);
lenient().when(apiProvider.get(BusinessDataQueryApi.class)).thenReturn(bdmQueryApi);
lenient().when(apiProvider.get(UploadApi.class)).thenReturn(uploadApi);
@@ -105,18 +95,18 @@ void should_import_bdm() throws Exception {
bdmService.importBDM(bdmFile);
// Then
- // tenant paused
- verify(tenantApi)
- .updateSystemTenant(
- BonitaClient.DEFAULT_TENANT_ID, new TenantPauseRequest().paused("true"));
+ // maintenance mode
+ verify(maintenanceApi)
+ .updateMaintenanceDetails(
+ new MaintenanceDetails().maintenanceState(MaintenanceDetails.MaintenanceStateEnum.ENABLED));
verify(bdmService).deleteBdmAccessControlIfNeeded();
// bdm installed
verify(uploadApi).uploadFile(any());
verify(bdmApi).installBDM(any());
- // tenant restarted
- verify(tenantApi)
- .updateSystemTenant(
- BonitaClient.DEFAULT_TENANT_ID, new TenantPauseRequest().paused("false"));
+ // maintenance mode disabled
+ verify(maintenanceApi)
+ .updateMaintenanceDetails(
+ new MaintenanceDetails().maintenanceState(MaintenanceDetails.MaintenanceStateEnum.DISABLED));
}
@Test
diff --git a/src/test/java/org/bonitasoft/web/client/services/impl/DefaultSystemServiceTest.java b/src/test/java/org/bonitasoft/web/client/services/impl/DefaultSystemServiceTest.java
index 77af4edd..c64a02eb 100644
--- a/src/test/java/org/bonitasoft/web/client/services/impl/DefaultSystemServiceTest.java
+++ b/src/test/java/org/bonitasoft/web/client/services/impl/DefaultSystemServiceTest.java
@@ -17,13 +17,12 @@
package org.bonitasoft.web.client.services.impl;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.bonitasoft.web.client.BonitaClient.DEFAULT_TENANT_ID;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import org.bonitasoft.web.client.api.SystemTenantApi;
+import org.bonitasoft.web.client.api.MaintenanceApi;
import org.bonitasoft.web.client.feign.ApiProvider;
-import org.bonitasoft.web.client.model.SystemTenant;
+import org.bonitasoft.web.client.model.MaintenanceDetails;
import org.bonitasoft.web.client.services.impl.base.CachingClientContext;
import org.bonitasoft.web.client.services.impl.base.ClientContext;
import org.junit.jupiter.api.BeforeEach;
@@ -52,28 +51,28 @@ void setUp() {
}
@Test
- void should_return_tenant_status() {
+ void should_return_maintenance_mode() {
// Given
- final SystemTenantApi systemTenantApi = mock(SystemTenantApi.class);
- when(apiProvider.get(SystemTenantApi.class)).thenReturn(systemTenantApi);
- when(systemTenantApi.getSystemTenant(DEFAULT_TENANT_ID))
- .thenReturn(new SystemTenant().paused(true));
+ final MaintenanceApi maintenanceApi = mock(MaintenanceApi.class);
+ when(apiProvider.get(MaintenanceApi.class)).thenReturn(maintenanceApi);
+ when(maintenanceApi.getMaintenanceDetails())
+ .thenReturn(new MaintenanceDetails().maintenanceState(MaintenanceDetails.MaintenanceStateEnum.ENABLED));
// When
- final boolean tenantPaused = systemService.isTenantPaused();
+ final boolean isMaintenanceModeEnabled = systemService.isMaintenanceModeEnabled();
// Then
- assertThat(tenantPaused).isTrue();
+ assertThat(isMaintenanceModeEnabled).isTrue();
}
@Test
- void should_return_false_if_tenant_status_not_set() {
+ void should_return_false_if_maintenance_mode_not_set() {
// Given
- final SystemTenantApi systemTenantApi = mock(SystemTenantApi.class);
- when(apiProvider.get(SystemTenantApi.class)).thenReturn(systemTenantApi);
- when(systemTenantApi.getSystemTenant(DEFAULT_TENANT_ID))
- .thenReturn(new SystemTenant().paused(null));
+ final MaintenanceApi maintenanceApi = mock(MaintenanceApi.class);
+ when(apiProvider.get(MaintenanceApi.class)).thenReturn(maintenanceApi);
+ when(maintenanceApi.getMaintenanceDetails())
+ .thenReturn(new MaintenanceDetails().maintenanceState(null));
// When
- final boolean tenantPaused = systemService.isTenantPaused();
+ final boolean isMaintenanceModeEnabled = systemService.isMaintenanceModeEnabled();
// Then
- assertThat(tenantPaused).isFalse();
+ assertThat(isMaintenanceModeEnabled).isFalse();
}
}
diff --git a/src/test/resources/application.xml b/src/test/resources/application.xml
index 93bfcdb7..a1ed35a5 100644
--- a/src/test/resources/application.xml
+++ b/src/test/resources/application.xml
@@ -1,5 +1,5 @@
-
+
+
Date: Fri, 21 Feb 2025 16:19:24 +0100
Subject: [PATCH 2/2] update default container version for tests
---
.../java/org/bonitasoft/testcontainers/BonitaContainer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/org/bonitasoft/testcontainers/BonitaContainer.java b/src/test/java/org/bonitasoft/testcontainers/BonitaContainer.java
index f638eaa7..23c0c394 100644
--- a/src/test/java/org/bonitasoft/testcontainers/BonitaContainer.java
+++ b/src/test/java/org/bonitasoft/testcontainers/BonitaContainer.java
@@ -46,7 +46,7 @@ public class BonitaContainer> extends Generic
public static final String BONITA_CONTEXT_PATH = "bonita.context-path";
public static final String BONITA_CONTEXT_PATH_DEFAULT = "/bonita";
public static final String BONITA_VERSION = "bonita.version";
- public static final String BONITA_VERSION_DEFAULT = "7.15";
+ public static final String BONITA_VERSION_DEFAULT = "9.0";
public static final String BONITA_IMAGE_NAME = "bonita.image.name";
public static final String BONITA_IMAGE_NAME_DEFAULT = "bonita";
public static final String BONITA_IMAGE_PREFIX = "bonita.image.prefix";