From c001aeb66e12924f3d7b3aec46ddecbf09226b0b Mon Sep 17 00:00:00 2001 From: Thamindu Aluthwala Date: Wed, 11 Oct 2023 14:35:10 +0530 Subject: [PATCH] Update method name --- .../api/resource/mgt/dao/impl/APIResourceManagementDAOImpl.java | 2 +- .../identity/api/resource/mgt/APIResourceManagerTest.java | 2 +- .../carbon/identity/application/common/model/APIResource.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/main/java/org/wso2/carbon/identity/api/resource/mgt/dao/impl/APIResourceManagementDAOImpl.java b/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/main/java/org/wso2/carbon/identity/api/resource/mgt/dao/impl/APIResourceManagementDAOImpl.java index 53badbe6ba5b..4a072355566f 100644 --- a/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/main/java/org/wso2/carbon/identity/api/resource/mgt/dao/impl/APIResourceManagementDAOImpl.java +++ b/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/main/java/org/wso2/carbon/identity/api/resource/mgt/dao/impl/APIResourceManagementDAOImpl.java @@ -116,7 +116,7 @@ public APIResource addAPIResource(APIResource apiResource, Integer tenantId) thr prepStmt.setString(4, apiResource.getIdentifier()); prepStmt.setString(5, apiResource.getDescription()); prepStmt.setInt(6, tenantId); - prepStmt.setBoolean(7, apiResource.isRequiresAuthorization()); + prepStmt.setBoolean(7, apiResource.isAuthorizationRequired()); prepStmt.executeUpdate(); prepStmt.clearParameters(); diff --git a/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/test/java/org/wso2/carbon/identity/api/resource/mgt/APIResourceManagerTest.java b/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/test/java/org/wso2/carbon/identity/api/resource/mgt/APIResourceManagerTest.java index 0809e53b0118..d20476f7db05 100644 --- a/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/test/java/org/wso2/carbon/identity/api/resource/mgt/APIResourceManagerTest.java +++ b/components/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt/src/test/java/org/wso2/carbon/identity/api/resource/mgt/APIResourceManagerTest.java @@ -189,7 +189,7 @@ public void testUpdateAPIResource(APIResource apiResource, String updatedName, S .scopes(createdAPIResource.getScopes()) .type(createdAPIResource.getType()) .identifier(createdAPIResource.getIdentifier()) - .requiresAuthorization(createdAPIResource.isRequiresAuthorization()); + .requiresAuthorization(createdAPIResource.isAuthorizationRequired()); if (updatedName != null) { apiResourceBuilder.name(updatedName); diff --git a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/APIResource.java b/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/APIResource.java index 1b678025f795..e8a92da730b4 100644 --- a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/APIResource.java +++ b/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/APIResource.java @@ -88,7 +88,7 @@ public Integer getTenantId() { return tenantId; } - public boolean isRequiresAuthorization() { + public boolean isAuthorizationRequired() { return requiresAuthorization; }