From 2ee5ea874aa34b118d5ebc97e3afba4a8946105b Mon Sep 17 00:00:00 2001 From: Madhavi Gayathri Date: Thu, 19 Sep 2024 11:37:26 +0530 Subject: [PATCH] Add app_version field to get and patch api contracts. --- .../management/v1/ApplicationListItem.java | 23 ++++++++++++++++++- .../management/v1/ApplicationPatchModel.java | 19 +++++++++++++++ .../v1/ApplicationResponseModel.java | 23 ++++++++++++++++++- .../ApplicationBasicInfoToApiModel.java | 1 + ...cationInfoWithRequiredPropsToApiModel.java | 1 + .../ServiceProviderToApiModel.java | 2 ++ .../application/UpdateServiceProvider.java | 1 + 7 files changed, 68 insertions(+), 2 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java index 0260f1f4f0..cf8db1b0e3 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationListItem.java @@ -37,6 +37,7 @@ public class ApplicationListItem { private String id; private String name; private String description; + private String applicationVersion; private String image; private String accessUrl; private String clientId; @@ -137,6 +138,24 @@ public void setDescription(String description) { this.description = description; } + /** + **/ + public ApplicationListItem applicationVersion(String applicationVersion) { + + this.applicationVersion = applicationVersion; + return this; + } + + @ApiModelProperty(example = "This is the application version.", value = "") + @JsonProperty("applicationVersion") + @Valid + public String getApplicationVersion() { + return applicationVersion; + } + public void setApplicationVersion(String applicationVersion) { + this.applicationVersion = applicationVersion; + } + /** **/ public ApplicationListItem image(String image) { @@ -369,6 +388,7 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.id, applicationListItem.id) && Objects.equals(this.name, applicationListItem.name) && Objects.equals(this.description, applicationListItem.description) && + Objects.equals(this.applicationVersion, applicationListItem.applicationVersion) && Objects.equals(this.image, applicationListItem.image) && Objects.equals(this.accessUrl, applicationListItem.accessUrl) && Objects.equals(this.clientId, applicationListItem.clientId) && @@ -385,7 +405,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, image, accessUrl, clientId, issuer, realm, access, self, advancedConfigurations, templateId, templateVersion, associatedRoles, applicationEnabled); + return Objects.hash(id, name, description, applicationVersion, image, accessUrl, clientId, issuer, realm, access, self, advancedConfigurations, templateId, templateVersion, associatedRoles, applicationEnabled); } @Override @@ -397,6 +417,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" applicationVersion: ").append(toIndentedString(applicationVersion)).append("\n"); sb.append(" image: ").append(toIndentedString(image)).append("\n"); sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java index 07b59c8689..8c921747dc 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationPatchModel.java @@ -39,6 +39,7 @@ public class ApplicationPatchModel { private String name; private String description; + private String applicationVersion; private String imageUrl; private String accessUrl; private String logoutReturnUrl; @@ -87,6 +88,24 @@ public void setDescription(String description) { this.description = description; } + /** + **/ + public ApplicationPatchModel applicationVersion(String applicationVersion) { + + this.applicationVersion = applicationVersion; + return this; + } + + @ApiModelProperty(example = "This is the application version.", value = "") + @JsonProperty("applicationVersion") + @Valid + public String getApplicationVersion() { + return applicationVersion; + } + public void setApplicationVersion(String applicationVersion) { + this.applicationVersion = applicationVersion; + } + /** **/ public ApplicationPatchModel imageUrl(String imageUrl) { diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java index 81b4fe2a5b..6feb4d2e5f 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/ApplicationResponseModel.java @@ -43,6 +43,7 @@ public class ApplicationResponseModel { private String id; private String name; private String description; + private String applicationVersion; private String imageUrl; private String accessUrl; private String logoutReturnUrl; @@ -152,6 +153,24 @@ public void setDescription(String description) { this.description = description; } + /** + **/ + public ApplicationResponseModel applicationVersion(String applicationVersion) { + + this.applicationVersion = applicationVersion; + return this; + } + + @ApiModelProperty(example = "This is the application version.", value = "") + @JsonProperty("applicationVersion") + @Valid + public String getApplicationVersion() { + return applicationVersion; + } + public void setApplicationVersion(String applicationVersion) { + this.applicationVersion = applicationVersion; + } + /** **/ public ApplicationResponseModel imageUrl(String imageUrl) { @@ -503,6 +522,7 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.id, applicationResponseModel.id) && Objects.equals(this.name, applicationResponseModel.name) && Objects.equals(this.description, applicationResponseModel.description) && + Objects.equals(this.applicationVersion, applicationResponseModel.applicationVersion) && Objects.equals(this.imageUrl, applicationResponseModel.imageUrl) && Objects.equals(this.accessUrl, applicationResponseModel.accessUrl) && Objects.equals(this.logoutReturnUrl, applicationResponseModel.logoutReturnUrl) && @@ -525,7 +545,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, imageUrl, accessUrl, logoutReturnUrl, clientId, issuer, realm, templateId, templateVersion, isManagementApp, isB2BSelfServiceApp, applicationEnabled, associatedRoles, claimConfiguration, inboundProtocols, authenticationSequence, advancedConfigurations, provisioningConfigurations, access); + return Objects.hash(id, name, description, applicationVersion, imageUrl, accessUrl, logoutReturnUrl, clientId, issuer, realm, templateId, templateVersion, isManagementApp, isB2BSelfServiceApp, applicationEnabled, associatedRoles, claimConfiguration, inboundProtocols, authenticationSequence, advancedConfigurations, provisioningConfigurations, access); } @Override @@ -537,6 +557,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" applicationVersion: ").append(toIndentedString(applicationVersion)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); sb.append(" logoutReturnUrl: ").append(toIndentedString(logoutReturnUrl)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationBasicInfoToApiModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationBasicInfoToApiModel.java index 79545e1313..ee7ccc7443 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationBasicInfoToApiModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationBasicInfoToApiModel.java @@ -49,6 +49,7 @@ public ApplicationListItem apply(ApplicationBasicInfo applicationBasicInfo) { .id(applicationBasicInfo.getApplicationResourceId()) .name(applicationBasicInfo.getApplicationName()) .description(applicationBasicInfo.getDescription()) + .applicationVersion(applicationBasicInfo.getApplicationVersion()) .image(applicationBasicInfo.getImageUrl()) .accessUrl(applicationBasicInfo.getAccessUrl()) .clientId(applicationBasicInfo.getClientId()) diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationInfoWithRequiredPropsToApiModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationInfoWithRequiredPropsToApiModel.java index 8d4fc56431..e4202185b7 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationInfoWithRequiredPropsToApiModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ApplicationInfoWithRequiredPropsToApiModel.java @@ -49,6 +49,7 @@ public ApplicationListItem apply(ApplicationResponseModel applicationResponseMod .id(applicationResponseModel.getId()) .name(applicationResponseModel.getName()) .description(applicationResponseModel.getDescription()) + .applicationVersion(applicationResponseModel.getApplicationVersion()) .image(applicationResponseModel.getImageUrl()) .accessUrl(applicationResponseModel.getAccessUrl()) .access(getAccessForApplicationListItems(applicationResponseModel.getName())) diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java index 13adfb5839..3def67f742 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java @@ -115,6 +115,7 @@ public ApplicationResponseModel apply(ServiceProvider application) { .id(application.getApplicationResourceId()) .name(application.getApplicationName()) .description(application.getDescription()) + .applicationVersion(application.getApplicationVersion()) .provisioningConfigurations(buildProvisioningConfiguration(application)) .access(ApplicationResponseModel.AccessEnum.READ); } else { @@ -122,6 +123,7 @@ public ApplicationResponseModel apply(ServiceProvider application) { .id(application.getApplicationResourceId()) .name(application.getApplicationName()) .description(application.getDescription()) + .applicationVersion(application.getApplicationVersion()) .imageUrl(application.getImageUrl()) .accessUrl(application.getAccessUrl()) .logoutReturnUrl(getLogoutReturnUrl(application)) diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java index 496d23d478..761f0c7da9 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/UpdateServiceProvider.java @@ -39,6 +39,7 @@ public void apply(ServiceProvider serviceProvider, ApplicationPatchModel applica setIfNotNull(applicationPatchModel.getName(), serviceProvider::setApplicationName); setIfNotNull(applicationPatchModel.getDescription(), serviceProvider::setDescription); + setIfNotNull(applicationPatchModel.getApplicationVersion(), serviceProvider::setApplicationVersion); setIfNotNull(applicationPatchModel.getImageUrl(), serviceProvider::setImageUrl); setIfNotNull(applicationPatchModel.getAccessUrl(), serviceProvider::setAccessUrl); setIfNotNull(applicationPatchModel.getTemplateId(), serviceProvider::setTemplateId);