Skip to content

Commit

Permalink
Fix: Code Format Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Jan 2, 2024
1 parent fdafcd5 commit 00cdb8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import java.util.Map;

import static org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS;
import static org.wso2.carbon.apimgt.gateway.APIMgtGatewayConstants.HTTP_METHOD;
import static org.wso2.carbon.apimgt.gateway.handlers.analytics.Constants.UNKNOWN_VALUE;

public class SynapseAnalyticsDataProvider implements AnalyticsDataProvider {
Expand Down Expand Up @@ -174,7 +175,7 @@ public API getApi() throws DataNotFoundException {
org.wso2.carbon.apimgt.common.analytics.publishers.dto.URITemplate uriTemplateObj
= new org.wso2.carbon.apimgt.common.analytics.publishers.dto.URITemplate();
if (uriTemplate.getHttpMethod() != null && uriTemplate.getHttpMethod()
.equals(messageContext.getProperty("api.ut.HTTP_METHOD")) && uriTemplate.getUrlPattern() != null
.equals(messageContext.getProperty(HTTP_METHOD)) && uriTemplate.getUrlPattern() != null
&& uriTemplate.getUrlPattern().equals(messageContext.getProperty("API_ELECTED_RESOURCE"))) {

uriTemplateObj.setResourceURI(uriTemplate.getUrlPattern());
Expand Down Expand Up @@ -233,7 +234,7 @@ public Application getApplication() throws DataNotFoundException {
@Override
public Operation getOperation() throws DataNotFoundException {

String httpMethod = (String) messageContext.getProperty(APIMgtGatewayConstants.HTTP_METHOD);
String httpMethod = (String) messageContext.getProperty(HTTP_METHOD);
String apiResourceTemplate = (String) messageContext.getProperty(APIConstants.API_ELECTED_RESOURCE);
Operation operation = new Operation();
operation.setApiMethod(httpMethod);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private static APIDTO fromAPItoDTO(API model) {
urlMappingDTO.setUrlPattern(urlMapping.getUrlPattern());
urlMappingDTO.setScopes(urlMapping.getScopes());
List<OperationPolicyDTO> operationPolicyDTOList = new ArrayList<>();
for(OperationPolicy operationPolicy: urlMapping.getOperationPolicies()) {
for (OperationPolicy operationPolicy : urlMapping.getOperationPolicies()) {
OperationPolicyDTO operationPolicyDTO = new OperationPolicyDTO();
operationPolicyDTO.setPolicyId(operationPolicy.getPolicyId());
operationPolicyDTO.setPolicyName(operationPolicy.getPolicyName());
Expand All @@ -117,7 +117,7 @@ private static APIDTO fromAPItoDTO(API model) {
urlMappingsDTO.add(urlMappingDTO);
}
List<OperationPolicyDTO> apiPolicies = new ArrayList<>();
for(OperationPolicy apiPolicy: model.getApiPolicies()) {
for (OperationPolicy apiPolicy : model.getApiPolicies()) {
OperationPolicyDTO operationPolicyDTO = new OperationPolicyDTO();
operationPolicyDTO.setPolicyId(apiPolicy.getPolicyId());
operationPolicyDTO.setPolicyName(apiPolicy.getPolicyName());
Expand Down Expand Up @@ -159,7 +159,7 @@ public static APIListDTO fromAPIToAPIListDTO(API model) {
urlMappingDTO.setUrlPattern(urlMapping.getUrlPattern());
urlMappingDTO.setScopes(urlMapping.getScopes());
List<OperationPolicyDTO> operationPolicyDTOList = new ArrayList<>();
for(OperationPolicy operationPolicy: urlMapping.getOperationPolicies()) {
for (OperationPolicy operationPolicy : urlMapping.getOperationPolicies()) {
OperationPolicyDTO operationPolicyDTO = new OperationPolicyDTO();
operationPolicyDTO.setPolicyId(operationPolicy.getPolicyId());
operationPolicyDTO.setPolicyName(operationPolicy.getPolicyName());
Expand All @@ -173,7 +173,7 @@ public static APIListDTO fromAPIToAPIListDTO(API model) {
urlMappingsDTO.add(urlMappingDTO);
}
List<OperationPolicyDTO> apiPolicies = new ArrayList<>();
for(OperationPolicy apiPolicy: model.getApiPolicies()) {
for (OperationPolicy apiPolicy : model.getApiPolicies()) {
OperationPolicyDTO operationPolicyDTO = new OperationPolicyDTO();
operationPolicyDTO.setPolicyId(apiPolicy.getPolicyId());
operationPolicyDTO.setPolicyName(apiPolicy.getPolicyName());
Expand Down

0 comments on commit 00cdb8a

Please sign in to comment.