Removing code smells
[dmaap/datarouter.git] / datarouter-prov / src / main / java / org / onap / dmaap / datarouter / provisioning / beans / Feed.java
index a8be6b3..4a14da2 100644 (file)
@@ -200,7 +200,7 @@ public class Feed extends Syncable {
                         Feed feed = map.get(id);\r
                         if (feed != null) {\r
                             FeedEndpointID epi = new FeedEndpointID(rs);\r
-                            Collection<FeedEndpointID> ecoll = feed.getAuthorization().getEndpoint_ids();\r
+                            Collection<FeedEndpointID> ecoll = feed.getAuthorization().getEndpointIDS();\r
                             ecoll.add(epi);\r
                         }\r
                     }\r
@@ -212,7 +212,7 @@ public class Feed extends Syncable {
                         int id = rs.getInt("FEEDID");\r
                         Feed feed = map.get(id);\r
                         if (feed != null) {\r
-                            Collection<String> acoll = feed.getAuthorization().getEndpoint_addrs();\r
+                            Collection<String> acoll = feed.getAuthorization().getEndpointAddrs();\r
                             acoll.add(rs.getString("ADDR"));\r
                         }\r
                     }\r
@@ -281,7 +281,7 @@ public class Feed extends Syncable {
                 if (feed != null) {\r
                     sql = "select * from FEED_ENDPOINT_IDS where FEEDID = " + feed.feedid;\r
                     try (ResultSet rs = stmt.executeQuery(sql)) {\r
-                        Collection<FeedEndpointID> ecoll = feed.getAuthorization().getEndpoint_ids();\r
+                        Collection<FeedEndpointID> ecoll = feed.getAuthorization().getEndpointIDS();\r
                         while (rs.next()) {\r
                             FeedEndpointID epi = new FeedEndpointID(rs);\r
                             ecoll.add(epi);\r
@@ -289,7 +289,7 @@ public class Feed extends Syncable {
                     }\r
                     sql = "select * from FEED_ENDPOINT_ADDRS where FEEDID = " + feed.feedid;\r
                     try (ResultSet rs = stmt.executeQuery(sql)) {\r
-                        Collection<String> acoll = feed.getAuthorization().getEndpoint_addrs();\r
+                        Collection<String> acoll = feed.getAuthorization().getEndpointAddrs();\r
                         while (rs.next()) {\r
                             acoll.add(rs.getString("ADDR"));\r
                         }\r
@@ -413,9 +413,9 @@ public class Feed extends Syncable {
                     //Fortify scan fixes - Privacy Violation\r
                     throw new InvalidObjectException("password field is too long (" + fid.getPassword() + ")");\r
                 }\r
-                this.authorization.getEndpoint_ids().add(fid);\r
+                this.authorization.getEndpointIDS().add(fid);\r
             }\r
-            if (this.authorization.getEndpoint_ids().isEmpty()) {\r
+            if (this.authorization.getEndpointIDS().isEmpty()) {\r
                 throw new InvalidObjectException("need to specify at least one endpoint_id");\r
             }\r
             endPointIds = jauth.getJSONArray("endpoint_addrs");\r
@@ -424,7 +424,7 @@ public class Feed extends Syncable {
                 if (!JSONUtilities.validIPAddrOrSubnet(addr)) {\r
                     throw new InvalidObjectException("bad IP addr or subnet mask: " + addr);\r
                 }\r
-                this.authorization.getEndpoint_addrs().add(addr);\r
+                this.authorization.getEndpointAddrs().add(addr);\r
             }\r
 \r
             this.publisher = jo.optString("publisher", "");\r
@@ -651,7 +651,7 @@ public class Feed extends Syncable {
             FeedAuthorization auth = getAuthorization();\r
             String sql = "insert into FEED_ENDPOINT_IDS values (?, ?, ?)";\r
             try (PreparedStatement ps2 = conn.prepareStatement(sql)) {\r
-                for (FeedEndpointID fid : auth.getEndpoint_ids()) {\r
+                for (FeedEndpointID fid : auth.getEndpointIDS()) {\r
                     ps2.setInt(1, feedid);\r
                     ps2.setString(2, fid.getId());\r
                     ps2.setString(3, fid.getPassword());\r
@@ -662,7 +662,7 @@ public class Feed extends Syncable {
             // Create FEED_ENDPOINT_ADDRS rows\r
             sql = "insert into FEED_ENDPOINT_ADDRS values (?, ?)";\r
             try (PreparedStatement ps2 = conn.prepareStatement(sql)) {\r
-                for (String t : auth.getEndpoint_addrs()) {\r
+                for (String t : auth.getEndpointAddrs()) {\r
                     ps2.setInt(1, feedid);\r
                     ps2.setString(2, t);\r
                     ps2.executeUpdate();\r
@@ -705,8 +705,8 @@ public class Feed extends Syncable {
         Feed oldobj = getFeedById(feedid);\r
         PreparedStatement ps = null;\r
         try {\r
-            Set<FeedEndpointID> newset = getAuthorization().getEndpoint_ids();\r
-            Set<FeedEndpointID> oldset = oldobj.getAuthorization().getEndpoint_ids();\r
+            Set<FeedEndpointID> newset = getAuthorization().getEndpointIDS();\r
+            Set<FeedEndpointID> oldset = oldobj.getAuthorization().getEndpointIDS();\r
 \r
             // Insert new FEED_ENDPOINT_IDS rows\r
             String sql = "insert into FEED_ENDPOINT_IDS values (?, ?, ?)";\r
@@ -735,8 +735,8 @@ public class Feed extends Syncable {
             ps.close();\r
 \r
             // Insert new FEED_ENDPOINT_ADDRS rows\r
-            Set<String> newset2 = getAuthorization().getEndpoint_addrs();\r
-            Set<String> oldset2 = oldobj.getAuthorization().getEndpoint_addrs();\r
+            Set<String> newset2 = getAuthorization().getEndpointAddrs();\r
+            Set<String> oldset2 = oldobj.getAuthorization().getEndpointAddrs();\r
             sql = "insert into FEED_ENDPOINT_ADDRS values (?, ?)";\r
             ps = conn.prepareStatement(sql);\r
             for (String t : newset2) {\r