diff options
author | gfraboni <gino.fraboni@amdocs.com> | 2017-09-01 16:39:10 -0400 |
---|---|---|
committer | gfraboni <gino.fraboni@amdocs.com> | 2017-09-01 16:46:03 -0400 |
commit | 4e29c1eed57fbcd982c38bd96348b0b183f7820c (patch) | |
tree | 8f2bbc9b10ace68bbab71fd14931ca2cd99fa184 /src/main/java/org/openecomp/crud/util/CrudServiceUtil.java | |
parent | 900114bf694a0b34e8de3d283b5929fed4aaf65d (diff) |
New endpoints to auto populate edge properties.
New endpoints created to allow v11 endpoints to have their properties
automatically set based on db edge rules.
Issue-Id: AAI-60
Change-Id: I9b41f654fa9924b1dcb863aca369725a763b3691
Signed-off-by: gfraboni <gino.fraboni@amdocs.com>
Diffstat (limited to 'src/main/java/org/openecomp/crud/util/CrudServiceUtil.java')
-rw-r--r-- | src/main/java/org/openecomp/crud/util/CrudServiceUtil.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/openecomp/crud/util/CrudServiceUtil.java b/src/main/java/org/openecomp/crud/util/CrudServiceUtil.java index 25e3de6..b88f20b 100644 --- a/src/main/java/org/openecomp/crud/util/CrudServiceUtil.java +++ b/src/main/java/org/openecomp/crud/util/CrudServiceUtil.java @@ -41,6 +41,13 @@ public class CrudServiceUtil { } else if (clazz.isAssignableFrom(Double.class)) { return Double.parseDouble(value); } else if (clazz.isAssignableFrom(Boolean.class)) { + + // If the value is an IN/OUT direction, this gets seen as a boolean, so + // check for that first. + if (value.equals("OUT") || value.equals("IN")) { + return value; + } + if (!value.equals("true") && !value.equals("false")) { throw new CrudException("Invalid propertry value: " + value, Status.BAD_REQUEST); } |