Skip to content

Commit 268724a

Browse files
committed
Remove supportedGatewayModes
1 parent 9b368a3 commit 268724a

File tree

5 files changed

+1
-72
lines changed
  • components/apimgt

5 files changed

+1
-72
lines changed

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
import org.wso2.carbon.apimgt.api.model.GatewayAgentConfiguration;
118118
import org.wso2.carbon.apimgt.api.model.GatewayConfiguration;
119119
import org.wso2.carbon.apimgt.api.model.GatewayDeployer;
120-
import org.wso2.carbon.apimgt.api.model.GatewayMode;
121120
import org.wso2.carbon.apimgt.api.model.GatewayPortalConfiguration;
122121
import org.wso2.carbon.apimgt.api.model.GatewayFeatureCatalog;
123122
import org.wso2.carbon.apimgt.api.model.Identifier;
@@ -3490,40 +3489,6 @@ public static List<String> getGatewayTypes() {
34903489
return gatewayTypesList;
34913490
}
34923491

3493-
/**
3494-
* This method retrieves supported gateway modes for all gateway types
3495-
* @return a map of supported gateway modes
3496-
*/
3497-
public static Map<String, List<String>> getSupportedGatewayModes() {
3498-
Map<String, List<String>> supportedModes = new HashMap<>();
3499-
Map<String, GatewayAgentConfiguration> externalGatewayConnectorConfigurationMap =
3500-
ServiceReferenceHolder.getInstance().getExternalGatewayConnectorConfigurations();
3501-
List<String> gatewayTypesList = getGatewayTypes();
3502-
for (String type : gatewayTypesList) {
3503-
if (APIConstants.API_GATEWAY_TYPE_REGULAR.equalsIgnoreCase(type)
3504-
|| APIConstants.API_GATEWAY_TYPE_APK.equalsIgnoreCase(type)) {
3505-
List<String> modeArray = new ArrayList<>();
3506-
modeArray.add(GatewayMode.WRITE_ONLY.getMode());
3507-
if (APIConstants.API_GATEWAY_TYPE_APK.equals(type)) {
3508-
modeArray.add(GatewayMode.READ_ONLY.getMode());
3509-
}
3510-
supportedModes.put(type, modeArray);
3511-
}
3512-
if (!(APIConstants.API_GATEWAY_TYPE_REGULAR.equalsIgnoreCase(
3513-
type)) && !(APIConstants.API_GATEWAY_TYPE_APK.equalsIgnoreCase(type))) {
3514-
GatewayAgentConfiguration externalGatewayConfiguration = externalGatewayConnectorConfigurationMap.get(
3515-
type);
3516-
if (externalGatewayConfiguration != null) {
3517-
supportedModes.put(type, externalGatewayConfiguration.getSupportedModes());
3518-
} else {
3519-
log.warn("No configuration found for external gateway type: "
3520-
+ StringEscapeUtils.escapeJava(type));
3521-
}
3522-
}
3523-
}
3524-
return supportedModes;
3525-
}
3526-
35273492
public static GatewayFeatureCatalog getGatewayFeatureCatalog() throws APIManagementException {
35283493

35293494
Gson gson = new Gson();

components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/publisher-api.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17781,12 +17781,6 @@ components:
1778117781
- AWS
1778217782
items:
1778317783
type: string
17784-
supportedGatewayModes:
17785-
type: object
17786-
additionalProperties:
17787-
type: array
17788-
items:
17789-
type: string
1779017784
GatewayFeatureCatalog:
1779117785
title: Gateway feature Catalog
1779217786
type: object

components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/SettingsDTO.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
import io.swagger.annotations.ApiModel;
66
import io.swagger.annotations.ApiModelProperty;
77
import java.util.ArrayList;
8-
import java.util.HashMap;
98
import java.util.List;
10-
import java.util.Map;
119
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.EnvironmentDTO;
1210
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.GatewayFeatureCatalogDTO;
1311
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.MonetizationAttributeDTO;
@@ -32,7 +30,6 @@ public class SettingsDTO {
3230
private String devportalUrl = null;
3331
private List<EnvironmentDTO> environment = new ArrayList<EnvironmentDTO>();
3432
private List<String> gatewayTypes = new ArrayList<String>();
35-
private Map<String, List<String>> supportedGatewayModes = new HashMap<String, List<String>>();
3633
private GatewayFeatureCatalogDTO gatewayFeatureCatalog = null;
3734
private List<String> scopes = new ArrayList<String>();
3835
private List<MonetizationAttributeDTO> monetizationAttributes = new ArrayList<MonetizationAttributeDTO>();
@@ -108,24 +105,6 @@ public void setGatewayTypes(List<String> gatewayTypes) {
108105
this.gatewayTypes = gatewayTypes;
109106
}
110107

111-
/**
112-
**/
113-
public SettingsDTO supportedGatewayModes(Map<String, List<String>> supportedGatewayModes) {
114-
this.supportedGatewayModes = supportedGatewayModes;
115-
return this;
116-
}
117-
118-
119-
@ApiModelProperty(value = "")
120-
@Valid
121-
@JsonProperty("supportedGatewayModes")
122-
public Map<String, List<String>> getSupportedGatewayModes() {
123-
return supportedGatewayModes;
124-
}
125-
public void setSupportedGatewayModes(Map<String, List<String>> supportedGatewayModes) {
126-
this.supportedGatewayModes = supportedGatewayModes;
127-
}
128-
129108
/**
130109
**/
131110
public SettingsDTO gatewayFeatureCatalog(GatewayFeatureCatalogDTO gatewayFeatureCatalog) {
@@ -515,7 +494,6 @@ public boolean equals(java.lang.Object o) {
515494
return Objects.equals(devportalUrl, settings.devportalUrl) &&
516495
Objects.equals(environment, settings.environment) &&
517496
Objects.equals(gatewayTypes, settings.gatewayTypes) &&
518-
Objects.equals(supportedGatewayModes, settings.supportedGatewayModes) &&
519497
Objects.equals(gatewayFeatureCatalog, settings.gatewayFeatureCatalog) &&
520498
Objects.equals(scopes, settings.scopes) &&
521499
Objects.equals(monetizationAttributes, settings.monetizationAttributes) &&
@@ -541,7 +519,7 @@ public boolean equals(java.lang.Object o) {
541519

542520
@Override
543521
public int hashCode() {
544-
return Objects.hash(devportalUrl, environment, gatewayTypes, supportedGatewayModes, gatewayFeatureCatalog, scopes, monetizationAttributes, subscriberContactAttributes, securityAuditProperties, externalStoresEnabled, docVisibilityEnabled, portalConfigurationOnlyModeEnabled, retryCallWithNewOAuthTokenEnabled, crossTenantSubscriptionEnabled, defaultAdvancePolicy, defaultSubscriptionPolicy, authorizationHeader, isJWTEnabledForLoginTokens, orgAccessControlEnabled, allowSubscriptionValidationDisabling, designAssistantEnabled, aiAuthTokenProvided, isGatewayNotificationEnabled, isMCPSupportEnabled, customProperties);
522+
return Objects.hash(devportalUrl, environment, gatewayTypes, gatewayFeatureCatalog, scopes, monetizationAttributes, subscriberContactAttributes, securityAuditProperties, externalStoresEnabled, docVisibilityEnabled, portalConfigurationOnlyModeEnabled, retryCallWithNewOAuthTokenEnabled, crossTenantSubscriptionEnabled, defaultAdvancePolicy, defaultSubscriptionPolicy, authorizationHeader, isJWTEnabledForLoginTokens, orgAccessControlEnabled, allowSubscriptionValidationDisabling, designAssistantEnabled, aiAuthTokenProvided, isGatewayNotificationEnabled, isMCPSupportEnabled, customProperties);
545523
}
546524

547525
@Override
@@ -552,7 +530,6 @@ public String toString() {
552530
sb.append(" devportalUrl: ").append(toIndentedString(devportalUrl)).append("\n");
553531
sb.append(" environment: ").append(toIndentedString(environment)).append("\n");
554532
sb.append(" gatewayTypes: ").append(toIndentedString(gatewayTypes)).append("\n");
555-
sb.append(" supportedGatewayModes: ").append(toIndentedString(supportedGatewayModes)).append("\n");
556533
sb.append(" gatewayFeatureCatalog: ").append(toIndentedString(gatewayFeatureCatalog)).append("\n");
557534
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
558535
sb.append(" monetizationAttributes: ").append(toIndentedString(monetizationAttributes)).append("\n");

components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/SettingsApiServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public Response getSettings(MessageContext messageContext){
5656
SettingsDTO settingsDTO = settingsMappingUtil.fromSettingstoDTO(isUserAvailable, organization);
5757
settingsDTO.setScopes(getScopeList());
5858
settingsDTO.setGatewayTypes(APIUtil.getGatewayTypes());
59-
settingsDTO.setSupportedGatewayModes(APIUtil.getSupportedGatewayModes());
6059
settingsDTO.setCustomProperties(APIUtil.getCustomProperties(organization));
6160
return Response.ok().entity(settingsDTO).build();
6261
} catch (APIManagementException | IOException e) {

components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17781,12 +17781,6 @@ components:
1778117781
- AWS
1778217782
items:
1778317783
type: string
17784-
supportedGatewayModes:
17785-
type: object
17786-
additionalProperties:
17787-
type: array
17788-
items:
17789-
type: string
1779017784
GatewayFeatureCatalog:
1779117785
title: Gateway feature Catalog
1779217786
type: object

0 commit comments

Comments
 (0)