aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/model/DR_Sub.java52
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java2
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java6
3 files changed, 31 insertions, 29 deletions
diff --git a/src/main/java/org/onap/dmaap/dbcapi/model/DR_Sub.java b/src/main/java/org/onap/dmaap/dbcapi/model/DR_Sub.java
index 5a768c5..e089881 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/model/DR_Sub.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/model/DR_Sub.java
@@ -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;
diff --git a/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java b/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java
index 8248ef1..b4b5e2e 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java
@@ -26,7 +26,7 @@ import org.apache.log4j.Logger;
@XmlRootElement
public class DcaeLocation extends DmaapObject {
- static final Logger logger = Logger.getLogger(MR_Cluster.class);
+ static final Logger errorLogger = Logger.getLogger(MR_Cluster.class);
private String clli;
private String dcaeLayer;
private String dcaeLocationName;
diff --git a/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java b/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java
index 95f9d33..cab48ca 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java
@@ -96,7 +96,7 @@ public class TopicResource extends BaseLoggingClass {
public Response addTopic(
Topic topic
) {
- logger.info( "addTopic request: " + String.valueOf(topic) );
+ logger.info( "addTopic request: " + topic );
ApiService check = new ApiService();
try {
@@ -104,10 +104,10 @@ public class TopicResource extends BaseLoggingClass {
check.required( "topicDescription", topic.getTopicDescription(), "" );
check.required( "owner", topic.getOwner(), "" );
} catch( RequiredFieldException rfe ) {
+ logger.error("Error", rfe);
return check.error();
}
- //String repReq = topic.getReplicationRequest();
ReplicationType t = topic.getReplicationCase();
if ( t == null || t == ReplicationType.REPLICATION_NOT_SPECIFIED ) {
topic.setReplicationCase( mr_topicService.reviewTopic(topic));
@@ -163,6 +163,7 @@ public class TopicResource extends BaseLoggingClass {
try {
check.required( "fqtn", id, "" );
} catch( RequiredFieldException rfe ) {
+ logger.error("Error", rfe);
return check.error();
}
@@ -192,6 +193,7 @@ public class TopicResource extends BaseLoggingClass {
try {
check.required( "topicName", id, "^\\S+$" ); //no white space allowed in topicName
} catch( RequiredFieldException rfe ) {
+ logger.error("Error", rfe);
return check.error();
}
Topic mrc = mr_topicService.getTopic( id, check.getErr() );