|
| 1 | +package org.wso2.carbon.apimgt.api.model; |
| 2 | + |
| 3 | +import org.wso2.carbon.apimgt.api.APIConstants; |
| 4 | + |
| 5 | +import java.util.HashMap; |
| 6 | +import java.util.List; |
| 7 | +import java.util.Map; |
| 8 | + |
| 9 | +public interface FederatedGatewayAgentConfiguration { |
| 10 | + Map<String, Boolean> featureConfigurations = new HashMap<>(); |
| 11 | + |
| 12 | + /** |
| 13 | + * This method used to get Type |
| 14 | + */ |
| 15 | + public String getType(); |
| 16 | + |
| 17 | + /** |
| 18 | + * This method returns the Gateway Agent implementation class name |
| 19 | + * |
| 20 | + * @return gateway agent implementation class name |
| 21 | + */ |
| 22 | + public String getImplementation(); |
| 23 | + |
| 24 | + /** |
| 25 | + * This method returns the Configurations related to federated gateway registration |
| 26 | + * |
| 27 | + * @return List<ConfigurationDto> connectionConfigurations |
| 28 | + */ |
| 29 | + public List<ConfigurationDto> getConnectionConfigurations(); |
| 30 | + |
| 31 | + /** |
| 32 | + * This method returns the Configurations related to features supported in federated gateway registration |
| 33 | + * By default all features are enabled. If a feature is not supported, it should be disabled at the specific federated |
| 34 | + * gateway implementation level. |
| 35 | + * |
| 36 | + * @return Map<String, Boolean> featureConfigurations |
| 37 | + */ |
| 38 | + public default Map<String, Boolean> getFeatureConfigurations() { |
| 39 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.CORS_FEATURE, true); |
| 40 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.SCHEMA_VALIDATION_FEATURE, true); |
| 41 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.RESPONSE_CACHING_FEATURE, true); |
| 42 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.TRANSPORTS_HTTP_FEATURE, true); |
| 43 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.TRANSPORTS_HTTPS_FEATURE, true); |
| 44 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.TRANSPORTS_MUTUAL_SSL_FEATURE, true); |
| 45 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.API_LEVEL_RATE_LIMITING_FEATURE, true); |
| 46 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.OPERATION_LEVEL_RATE_LIMITING_FEATURE, true); |
| 47 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.OPERATION_SECURITY_FEATURE, true); |
| 48 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.OPERATION_SCOPES_FEATURE, true); |
| 49 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.OPERATION_LEVEL_POLICIES_FEATURE, true); |
| 50 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.MONETIZATION_FEATURE, true); |
| 51 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.SUBSCRIPTIONS_FEATURE, true); |
| 52 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.OAUTH2_FEATURE, true); |
| 53 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.APIKEY_FEATURE, true); |
| 54 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.BASIC_AUTH_FEATURE, true); |
| 55 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.AUDIENCE_VALIDATION_FEATURE, true); |
| 56 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.ENDPOINTS_REST_FEATURE, true); |
| 57 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.ENDPOINTS_SERVICE_FEATURE, true); |
| 58 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.ENDPOINTS_SOAP_FEATURE, true); |
| 59 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.ENDPOINTS_DYNAMIC_FEATURE, true); |
| 60 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.ENDPOINTS_MOCK_FEATURE, true); |
| 61 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.ENDPOINTS_LAMBDA_FEATURE, true); |
| 62 | + featureConfigurations.put(APIConstants.FederatedGatewayConstants.ENDPOINTS_SEQUENCE_BACKEND_FEATURE, true); |
| 63 | + return featureConfigurations; |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * This method used to get Display Name |
| 68 | + * |
| 69 | + * @return String displayName |
| 70 | + */ |
| 71 | + public default String getDisplayName() { |
| 72 | + return getType(); |
| 73 | + } |
| 74 | +} |
0 commit comments