diff options
author | romaingimbert <romain.gimbert@orange.com> | 2018-06-28 12:05:39 +0200 |
---|---|---|
committer | romaingimbert <romain.gimbert@orange.com> | 2018-06-28 12:05:39 +0200 |
commit | 7233b362b6b79adde656c6f7fe79eaf9c0ad4c63 (patch) | |
tree | 1aba1d531535e00e77d35e8a942c590781ee97b0 /src/main | |
parent | 0d1d0a45f166b4bc32618dc0c9cd2d79ceddaffc (diff) |
fix service order enum
- fix service order enum value for getServiceOrder
Change-Id: Ib9aaa3a4efb78f653f240537732374638db83493
Issue-ID: EXTAPI-109
Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Diffstat (limited to 'src/main')
5 files changed, 28 insertions, 1 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/MultiCriteriaRequestBuilder.java b/src/main/java/org/onap/nbi/apis/serviceorder/MultiCriteriaRequestBuilder.java index 4a5ad92..74ee6a6 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/MultiCriteriaRequestBuilder.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/MultiCriteriaRequestBuilder.java @@ -15,6 +15,8 @@ */ package org.onap.nbi.apis.serviceorder; +import java.util.Locale; +import java.util.TimeZone; import org.onap.nbi.apis.serviceorder.model.StateType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -107,7 +109,7 @@ public class MultiCriteriaRequestBuilder { } private Date convertDate(String dateString) { - String dateFormat = "yyyy-MM-dd HH:mm:ss.SSS"; + String dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; SimpleDateFormat formatter = new SimpleDateFormat(dateFormat); try { return formatter.parse(dateString); diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/ActionType.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/ActionType.java index 6f3499f..7cf4a06 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/ActionType.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/ActionType.java @@ -37,6 +37,7 @@ package org.onap.nbi.apis.serviceorder.model; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * @@ -71,5 +72,10 @@ public enum ActionType { } return null; } + + @JsonValue + public String value() { + return this.value; + } } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/RelationshipType.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/RelationshipType.java index 2ebd3fb..93c5006 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/RelationshipType.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/RelationshipType.java @@ -38,6 +38,7 @@ package org.onap.nbi.apis.serviceorder.model; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * @@ -66,6 +67,11 @@ public enum RelationshipType { } return null; } + + @JsonValue + public String value() { + return this.value; + } } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java index 764c7f1..602f715 100755 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java @@ -39,6 +39,7 @@ package org.onap.nbi.apis.serviceorder.model; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * @@ -83,5 +84,11 @@ public enum StateType { } return null; } + + @JsonValue + public String value() { + return this.value; + } + } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestState.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestState.java index 90ea666..90059db 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestState.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestState.java @@ -16,6 +16,7 @@ package org.onap.nbi.apis.serviceorder.model.consumer; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; public enum RequestState { @@ -44,6 +45,11 @@ public enum RequestState { return null; } + @JsonValue + public String value() { + return this.value; + } + } |