ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject [2/2] git commit: AMBARI-6380. Provide API support for sending POST request with special header that will be treated as GET (mpapirkovskyy)
Date Fri, 04 Jul 2014 13:37:13 GMT
AMBARI-6380. Provide API support for sending POST request with special header that will be treated as GET (mpapirkovskyy)


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

Branch: refs/heads/trunk
Commit: 68f0473739ac2e35e9fc14c8fbda6019a5129570
Parents: c1a954c
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Fri Jul 4 16:32:21 2014 +0300
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Fri Jul 4 16:36:52 2014 +0300

----------------------------------------------------------------------
 .../ambari/server/api/MethodOverrideFilter.java | 79 ++++++++++++++++++++
 .../server/api/services/ActionService.java      |  8 +-
 .../server/api/services/BlueprintService.java   |  8 +-
 .../server/api/services/ClusterService.java     |  8 +-
 .../server/api/services/ComponentService.java   |  8 +-
 .../server/api/services/ConfigGroupService.java |  8 +-
 .../api/services/ConfigurationService.java      |  4 +-
 .../ambari/server/api/services/FeedService.java |  8 +-
 .../api/services/HostComponentService.java      |  8 +-
 .../ambari/server/api/services/HostService.java |  8 +-
 .../server/api/services/InstanceService.java    |  8 +-
 .../ambari/server/api/services/JobService.java  |  8 +-
 .../api/services/RequestScheduleService.java    | 10 ++-
 .../server/api/services/RequestService.java     |  8 +-
 .../server/api/services/RootServiceService.java | 36 ++++-----
 .../server/api/services/ServiceService.java     |  8 +-
 .../server/api/services/Stacks2Service.java     | 58 +++++++-------
 .../server/api/services/StacksService.java      | 71 ++++++++++--------
 .../api/services/TargetClusterService.java      |  8 +-
 .../server/api/services/TaskAttemptService.java |  8 +-
 .../ambari/server/api/services/TaskService.java |  8 +-
 .../ambari/server/api/services/UserService.java |  8 +-
 .../ViewExternalSubResourceService.java         |  4 +-
 .../api/services/ViewInstanceService.java       |  8 +-
 .../ambari/server/api/services/ViewService.java |  8 +-
 .../server/api/services/ViewVersionService.java |  8 +-
 .../server/api/services/WorkflowService.java    |  8 +-
 .../ambari/server/controller/AmbariServer.java  |  3 +
 .../server/api/services/ActionServiceTest.java  |  8 +-
 .../api/services/BlueprintServiceTest.java      |  8 +-
 .../server/api/services/ClusterServiceTest.java |  8 +-
 .../api/services/ComponentServiceTest.java      |  8 +-
 .../api/services/ConfigGroupServiceTest.java    |  8 +-
 .../api/services/ConfigurationServiceTest.java  |  4 +-
 .../server/api/services/FeedServiceTest.java    |  8 +-
 .../api/services/HostComponentServiceTest.java  |  8 +-
 .../server/api/services/HostServiceTest.java    |  8 +-
 .../api/services/InstanceServiceTest.java       |  8 +-
 .../server/api/services/JobServiceTest.java     |  8 +-
 .../api/services/RootServiceServiceTest.java    | 28 +++----
 .../server/api/services/ServiceServiceTest.java |  8 +-
 .../server/api/services/Stacks2ServiceTest.java | 56 +++++++-------
 .../server/api/services/StacksServiceTest.java  | 56 +++++++-------
 .../api/services/TargetClusterServiceTest.java  |  8 +-
 .../api/services/TaskAttemptServiceTest.java    |  8 +-
 .../api/services/WorkflowServiceTest.java       |  8 +-
 46 files changed, 386 insertions(+), 295 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/MethodOverrideFilter.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/MethodOverrideFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/api/MethodOverrideFilter.java
