X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FSubscription.java;fp=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FSubscription.java;h=6928addf2c6d8aa07686d369b59616bc0bbf70d0;hp=5741881c5306241490682df6fa5e3ad9d382d01c;hb=495ebf460ae2ca936981e4ed28a11224de69b64e;hpb=63b13a0cddf45b4cfd1691dd5b95a205af355898 diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java index 5741881c..6928addf 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java @@ -72,7 +72,6 @@ public class Subscription extends Syncable { private Date lastMod; private Date createdDate; private boolean privilegedSubscriber; - private String aafInstance; private boolean decompress; public Subscription() { @@ -98,7 +97,6 @@ public class Subscription extends Syncable { this.lastMod = new Date(); this.createdDate = new Date(); this.privilegedSubscriber = false; - this.aafInstance = ""; this.decompress = false; } @@ -121,7 +119,6 @@ public class Subscription extends Syncable { this.lastMod = rs.getDate("LAST_MOD"); this.createdDate = rs.getDate("CREATED_DATE"); this.privilegedSubscriber = rs.getBoolean("PRIVILEGED_SUBSCRIBER"); - this.aafInstance = rs.getString("AAF_INSTANCE"); this.decompress = rs.getBoolean("DECOMPRESS"); } @@ -137,10 +134,6 @@ public class Subscription extends Syncable { this.subid = jo.optInt(SUBID_KEY, -1); this.feedid = jo.optInt(FEEDID_KEY, -1); this.groupid = jo.optInt(GROUPID_KEY, -1); //New field is added - Groups feature Rally:US708115 - 1610 - this.aafInstance = jo.optString("aaf_instance", "legacy"); - if (!(aafInstance.equalsIgnoreCase("legacy")) && aafInstance.length() > 255) { - throw new InvalidObjectException("aaf_instance field is too long"); - } JSONObject jdeli = jo.getJSONObject("delivery"); String url = jdeli.getString("url"); String user = jdeli.getString("user"); @@ -334,14 +327,6 @@ public class Subscription extends Syncable { sl.setFeed(URLUtilities.generateFeedURL(feedid)); } - public String getAafInstance() { - return aafInstance; - } - - public void setAafInstance(String aafInstance) { - this.aafInstance = aafInstance; - } - //New getter setters for Groups feature Rally:US708115 - 1610 public int getGroupid() { return groupid; @@ -439,7 +424,6 @@ public class Subscription extends Syncable { jo.put(LAST_MOD_KEY, lastMod.getTime()); jo.put(CREATED_DATE, createdDate.getTime()); jo.put("privilegedSubscriber", privilegedSubscriber); - jo.put("aaf_instance", aafInstance); jo.put("decompress", decompress); return jo; } @@ -490,8 +474,8 @@ public class Subscription extends Syncable { // Create the SUBSCRIPTIONS row String sql = "insert into SUBSCRIPTIONS (SUBID, FEEDID, DELIVERY_URL, DELIVERY_USER, DELIVERY_PASSWORD, " + "DELIVERY_USE100, METADATA_ONLY, SUBSCRIBER, SUSPENDED, GROUPID, " - + "PRIVILEGED_SUBSCRIBER, FOLLOW_REDIRECTS, DECOMPRESS, AAF_INSTANCE) " - + "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + + "PRIVILEGED_SUBSCRIBER, FOLLOW_REDIRECTS, DECOMPRESS) " + + "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; ps = conn.prepareStatement(sql, new String[]{SUBID_COL}); ps.setInt(1, subid); ps.setInt(2, feedid); @@ -506,7 +490,6 @@ public class Subscription extends Syncable { ps.setBoolean(11, isPrivilegedSubscriber()); ps.setInt(12, isFollowRedirect() ? 1 : 0); ps.setBoolean(13, isDecompress()); - ps.setString(14, getAafInstance()); ps.execute(); ps.close(); // Update the row to set the URLs @@ -630,9 +613,6 @@ public class Subscription extends Syncable { if (suspended != os.suspended) { return false; } - if (!aafInstance.equals(os.aafInstance)) { - return false; - } return true; }