diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml index 9cb5d03741..857810dc54 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/pom.xml @@ -1,18 +1,20 @@ diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/ClaimManagementDataHolder.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/ClaimManagementDataHolder.java index 8a2df63f93..76a17bbb46 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/ClaimManagementDataHolder.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/ClaimManagementDataHolder.java @@ -29,14 +29,12 @@ public class ClaimManagementDataHolder { private static class OrganizationManagerHolder { static final OrganizationManager SERVICE = (OrganizationManager) PrivilegedCarbonContext - .getThreadLocalCarbonContext() - .getOSGiService(OrganizationManager.class, null); + .getThreadLocalCarbonContext().getOSGiService(OrganizationManager.class, null); } private static class ClaimMetadataManagementServiceHolder { static final ClaimMetadataManagementService SERVICE = (ClaimMetadataManagementService) PrivilegedCarbonContext - .getThreadLocalCarbonContext() - .getOSGiService(ClaimMetadataManagementService.class, null); + .getThreadLocalCarbonContext().getOSGiService(ClaimMetadataManagementService.class, null); } /** diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml index 09be07b811..495110fdb3 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/pom.xml @@ -1,18 +1,20 @@ diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/ClaimManagementApi.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/ClaimManagementApi.java index 4251b27060..351f6ffc72 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/ClaimManagementApi.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/ClaimManagementApi.java @@ -49,6 +49,7 @@ public class ClaimManagementApi { private final ClaimManagementApiService delegate; public ClaimManagementApi() { + this.delegate = ClaimManagementApiServiceFactory.getClaimManagementApi(); } diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/factories/ServerClaimManagementServiceFactory.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/factories/ServerClaimManagementServiceFactory.java index 38ce0cf5b3..dd6406825e 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/factories/ServerClaimManagementServiceFactory.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/factories/ServerClaimManagementServiceFactory.java @@ -52,6 +52,7 @@ public class ServerClaimManagementServiceFactory { * @return ServerClaimManagementService */ public static ServerClaimManagementService getServerClaimManagementService() { + return SERVICE; } } diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/impl/ClaimManagementApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/impl/ClaimManagementApiServiceImpl.java index d1257578f2..e5df5edba6 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/impl/ClaimManagementApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/impl/ClaimManagementApiServiceImpl.java @@ -19,6 +19,7 @@ package org.wso2.carbon.identity.rest.api.server.claim.management.v1.impl; import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.apache.http.HttpHeaders; import org.wso2.carbon.identity.api.server.common.FileContent; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.ClaimManagementApiService; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.core.ServerClaimManagementService; @@ -184,9 +185,9 @@ public Response exportClaimDialectToFile(String dialectId, String accept) { .type(fileContent.getFileType()) .header("Content-Disposition", "attachment; filename=\"" + fileContent.getFileName() + "\"") - .header("Cache-Control", "no-cache, no-store, must-revalidate") - .header("Pragma", "no-cache") - .header("Expires", "0") + .header(HttpHeaders.CACHE_CONTROL, "no-cache, no-store, must-revalidate") + .header(HttpHeaders.PRAGMA, "no-cache") + .header(HttpHeaders.EXPIRES, "0") .entity(fileContent.getContent().getBytes(StandardCharsets.UTF_8)) .build(); }