new file mode 100644
index 0000000..c2e04ab
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/MethodOverrideFilter.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.api;
+
+import org.springframework.http.HttpMethod;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class MethodOverrideFilter implements Filter {
+  private static final String HEADER_NAME = "X-Http-Method-Override";
+  //limit override to GET method only (no need for others now)
+  private static final List<String> ALLOWED_METHODS = new ArrayList<String>(){{
+    add("GET");
+  }};
+
+  @Override
+  public void init(FilterConfig filterConfig) throws ServletException {
+
+  }
+
+  @Override
+  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+    if (request instanceof HttpServletRequest) {
+      HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+
+      String method = httpServletRequest.getHeader(HEADER_NAME);
+      if (method != null) {
+        if (ALLOWED_METHODS.contains(method.toUpperCase())) {
+          final HttpMethod httpMethod = HttpMethod.valueOf(method.toUpperCase());
+          HttpServletRequestWrapper requestWrapper = new HttpServletRequestWrapper(httpServletRequest){
+            @Override
+            public String getMethod() {
+              return httpMethod.toString();
+            }
+          };
+
+          chain.doFilter(requestWrapper, response);
+          return;
+        } else {
+          HttpServletResponse httpResponse = (HttpServletResponse) response;
+          httpResponse.sendError(400, "Incorrect HTTP method for override: "+ method + ". Allowed values: "+ ALLOWED_METHODS);
+        }
+      }
+    }
+    chain.doFilter(request, response);
+  }
+
+  @Override
+  public void destroy() {
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
index 78e8e07..0126d3f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
@@ -53,10 +53,10 @@ public class ActionService extends BaseService {
   @GET
   @Path("{actionName}")
   @Produces("text/plain")
-  public Response getActionDefinition(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getActionDefinition(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("actionName") String actionName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createActionDefinitionResource(actionName));
+    return handleRequest(headers, body, ui, Request.Type.GET, createActionDefinitionResource(actionName));
   }
 
   /**
@@ -69,8 +69,8 @@ public class ActionService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getActionDefinitions(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createActionDefinitionResource(null));
+  public Response getActionDefinitions(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createActionDefinitionResource(null));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
index 2d13ca7..f40f858 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
@@ -52,8 +52,8 @@ public class BlueprintService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getBlueprints(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createBlueprintResource(null));
+  public Response getBlueprints(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createBlueprintResource(null));
   }
 
   /**
@@ -68,10 +68,10 @@ public class BlueprintService extends BaseService {
   @GET
   @Path("{blueprintName}")
   @Produces("text/plain")
-  public Response getBlueprint(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getBlueprint(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("blueprintName") String blueprintName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createBlueprintResource(blueprintName));
+    return handleRequest(headers, body, ui, Request.Type.GET, createBlueprintResource(blueprintName));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
index a6630b8..29ca8a0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
@@ -44,10 +44,10 @@ public class ClusterService extends BaseService {
   @GET
   @Path("{clusterName}")
   @Produces("text/plain")
-  public Response getCluster(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("clusterName") String clusterName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createClusterResource(clusterName));
+    return handleRequest(headers, body, ui, Request.Type.GET, createClusterResource(clusterName));
   }
 
   /**
@@ -60,8 +60,8 @@ public class ClusterService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getClusters(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createClusterResource(null));
+  public Response getClusters(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createClusterResource(null));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
index f5a9f4e..a74ffb8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
@@ -63,10 +63,10 @@ public class ComponentService extends BaseService {
   @GET
   @Path("{componentName}")
   @Produces("text/plain")
-  public Response getComponent(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                                @PathParam("componentName") String componentName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createComponentResource(m_clusterName, m_serviceName, componentName));
   }
 
@@ -80,8 +80,8 @@ public class ComponentService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getComponents(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createComponentResource(m_clusterName, m_serviceName, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
index 4fb9a88..39f1f55 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java
@@ -61,9 +61,9 @@ public class ConfigGroupService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getConfigGroups(@Context HttpHeaders headers,
+  public Response getConfigGroups(String body, @Context HttpHeaders headers,
                                   @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createConfigGroupResource(m_clusterName, null));
   }
 
@@ -76,9 +76,9 @@ public class ConfigGroupService extends BaseService {
   @GET
   @Path("{groupId}")
   @Produces("text/plain")
-  public Response getConfigGroup(@Context HttpHeaders headers,
+  public Response getConfigGroup(String body, @Context HttpHeaders headers,
           @Context UriInfo ui, @PathParam("groupId") String groupId) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createConfigGroupResource(m_clusterName, groupId));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
index aef3423..fd2f744 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
@@ -60,8 +60,8 @@ public class ConfigurationService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getConfigurations(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createConfigurationResource(m_clusterName));
+  public Response getConfigurations(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createConfigurationResource(m_clusterName));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
index 99670b1..6741303 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/FeedService.java
@@ -52,10 +52,10 @@ public class FeedService extends BaseService {
   @GET
   @Path("{feedName}")
   @Produces("text/plain")
-  public Response getFeed(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getFeed(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("feedName") String feedName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createFeedResource(feedName));
+    return handleRequest(headers, body, ui, Request.Type.GET, createFeedResource(feedName));
   }
 
   /**
@@ -68,8 +68,8 @@ public class FeedService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getFeeds(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createFeedResource(null));
+  public Response getFeeds(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createFeedResource(null));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
index e5300ba..c21d1a1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostComponentService.java
@@ -73,7 +73,7 @@ public class HostComponentService extends BaseService {
   @GET
   @Path("{hostComponentName}")
   @Produces("text/plain")
-  public Response getHostComponent(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getHostComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                                    @PathParam("hostComponentName") String hostComponentName) {
 
     //todo: needs to be refactored when properly handling exceptions
@@ -83,7 +83,7 @@ public class HostComponentService extends BaseService {
       return Response.status(400).entity(s).build();
     }
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createHostComponentResource(m_clusterName, m_hostName, hostComponentName));
   }
 
@@ -97,8 +97,8 @@ public class HostComponentService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getHostComponents(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getHostComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createHostComponentResource(m_clusterName, m_hostName, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
index f89ea40..db9d3c0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
@@ -74,10 +74,10 @@ public class HostService extends BaseService {
   @GET
   @Path("{hostName}")
   @Produces("text/plain")
-  public Response getHost(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                           @PathParam("hostName") String hostName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createHostResource(m_clusterName, hostName, ui));
   }
 
@@ -91,8 +91,8 @@ public class HostService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getHosts(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createHostResource(m_clusterName, null, ui));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
index def322e..e771ccc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/InstanceService.java
@@ -75,10 +75,10 @@ public class InstanceService extends BaseService {
   @GET
   @Path("{instanceID}")
   @Produces("text/plain")
-  public Response getInstance(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getInstance(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                           @PathParam("instanceID") String instanceID) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createInstanceResource(m_feedName, instanceID, ui));
   }
 
@@ -92,8 +92,8 @@ public class InstanceService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getInstances(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getInstances(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createInstanceResource(m_feedName, null, ui));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
index e0a07d2..ab4b635 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/JobService.java
@@ -67,9 +67,9 @@ public class JobService extends BaseService {
   @GET
   @Path("{jobId}")
   @Produces("text/plain")
-  public Response getJob(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getJob(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("jobId") String jobId) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createJobResource(clusterName, workflowId, jobId));
   }
 
@@ -84,8 +84,8 @@ public class JobService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getJobs(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getJobs(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createJobResource(clusterName, workflowId, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
index 9c98e09..3ad589c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestScheduleService.java
@@ -62,9 +62,10 @@ public class RequestScheduleService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getRequestSchedules(@Context HttpHeaders headers,
+  public Response getRequestSchedules(String body,
+                                      @Context HttpHeaders headers,
                                       @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createRequestSchedule(m_clusterName, null));
   }
 
@@ -77,10 +78,11 @@ public class RequestScheduleService extends BaseService {
   @GET
   @Path("{requestScheduleId}")
   @Produces("text/plain")
-  public Response getRequestSchedule(@Context HttpHeaders headers,
+  public Response getRequestSchedule(String body,
+                                     @Context HttpHeaders headers,
                                      @Context UriInfo ui,
                                      @PathParam("requestScheduleId") String requestScheduleId) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createRequestSchedule(m_clusterName, requestScheduleId));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
index 4f333f3..9483254 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
@@ -72,10 +72,10 @@ public class RequestService extends BaseService {
   @GET
   @Path("{requestId}")
   @Produces("text/plain")
-  public Response getRequest(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getRequest(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("requestId") String requestId) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createRequestResource(m_clusterName, requestId));
   }
 
@@ -90,8 +90,8 @@ public class RequestService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getRequests(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getRequests(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createRequestResource(m_clusterName, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
index 34ebc15..79b266f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
@@ -39,30 +39,30 @@ public class RootServiceService extends BaseService {
   
   @GET
   @Produces("text/plain")
-  public Response getServices(@Context HttpHeaders headers, @Context UriInfo ui) {
+  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createServiceResource(null));
   }
   
   @GET
   @Path("{serviceName}")
   @Produces("text/plain")
-  public Response getService(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createServiceResource(serviceName));
   }
 
   @GET
   @Path("{serviceName}/components/{componentName}/hostComponents")
   @Produces("text/plain")
-  public Response getRootHostComponents(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getRootHostComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("serviceName") String serviceName,
       @PathParam("componentName") String componentName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createHostComponentResource(serviceName, null, componentName));
   }
   
@@ -70,19 +70,19 @@ public class RootServiceService extends BaseService {
   @GET
   @Path("{serviceName}/hosts/")
   @Produces("text/plain")
-  public Response getRootHosts(@Context HttpHeaders headers, @Context UriInfo ui) {
+  public Response getRootHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createHostResource(null));
   }
   
   @GET
   @Path("{serviceName}/hosts/{hostName}")
   @Produces("text/plain")
-  public Response getRootHost(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getRootHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("hostName") String hostName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createHostResource(hostName));
   }
   
@@ -95,23 +95,23 @@ public class RootServiceService extends BaseService {
   @GET
   @Path("{serviceName}/hosts/{hostName}/hostComponents/")
   @Produces("text/plain")
-  public Response getRootHostComponent(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getRootHostComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("serviceName") String serviceName,
       @PathParam("hostName") String hostName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createHostComponentResource(serviceName, hostName, null));
   }
   
   @GET
   @Path("{serviceName}/hosts/{hostName}/hostComponents/{hostComponent}")
   @Produces("text/plain")
-  public Response getRootHostComponent(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getRootHostComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("serviceName") String serviceName,
       @PathParam("hostName") String hostName,
       @PathParam("hostComponent") String hostComponent) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createHostComponentResource(serviceName, hostName, hostComponent));
   }
   
@@ -129,21 +129,21 @@ public class RootServiceService extends BaseService {
   @GET
   @Path("{serviceName}/components/")
   @Produces("text/plain")
-  public Response getServiceComponents(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getServiceComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createServiceComponentResource(serviceName, null));
   }
   
   @GET
   @Path("{serviceName}/components/{componentName}")
   @Produces("text/plain")
-  public Response getServiceComponent(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getServiceComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("serviceName") String serviceName,
       @PathParam("componentName") String componentName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createServiceComponentResource(serviceName, componentName));
   }
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
index 066002e..069f216 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
@@ -56,10 +56,10 @@ public class ServiceService extends BaseService {
   @GET
   @Path("{serviceName}")
   @Produces("text/plain")
-  public Response getService(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createServiceResource(m_clusterName, serviceName));
   }
 
@@ -73,8 +73,8 @@ public class ServiceService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getServices(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createServiceResource(m_clusterName, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java
index 7e1204a..41ba5ae 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java
@@ -43,40 +43,40 @@ public class Stacks2Service extends BaseService {
 
   @GET
   @Produces("text/plain")
-  public Response getStacks(@Context HttpHeaders headers, @Context UriInfo ui) {
+  public Response getStacks(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
       createStackResource(null));
   }
 
   @GET
   @Path("{stackName}")
   @Produces("text/plain")
-  public Response getStack(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getStack(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("stackName") String stackName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackResource(stackName));
   }
 
   @GET
   @Path("{stackName}/versions")
   @Produces("text/plain")
-  public Response getStackVersions(@Context HttpHeaders headers,
+  public Response getStackVersions(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackVersionResource(stackName, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}")
   @Produces("text/plain")
-  public Response getStackVersion(@Context HttpHeaders headers,
+  public Response getStackVersion(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackVersionResource(stackName, stackVersion));
   }
 
@@ -84,25 +84,25 @@ public class Stacks2Service extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/operatingSystems/{osType}/repositories")
   @Produces("text/plain")
-  public Response getRepositories(@Context HttpHeaders headers,
+  public Response getRepositories(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("osType") String osType) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createRepositoryResource(stackName, stackVersion, osType, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/operatingSystems/{osType}/repositories/{repoId}")
   @Produces("text/plain")
-  public Response getRepository(@Context HttpHeaders headers,
+  public Response getRepository(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("osType") String osType,
       @PathParam("repoId") String repoId) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createRepositoryResource(stackName, stackVersion, osType, repoId));
   }
   
@@ -123,36 +123,36 @@ public class Stacks2Service extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/stackServices")
   @Produces("text/plain")
-  public Response getStackServices(@Context HttpHeaders headers,
+  public Response getStackServices(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceResource(stackName, stackVersion, null));
   }
   
   @GET
   @Path("{stackName}/versions/{stackVersion}/stackServices/{serviceName}")
   @Produces("text/plain")
-  public Response getStackService(@Context HttpHeaders headers,
+  public Response getStackService(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceResource(stackName, stackVersion, serviceName));
   }
-  
+
   
   @GET
   @Path("{stackName}/versions/{stackVersion}/stackServices/{serviceName}/configurations")
   @Produces("text/plain")
-  public Response getStackConfigurations(@Context HttpHeaders headers,
+  public Response getStackConfigurations(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackConfigurationResource(stackName, stackVersion, serviceName, null));
   }
   
@@ -160,38 +160,38 @@ public class Stacks2Service extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/stackServices/{serviceName}/configurations/{propertyName}")
   @Produces("text/plain")
-  public Response getStackConfiguration(@Context HttpHeaders headers,
+  public Response getStackConfiguration(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("serviceName") String serviceName,
       @PathParam("propertyName") String propertyName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackConfigurationResource(stackName, stackVersion, serviceName, propertyName));
   }
   
   @GET
   @Path("{stackName}/versions/{stackVersion}/stackServices/{serviceName}/serviceComponents")
   @Produces("text/plain")
-  public Response getServiceComponents(@Context HttpHeaders headers,
+  public Response getServiceComponents(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceComponentResource(stackName, stackVersion, serviceName, null));
   }
   
   @GET
   @Path("{stackName}/versions/{stackVersion}/stackServices/{serviceName}/serviceComponents/{componentName}")
   @Produces("text/plain")
-  public Response getServiceComponent(@Context HttpHeaders headers,
+  public Response getServiceComponent(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("serviceName") String serviceName,
       @PathParam("componentName") String componentName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceComponentResource(stackName, stackVersion, serviceName, componentName));
   }
   
@@ -199,23 +199,23 @@ public class Stacks2Service extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/operatingSystems")
   @Produces("text/plain")
-  public Response getOperatingSystems(@Context HttpHeaders headers,
+  public Response getOperatingSystems(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createOperatingSystemResource(stackName, stackVersion, null));
   }
   
   @GET
   @Path("{stackName}/versions/{stackVersion}/operatingSystems/{osType}")
   @Produces("text/plain")
-  public Response getOperatingSystem(@Context HttpHeaders headers,
+  public Response getOperatingSystem(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("stackName") String stackName,
       @PathParam("stackVersion") String stackVersion,
       @PathParam("osType") String osType) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createOperatingSystemResource(stackName, stackVersion, osType));
   }
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
index 0218139..fc6e821 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
@@ -52,40 +52,43 @@ public class StacksService extends BaseService {
 
   @GET
   @Produces("text/plain")
-  public Response getStacks(@Context HttpHeaders headers, @Context UriInfo ui) {
+  public Response getStacks(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createStackResource(null));
   }
 
   @GET
   @Path("{stackName}")
   @Produces("text/plain")
-  public Response getStack(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getStack(String body, @Context HttpHeaders headers,
+                           @Context UriInfo ui,
                            @PathParam("stackName") String stackName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackResource(stackName));
   }
 
   @GET
   @Path("{stackName}/versions")
   @Produces("text/plain")
-  public Response getStackVersions(@Context HttpHeaders headers,
+  public Response getStackVersions(String body,
+                                   @Context HttpHeaders headers,
                                    @Context UriInfo ui, @PathParam("stackName") String stackName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackVersionResource(stackName, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}")
   @Produces("text/plain")
-  public Response getStackVersion(@Context HttpHeaders headers,
+  public Response getStackVersion(String body,
+                                  @Context HttpHeaders headers,
                                   @Context UriInfo ui, @PathParam("stackName") String stackName,
                                   @PathParam("stackVersion") String stackVersion) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackVersionResource(stackName, stackVersion));
   }
 
@@ -93,25 +96,27 @@ public class StacksService extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/operating_systems/{osType}/repositories")
   @Produces("text/plain")
-  public Response getRepositories(@Context HttpHeaders headers,
+  public Response getRepositories(String body,
+                                  @Context HttpHeaders headers,
                                   @Context UriInfo ui, @PathParam("stackName") String stackName,
                                   @PathParam("stackVersion") String stackVersion,
                                   @PathParam("osType") String osType) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createRepositoryResource(stackName, stackVersion, osType, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/operating_systems/{osType}/repositories/{repoId}")
   @Produces("text/plain")
-  public Response getRepository(@Context HttpHeaders headers,
+  public Response getRepository(String body,
+                                @Context HttpHeaders headers,
                                 @Context UriInfo ui, @PathParam("stackName") String stackName,
                                 @PathParam("stackVersion") String stackVersion,
                                 @PathParam("osType") String osType,
                                 @PathParam("repoId") String repoId) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createRepositoryResource(stackName, stackVersion, osType, repoId));
   }
 
@@ -132,23 +137,23 @@ public class StacksService extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/services")
   @Produces("text/plain")
-  public Response getStackServices(@Context HttpHeaders headers,
+  public Response getStackServices(String body, @Context HttpHeaders headers,
                                    @Context UriInfo ui, @PathParam("stackName") String stackName,
                                    @PathParam("stackVersion") String stackVersion) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackServiceResource(stackName, stackVersion, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}")
   @Produces("text/plain")
-  public Response getStackService(@Context HttpHeaders headers,
+  public Response getStackService(String body, @Context HttpHeaders headers,
                                   @Context UriInfo ui, @PathParam("stackName") String stackName,
                                   @PathParam("stackVersion") String stackVersion,
                                   @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackServiceResource(stackName, stackVersion, serviceName));
   }
 
@@ -156,12 +161,13 @@ public class StacksService extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/configurations")
   @Produces("text/plain")
-  public Response getStackConfigurations(@Context HttpHeaders headers,
+  public Response getStackConfigurations(String body,
+                                         @Context HttpHeaders headers,
                                          @Context UriInfo ui, @PathParam("stackName") String stackName,
                                          @PathParam("stackVersion") String stackVersion,
                                          @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackConfigurationResource(stackName, stackVersion, serviceName, null));
   }
 
@@ -169,52 +175,53 @@ public class StacksService extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/configurations/{propertyName}")
   @Produces("text/plain")
-  public Response getStackConfiguration(@Context HttpHeaders headers,
+  public Response getStackConfiguration(String body, @Context HttpHeaders headers,
                                         @Context UriInfo ui, @PathParam("stackName") String stackName,
                                         @PathParam("stackVersion") String stackVersion,
                                         @PathParam("serviceName") String serviceName,
                                         @PathParam("propertyName") String propertyName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackConfigurationResource(stackName, stackVersion, serviceName, propertyName));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components")
   @Produces("text/plain")
-  public Response getServiceComponents(@Context HttpHeaders headers,
+  public Response getServiceComponents(String body,
+                                       @Context HttpHeaders headers,
                                        @Context UriInfo ui, @PathParam("stackName") String stackName,
                                        @PathParam("stackVersion") String stackVersion,
                                        @PathParam("serviceName") String serviceName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackServiceComponentResource(stackName, stackVersion, serviceName, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components/{componentName}/dependencies")
   @Produces("text/plain")
-  public Response getServiceComponentDependencies(@Context HttpHeaders headers,
+  public Response getServiceComponentDependencies(String body, @Context HttpHeaders headers,
                                                   @Context UriInfo ui, @PathParam("stackName") String stackName,
                                                   @PathParam("stackVersion") String stackVersion,
                                                   @PathParam("serviceName") String serviceName,
                                                   @PathParam("componentName") String componentName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackServiceComponentDependencyResource(stackName, stackVersion, serviceName, componentName, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components/{componentName}/dependencies/{dependencyName}")
   @Produces("text/plain")
-  public Response getServiceComponentDependency(@Context HttpHeaders headers,
+  public Response getServiceComponentDependency(String body, @Context HttpHeaders headers,
                                       @Context UriInfo ui, @PathParam("stackName") String stackName,
                                       @PathParam("stackVersion") String stackVersion,
                                       @PathParam("serviceName") String serviceName,
                                       @PathParam("componentName") String componentName,
                                       @PathParam("dependencyName") String dependencyName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackServiceComponentDependencyResource(stackName, stackVersion, serviceName, componentName, dependencyName));
   }
 
@@ -223,13 +230,13 @@ public class StacksService extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components/{componentName}")
   @Produces("text/plain")
-  public Response getServiceComponent(@Context HttpHeaders headers,
+  public Response getServiceComponent(String body, @Context HttpHeaders headers,
                                       @Context UriInfo ui, @PathParam("stackName") String stackName,
                                       @PathParam("stackVersion") String stackVersion,
                                       @PathParam("serviceName") String serviceName,
                                       @PathParam("componentName") String componentName) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createStackServiceComponentResource(stackName, stackVersion, serviceName, componentName));
   }
 
@@ -237,23 +244,23 @@ public class StacksService extends BaseService {
   @GET
   @Path("{stackName}/versions/{stackVersion}/operating_systems")
   @Produces("text/plain")
-  public Response getOperatingSystems(@Context HttpHeaders headers,
+  public Response getOperatingSystems(String body, @Context HttpHeaders headers,
                                       @Context UriInfo ui, @PathParam("stackName") String stackName,
                                       @PathParam("stackVersion") String stackVersion) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createOperatingSystemResource(stackName, stackVersion, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/operating_systems/{osType}")
   @Produces("text/plain")
-  public Response getOperatingSystem(@Context HttpHeaders headers,
+  public Response getOperatingSystem(String body, @Context HttpHeaders headers,
                                      @Context UriInfo ui, @PathParam("stackName") String stackName,
                                      @PathParam("stackVersion") String stackVersion,
                                      @PathParam("osType") String osType) {
 
-    return handleRequest(headers, null, new StackUriInfo(ui), Request.Type.GET,
+    return handleRequest(headers, body, new StackUriInfo(ui), Request.Type.GET,
         createOperatingSystemResource(stackName, stackVersion, osType));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
index 4eb6c86..34c8c26 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TargetClusterService.java
@@ -52,10 +52,10 @@ public class TargetClusterService extends BaseService {
   @GET
   @Path("{targetName}")
   @Produces("text/plain")
-  public Response getTargetCluster(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getTargetCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                           @PathParam("targetName") String targetName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createTargetClusterResource(targetName));
+    return handleRequest(headers, body, ui, Request.Type.GET, createTargetClusterResource(targetName));
   }
 
   /**
@@ -68,8 +68,8 @@ public class TargetClusterService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getTargetClusters(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createTargetClusterResource(null));
+  public Response getTargetClusters(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createTargetClusterResource(null));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
index 785052f..532a5a4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java
@@ -74,11 +74,11 @@ public class TaskAttemptService extends BaseService {
   @GET
   @Path("{taskAttemptId}")
   @Produces("text/plain")
-  public Response getTaskAttempt(@Context HttpHeaders headers,
+  public Response getTaskAttempt(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("taskAttemptId") String taskAttemptId) {
     return handleRequest(
         headers,
-        null,
+        body,
         ui,
         Request.Type.GET,
         createTaskAttemptResource(clusterName, workflowId, jobId, taskAttemptId));
@@ -97,9 +97,9 @@ public class TaskAttemptService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getTaskAttempts(@Context HttpHeaders headers,
+  public Response getTaskAttempts(String body, @Context HttpHeaders headers,
       @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createTaskAttemptResource(clusterName, workflowId, jobId, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
index 3997375..ade8d9c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskService.java
@@ -70,10 +70,10 @@ public class TaskService extends BaseService {
   @GET
   @Path("{taskId}")
   @Produces("text/plain")
-  public Response getTask(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getTask(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                           @PathParam("taskId") String taskId) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createTaskResource(m_clusterName, m_requestId, taskId));
   }
 
@@ -88,8 +88,8 @@ public class TaskService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getComponents(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createTaskResource(m_clusterName, m_requestId, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
index 1855978..87cb3ba 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
@@ -46,8 +46,8 @@ public class UserService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getUsers(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createUserResource(null));
+  public Response getUsers(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createUserResource(null));
   }
 
   /**
@@ -62,9 +62,9 @@ public class UserService extends BaseService {
   @GET
   @Path("{userName}")
   @Produces("text/plain")
-  public Response getUser(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
       @PathParam("userName") String userName) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createUserResource(userName));
+    return handleRequest(headers, body, ui, Request.Type.GET, createUserResource(userName));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
index 28912f4..47ac0df 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
@@ -88,8 +88,8 @@ public class ViewExternalSubResourceService  extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getResources(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getResources(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createResource(viewName, instanceName));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
index 5d4ae97..c32abe6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
@@ -81,10 +81,10 @@ public class ViewInstanceService extends BaseService {
   @GET
   @Path("{instanceName}")
   @Produces("text/plain")
-  public Response getService(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("instanceName") String instanceName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createResource(viewName, version, instanceName));
   }
 
@@ -99,8 +99,8 @@ public class ViewInstanceService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getServices(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createResource(viewName, version,  null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
index b177ec9..b7edbe3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
@@ -54,10 +54,10 @@ public class ViewService extends BaseService {
   @GET
   @Path("{viewName}")
   @Produces("text/plain")
-  public Response getView(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getView(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                              @PathParam("viewName") String viewName) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createViewResource(viewName));
+    return handleRequest(headers, body, ui, Request.Type.GET, createViewResource(viewName));
   }
 
   /**
@@ -71,8 +71,8 @@ public class ViewService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getViews(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createViewResource(null));
+  public Response getViews(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createViewResource(null));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
index a3bde5e..0dac300 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
@@ -74,10 +74,10 @@ public class ViewVersionService extends BaseService {
   @GET
   @Path("{version}")
   @Produces("text/plain")
-  public Response getVersions(@Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                           @PathParam("version") String version) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createResource(viewName, version));
+    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version));
   }
 
   /**
@@ -91,9 +91,9 @@ public class ViewVersionService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getVersions(@Context HttpHeaders headers, @Context UriInfo ui) {
+  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
-    return handleRequest(headers, null, ui, Request.Type.GET, createResource(viewName, null));
+    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, null));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
index c67c540..53ad919 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/WorkflowService.java
@@ -63,9 +63,9 @@ public class WorkflowService extends BaseService {
   @GET
   @Path("{workflowId}")
   @Produces("text/plain")
-  public Response getWorkflow(@Context HttpHeaders headers,
+  public Response getWorkflow(String body, @Context HttpHeaders headers,
       @Context UriInfo ui, @PathParam("workflowId") String workflowId) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createWorkflowResource(clusterName, workflowId));
   }
 
@@ -80,8 +80,8 @@ public class WorkflowService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  public Response getWorkflows(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
+  public Response getWorkflows(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
         createWorkflowResource(clusterName, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index c561ed2..a515ec6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -34,6 +34,7 @@ import org.apache.ambari.server.agent.HeartBeatHandler;
 import org.apache.ambari.server.agent.rest.AgentResource;
 import org.apache.ambari.server.api.AmbariErrorHandler;
 import org.apache.ambari.server.api.AmbariPersistFilter;
+import org.apache.ambari.server.api.MethodOverrideFilter;
 import org.apache.ambari.server.api.rest.BootStrapResource;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.api.services.KeyService;
@@ -216,6 +217,8 @@ public class AmbariServer {
       //session-per-request strategy for api and agents
       root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/api/*", 1);
       root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/proxy/*", 1);
+      root.addFilter(new FilterHolder(new MethodOverrideFilter()), "/api/*", 1);
+      root.addFilter(new FilterHolder(new MethodOverrideFilter()), "/proxy/*", 1);
       agentroot.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/agent/*", 1);
 
       agentroot.addFilter(SecurityFilter.class, "/*", 1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
index 934bc31..ee85e8d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActionServiceTest.java
@@ -41,14 +41,14 @@ public class ActionServiceTest extends BaseServiceTest {
 
     //getActionDefinition
     ActionService service = new TestActionDefinitionService("actionName");
-    Method m = service.getClass().getMethod("getActionDefinition", HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "actionName"};
+    Method m = service.getClass().getMethod("getActionDefinition", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "actionName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getActionDefinitions
     service = new TestActionDefinitionService(null);
-    m = service.getClass().getMethod("getActionDefinitions", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getActionDefinitions", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //createActionDefinition

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
index b109e96..2b368cb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/BlueprintServiceTest.java
@@ -41,14 +41,14 @@ public class BlueprintServiceTest extends BaseServiceTest {
 
     //getBlueprint
     BlueprintService BlueprintService = new TestBlueprintService("blueprintName");
-    Method m = BlueprintService.getClass().getMethod("getBlueprint", HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "blueprintName"};
+    Method m = BlueprintService.getClass().getMethod("getBlueprint", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "blueprintName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, BlueprintService, m, args, null));
 
     //getBlueprints
     BlueprintService = new TestBlueprintService(null);
-    m = BlueprintService.getClass().getMethod("getBlueprints", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = BlueprintService.getClass().getMethod("getBlueprints", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, BlueprintService, m, args, null));
 
     //createBlueprint

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
index 9fe76b8..238dc83 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
@@ -43,14 +43,14 @@ public class ClusterServiceTest extends BaseServiceTest {
 
     //getCluster
     ClusterService clusterService = new TestClusterService("clusterName");
-    Method m = clusterService.getClass().getMethod("getCluster", HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "clusterName"};
+    Method m = clusterService.getClass().getMethod("getCluster", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "clusterName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, clusterService, m, args, null));
 
     //getClusters
     clusterService = new TestClusterService(null);
-    m = clusterService.getClass().getMethod("getClusters", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = clusterService.getClass().getMethod("getClusters", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, clusterService, m, args, null));
 
     //createCluster

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
index c6c154f..742514b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
@@ -43,14 +43,14 @@ public class ComponentServiceTest extends BaseServiceTest {
 
     //getComponent
     ComponentService service = new TestComponentService("clusterName", "serviceName", "componentName");
-    Method m = service.getClass().getMethod("getComponent", HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "componentName"};
+    Method m = service.getClass().getMethod("getComponent", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "componentName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //getComponents
     service = new TestComponentService("clusterName", "serviceName", null);
-    m = service.getClass().getMethod("getComponents", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = service.getClass().getMethod("getComponents", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //createComponent

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
index 1e13355..22694f6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigGroupServiceTest.java
@@ -39,16 +39,16 @@ public class ConfigGroupServiceTest extends BaseServiceTest {
     ConfigGroupService configGroupService = new TestConfigGroupService
       ("clusterName", null);
     Method m = configGroupService.getClass().getMethod("getConfigGroups",
-      HttpHeaders.class, UriInfo.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo()};
+      String.class, HttpHeaders.class, UriInfo.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET,
       configGroupService, m, args, null));
 
     // Get Config Group
     configGroupService = new TestConfigGroupService("clusterName", "groupId");
     m = configGroupService.getClass().getMethod("getConfigGroup",
-      HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "groupId"};
+      String.class, HttpHeaders.class, UriInfo.class, String.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo(), "groupId"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET,
       configGroupService, m, args, null));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
index 408f3db..7ad3e3a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
@@ -37,8 +37,8 @@ public class ConfigurationServiceTest extends BaseServiceTest {
 
     //getConfigurations
     ConfigurationService service = new TestConfigurationService("clusterName");
-    Method m = service.getClass().getMethod("getConfigurations", HttpHeaders.class, UriInfo.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo()};
+    Method m = service.getClass().getMethod("getConfigurations", String.class, HttpHeaders.class, UriInfo.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
 
     //createConfigurations

http://git-wip-us.apache.org/repos/asf/ambari/blob/68f04737/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
index 7a3ae46..332e55c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/FeedServiceTest.java
@@ -43,14 +43,14 @@ public class FeedServiceTest extends BaseServiceTest {
 
     //getFeed
     FeedService feedService = new TestFeedService("feedName");
-    Method m = feedService.getClass().getMethod("getFeed", HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "feedName"};
+    Method m = feedService.getClass().getMethod("getFeed", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "feedName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, feedService, m, args, null));
 
     //getFeeds
     feedService = new TestFeedService(null);
-    m = feedService.getClass().getMethod("getFeeds", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
+    m = feedService.getClass().getMethod("getFeeds", String.class, HttpHeaders.class, UriInfo.class);
+    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, feedService, m, args, null));
 
     //createFeed


Mime
View raw message