aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/java/org/onap
diff options
context:
space:
mode:
authorTej, Tarun <tt3868@att.com>2017-08-09 13:50:38 -0400
committerTarun Tej Velaga <tt3868@att.com>2017-08-10 01:13:27 +0000
commitb51d8192e662e3ee8775235500cabb875f480e2b (patch)
tree470b8bbee4e2130898fc0cc2f524352c05bc0bbd /POLICY-SDK-APP/src/main/java/org/onap
parente938284cec3b06a7f6587b7439eb378b69c3adf1 (diff)
Fix console issues
Reverted package names to org.openecomp to fix portal issues Issue-ID: POLICY-144 Change-Id: Ie108db431b9d211b15c59a29e564517c785e0da5 Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/java/org/onap')
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java2
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java2
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java21
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java2
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java2
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java2
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/model/Roles.java99
7 files changed, 6 insertions, 124 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java
index 036d13aa6..6fab5a608 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java
@@ -66,7 +66,6 @@ import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.components.HumanPolicyComponent;
import org.onap.policy.controller.PolicyController;
import org.onap.policy.controller.PolicyExportAndImportController;
-import org.onap.policy.model.Roles;
import org.onap.policy.rest.XACMLRest;
import org.onap.policy.rest.XACMLRestProperties;
import org.onap.policy.rest.adapter.PolicyRestAdapter;
@@ -79,6 +78,7 @@ import org.onap.policy.rest.jpa.UserInfo;
import org.onap.policy.utils.PolicyUtils;
import org.onap.policy.xacml.api.XACMLErrorConstants;
import org.onap.policy.xacml.util.XACMLPolicyScanner;
+import org.openecomp.policy.model.Roles;
import org.openecomp.portalsdk.core.web.support.UserUtils;
import com.att.research.xacml.util.XACMLProperties;
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java
index f78a79c9c..7d601d6f3 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java
@@ -46,7 +46,6 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.model.PDPGroupContainer;
import org.onap.policy.model.PDPPolicyContainer;
-import org.onap.policy.model.Roles;
import org.onap.policy.rest.adapter.AutoPushTabAdapter;
import org.onap.policy.rest.dao.CommonClassDao;
import org.onap.policy.rest.jpa.PolicyEntity;
@@ -55,6 +54,7 @@ import org.onap.policy.xacml.api.XACMLErrorConstants;
import org.onap.policy.xacml.api.pap.OnapPDPGroup;
import org.onap.policy.xacml.std.pap.StdPDPGroup;
import org.onap.policy.xacml.std.pap.StdPDPPolicy;
+import org.openecomp.policy.model.Roles;
import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
import org.openecomp.portalsdk.core.web.support.JsonMessage;
import org.openecomp.portalsdk.core.web.support.UserUtils;
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java
index 3107950c9..9104b9822 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java
@@ -20,12 +20,7 @@
package org.onap.policy.controller;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
import java.io.PrintWriter;
-import java.nio.file.Files;
-import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -367,25 +362,11 @@ public class CreateBRMSParamController extends RestrictedBaseController {
public void paramUIGenerate(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
String data = entity.getConfigurationData().getConfigBody();
if(data != null){
- File file = new File(PolicyController.getConfigHome() +File.separator+ entity.getConfigurationData().getConfigurationName());
- if(file.exists()){
- try (BufferedReader br = new BufferedReader(new FileReader(file))) {
- StringBuilder sb = new StringBuilder();
- String line = br.readLine();
- while (line != null) {
- sb.append(line);
- sb.append("\n");
- line = br.readLine();
- }
- }catch(Exception e){
- policyLogger.error(XACMLErrorConstants.ERROR_DATA_ISSUE+ e.getMessage() + e);
- }
- }
try {
StringBuilder params = new StringBuilder("");
Boolean flag = false;
Boolean comment = false;
- for (String line : Files.readAllLines(Paths.get(file.toString()))) {
+ for (String line : data.split("\n")) {
if (line.isEmpty() || line.startsWith("//")) {
continue;
}
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java
index 0f8a3c988..f40587d4b 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java
@@ -37,11 +37,11 @@ import org.json.JSONObject;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.model.PDPGroupContainer;
-import org.onap.policy.model.Roles;
import org.onap.policy.xacml.api.XACMLErrorConstants;
import org.onap.policy.xacml.api.pap.OnapPDPGroup;
import org.onap.policy.xacml.std.pap.StdPDP;
import org.onap.policy.xacml.std.pap.StdPDPGroup;
+import org.openecomp.policy.model.Roles;
import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
import org.openecomp.portalsdk.core.web.support.JsonMessage;
import org.openecomp.portalsdk.core.web.support.UserUtils;
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java
index aa1918967..375ee2d10 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java
@@ -40,7 +40,6 @@ import org.json.JSONObject;
import org.onap.policy.admin.PolicyNotificationMail;
import org.onap.policy.admin.RESTfulPAPEngine;
import org.onap.policy.model.PDPGroupContainer;
-import org.onap.policy.model.Roles;
import org.onap.policy.rest.XACMLRestProperties;
import org.onap.policy.rest.XacmlAdminAuthorization;
import org.onap.policy.rest.dao.CommonClassDao;
@@ -49,6 +48,7 @@ import org.onap.policy.rest.jpa.FunctionDefinition;
import org.onap.policy.rest.jpa.PolicyEntity;
import org.onap.policy.rest.jpa.PolicyVersion;
import org.onap.policy.rest.jpa.UserInfo;
+import org.openecomp.policy.model.Roles;
import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
import org.openecomp.portalsdk.core.web.support.JsonMessage;
import org.openecomp.portalsdk.core.web.support.UserUtils;
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 92794dda9..d26781c0f 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
@@ -45,7 +45,6 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.json.JSONObject;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
-import org.onap.policy.model.Roles;
import org.onap.policy.rest.adapter.PolicyExportAdapter;
import org.onap.policy.rest.dao.CommonClassDao;
import org.onap.policy.rest.jpa.ActionBodyEntity;
@@ -55,6 +54,7 @@ import org.onap.policy.rest.jpa.PolicyEntity;
import org.onap.policy.rest.jpa.PolicyVersion;
import org.onap.policy.rest.jpa.UserInfo;
import org.onap.policy.xacml.api.XACMLErrorConstants;
+import org.openecomp.policy.model.Roles;
import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
import org.openecomp.portalsdk.core.web.support.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/model/Roles.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/model/Roles.java
deleted file mode 100644
index 51e78d0e5..000000000
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/model/Roles.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy Engine
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.model;
-
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-
-@Entity
-@Table(name="Roles")
-@NamedQuery(name="Roles.findAll", query="SELECT r FROM Roles r ")
-@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
-public class Roles implements Serializable{
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
-
- @Column(name="id")
- private int id;
-
- @Column(name="loginId")
- private String loginId;
-
- private String name;
- private String scope;
- private String role;
-
- public Roles(){
-
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getLoginId() {
- return this.loginId;
- }
-
- public void setLoginId(String loginId) {
- this.loginId = loginId;
-
- }
- public String getScope() {
- return this.scope;
- }
-
- public void setScope(String scope) {
- this.scope = scope;
-
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
- public String getRole() {
- return this.role;
- }
-
- public void setRole(String role) {
- this.role = role;
- }
-}