diff options
author | 2018-05-02 17:00:20 -0400 | |
---|---|---|
committer | 2018-05-03 16:51:59 -0400 | |
commit | 22ed5d7b533cec97713c3b5aef37319d5dead6a3 (patch) | |
tree | df40d050750cab3cf9b78e9820dd0bde8d16eaa9 /ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk | |
parent | c607da68bfb7f7440d5be7f0396609dc01eb0e90 (diff) |
API Versioning for ECOMP Components in SDK
Issue-ID: PORTAL-263
Included the api version changes for SDK.
Change-Id: Ib81c5aabe585f6e2775e73a692153d1f286d1f45
Signed-off-by: sa282w <sa282w@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk')
2 files changed, 4 insertions, 3 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java index 1d503a81..cdcd1d7a 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java @@ -51,6 +51,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.type.TypeFactory; public class FunctionalMenuListServiceCentralizedImpl implements FunctionalMenuListService { + private static String portalApiVersion = "/v3"; @Autowired private RestApiRequestBuilder restApiRequestBuilder; @@ -59,7 +60,7 @@ public class FunctionalMenuListServiceCentralizedImpl implements FunctionalMenuL public List<RoleFunction> getFunctionCDList(HttpServletRequest request) throws IOException { User user = UserUtils.getUserSession(request); ObjectMapper mapper = new ObjectMapper(); - String menuList = restApiRequestBuilder.getViaREST("/menuFunctions", true, user.getOrgUserId()); + String menuList = restApiRequestBuilder.getViaREST( portalApiVersion + "/menuFunctions", true, user.getOrgUserId()); List<RoleFunction> roleFunctionFinalList = mapper.readValue(menuList, TypeFactory.defaultInstance().constructCollectionType(List.class, String.class)); return roleFunctionFinalList; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceCentralizedAccess.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceCentralizedAccess.java index 88633abe..02a5ed30 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceCentralizedAccess.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceCentralizedAccess.java @@ -61,7 +61,7 @@ public class RoleServiceCentralizedAccess implements RoleService { @Autowired private RestApiRequestBuilder restApiRequestBuilder; - private static String portalApiVersion = "/v1"; + private static String portalApiVersion = "/v3"; @Override public List<RoleFunction> getRoleFunctions(String loginId) throws IOException { @@ -137,7 +137,7 @@ public class RoleServiceCentralizedAccess implements RoleService { @Override public void deleteRole(String loginId, Role domainRole) throws IOException { Long roleId = domainRole.getId(); - restApiRequestBuilder.deleteViaRest("v2/deleteRole/" + roleId, true, null, loginId); + restApiRequestBuilder.deleteViaRest("v3/deleteRole/" + roleId, true, null, loginId); } @Override |