Release version 1.1.0 of sli/plugins
[ccsdk/sli/plugins.git] / restapi-call-node / provider / src / main / java / org / onap / ccsdk / sli / plugins / restapicall / Format.java
index 249378a..1578ee3 100644 (file)
@@ -2,8 +2,8 @@
  * ============LICENSE_START=======================================================
  * openECOMP : SDN-C
  * ================================================================================
- * Copyright (C) 2017 ONAP Intellectual Property. All rights
- *                                             reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ *                     reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.ccsdk.sli.plugins.restapicall;
 
 public enum Format {
-    JSON, XML;
+    JSON, XML, NONE;
 
     public static Format fromString(String s) {
-        if (s == null)
-            return null;
-        if (s.equalsIgnoreCase("json"))
+        if ("json".equalsIgnoreCase(s))
             return JSON;
-        if (s.equalsIgnoreCase("xml"))
+        if ("xml".equalsIgnoreCase(s))
             return XML;
+        if ("none".equalsIgnoreCase(s))
+            return NONE;
         throw new IllegalArgumentException("Invalid value for format: " + s);
     }
 }