Merge "AafConnection.java: Fixed sonar issues"
[dmaap/dbcapi.git] / src / main / java / org / onap / dmaap / dbcapi / model / DR_Sub.java
index 6d36a89..e089881 100644 (file)
@@ -42,32 +42,6 @@ public class DR_Sub extends DmaapObject {
        private boolean use100;
        private boolean suspended;
        private String owner;
-       
-       public String getOwner() {
-               return owner;
-       }
-
-       public void setOwner(String owner) {
-               this.owner = owner;
-       }
-
-       public boolean isSuspended() {
-               return suspended;
-       }
-
-       public void setSuspended(boolean suspended) {
-               this.suspended = suspended;
-       }
-
-
-
-       public boolean isUse100() {
-               return use100;
-       }
-
-       public void setUse100(boolean use100) {
-               this.use100 = use100;
-       }
 
        public DR_Sub() {
 
@@ -125,6 +99,32 @@ public class DR_Sub extends DmaapObject {
 
                logger.info( "new DR_Sub returning");
        }
+       
+       public String getOwner() {
+               return owner;
+       }
+
+       public void setOwner(String owner) {
+               this.owner = owner;
+       }
+
+       public boolean isSuspended() {
+               return suspended;
+       }
+
+       public void setSuspended(boolean suspended) {
+               this.suspended = suspended;
+       }
+
+
+
+       public boolean isUse100() {
+               return use100;
+       }
+
+       public void setUse100(boolean use100) {
+               this.use100 = use100;
+       }
 
        public String getDcaeLocationName() {
                return dcaeLocationName;
@@ -200,7 +200,8 @@ public class DR_Sub extends DmaapObject {
                // TODO:
                //   - introduce Bus Controller API support for these attributes
                //   - store the default values in the DB
-               String postJSON = String.format("{\"delivery\": {\"url\": \"%s\", \"user\": \"%s\", \"password\": \"%s\", \"use100\":  \"%s\"}, \"metadataOnly\": %s, \"groupid\": \"%s\", \"follow_redirect\": %s }", 
+               String postJSON = String.format("{\"suspend\": \"%s\", \"delivery\": {\"url\": \"%s\", \"user\": \"%s\", \"password\": \"%s\", \"use100\":  \"%s\"}, \"metadataOnly\": %s, \"groupid\": \"%s\", \"follow_redirect\": %s }", 
+                               this.suspended,
                                this.getDeliveryURL(), 
                                this.getUsername(),
                                this.getUserpwd(),