X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FPolicyExportAndImportController.java;h=77deeb5f36fdf19ff07461433bed1f1e4fdc9eff;hp=fb566f37d6b85de30ef2730f56d8e4e584a04fdc;hb=f36e53a3637e1204a42491ec0eeed7b3c763f681;hpb=b831c6a3df8e1dc9017ae5e8ad002dc3b1002aab diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java index fb566f37d..77deeb5f3 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -117,7 +117,7 @@ public class PolicyExportAndImportController extends RestrictedBaseController { /** * This is for downloading existing policy. - * + * * @param request HttpServletRequest * @param response HttpServletResponse * @throws IOException error out @@ -180,8 +180,8 @@ public class PolicyExportAndImportController extends RestrictedBaseController { PrintWriter out = response.getWriter(); String successMap = file.substring(file.lastIndexOf("webapps") + 8); String responseString = mapper.writeValueAsString(successMap); - JSONObject j = new JSONObject("{data: " + responseString + "}"); - out.write(j.toString()); + JSONObject json = new JSONObject("{data: " + responseString + "}"); + out.write(json.toString()); } catch (Exception e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + "Exception Occured while Exporting Policies" + e); } @@ -250,7 +250,7 @@ public class PolicyExportAndImportController extends RestrictedBaseController { /** * This is to upload a policy and save it to database. - * + * * @param file String * @param request HttpServletRequest * @return JSONObject @@ -358,7 +358,7 @@ public class PolicyExportAndImportController extends RestrictedBaseController { /** * This is to validate all matching required fields. - * + * * @param policyName String * @param jsonString String * @return String @@ -563,6 +563,7 @@ public class PolicyExportAndImportController extends RestrictedBaseController { return false; } + @SuppressWarnings("rawtypes") private boolean isContinue(List roles, String scope, UserInfo userInfo, Set scopes) { if (roles.contains(admin) || roles.contains(editor)) { if (scopes.isEmpty()) { @@ -769,7 +770,7 @@ public class PolicyExportAndImportController extends RestrictedBaseController { saveVersion(policyEntity, scope, userId); // // Notify Other paps regarding Export Policy. PolicyRestController restController = new PolicyRestController(); - restController.notifyOtherPAPSToUpdateConfigurations("exportPolicy", configName, null); + restController.notifyOtherPapsToUpdateConfigurations("exportPolicy", configName, null); } } }