BaseCmd: Use HttpUtils to have single source of static string values

cloud-api depends on cloud-utils, it makes sense to refactor and put common
and static stuff in cloud-utils

Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d64d59e8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d64d59e8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d64d59e8

Branch: refs/heads/master
Commit: d64d59e8f7d7ebb0fa6f68187f8eb5bfee5fcfb5
Parents: 315feb0
Author: Rohit Yadav <rohit.ya...@shapeblue.com>
Authored: Tue Aug 12 10:04:29 2014 +0200
Committer: Rohit Yadav <rohit.ya...@shapeblue.com>
Committed: Tue Aug 12 12:01:32 2014 +0200

----------------------------------------------------------------------
 api/src/org/apache/cloudstack/api/BaseCmd.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d64d59e8/api/src/org/apache/cloudstack/api/BaseCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/BaseCmd.java 
b/api/src/org/apache/cloudstack/api/BaseCmd.java
index ac9a208..1226566 100644
--- a/api/src/org/apache/cloudstack/api/BaseCmd.java
+++ b/api/src/org/apache/cloudstack/api/BaseCmd.java
@@ -29,6 +29,7 @@ import java.util.regex.Pattern;
 
 import javax.inject.Inject;
 
+import com.cloud.utils.HttpUtils;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.acl.RoleType;
@@ -84,8 +85,8 @@ import com.cloud.vm.snapshot.VMSnapshotService;
 
 public abstract class BaseCmd {
     private static final Logger s_logger = 
Logger.getLogger(BaseCmd.class.getName());
-    public static final String RESPONSE_TYPE_XML = "xml";
-    public static final String RESPONSE_TYPE_JSON = "json";
+    public static final String RESPONSE_TYPE_XML = HttpUtils.RESPONSE_TYPE_XML;
+    public static final String RESPONSE_TYPE_JSON = 
HttpUtils.RESPONSE_TYPE_JSON;
     public static final DateFormat INPUT_FORMAT = new 
SimpleDateFormat("yyyy-MM-dd");
     public static final DateFormat NEW_INPUT_FORMAT = new 
SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     public static final String USER_ERROR_MESSAGE = "Internal error executing 
command, please contact your system administrator";

Reply via email to