ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/2] ambari git commit: AMBARI-15888. Pass request object to delete API in resource providers (ajit)
Date Tue, 19 Apr 2016 22:39:49 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6eb521d96 -> 36d2b0c91


http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java
index ec7425e..1d7dbcc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java
@@ -67,10 +67,10 @@ public interface ClusterController extends SchemaFactory {
    *
    * @throws SystemException if unable to populate the resources
    */
-  public Set<Resource> populateResources(Resource.Type type,
-                                            Set<Resource> resources,
-                                            Request request,
-                                            Predicate predicate) throws SystemException;
+  Set<Resource> populateResources(Resource.Type type,
+                                  Set<Resource> resources,
+                                  Request request,
+                                  Predicate predicate) throws SystemException;
 
   /**
    * Get an iterable set of resources from the given set of resources filtered by the
@@ -135,7 +135,7 @@ public interface ClusterController extends SchemaFactory {
    * @return the schema object for the given resource
    */
   @Override
-  public Schema getSchema(Resource.Type type);
+  Schema getSchema(Resource.Type type);
 
   /**
    * Get the resource provider for the given type, creating it if required.
@@ -144,7 +144,7 @@ public interface ClusterController extends SchemaFactory {
    *
    * @return the resource provider
    */
-  public ResourceProvider ensureResourceProvider(Resource.Type type);
+  ResourceProvider ensureResourceProvider(Resource.Type type);
 
   // ----- Management -------------------------------------------------------
 
@@ -161,7 +161,7 @@ public interface ClusterController extends SchemaFactory {
    * @throws ResourceAlreadyExistsException attempted to create a resource that already exists
    * @throws NoSuchParentResourceException a specified parent resource doesn't exist
    */
-  public RequestStatus createResources(Resource.Type type, Request request)
+  RequestStatus createResources(Resource.Type type, Request request)
       throws UnsupportedPropertyException,
              SystemException,
              ResourceAlreadyExistsException,
@@ -184,9 +184,9 @@ public interface ClusterController extends SchemaFactory {
    * @throws NoSuchResourceException no matching resource(s) found
    * @throws NoSuchParentResourceException a specified parent resource doesn't exist
    */
-  public RequestStatus updateResources(Resource.Type type,
-                                       Request request,
-                                       Predicate predicate)
+  RequestStatus updateResources(Resource.Type type,
+                                Request request,
+                                Predicate predicate)
       throws UnsupportedPropertyException,
              SystemException,
              NoSuchResourceException,
@@ -196,16 +196,19 @@ public interface ClusterController extends SchemaFactory {
    * Delete the resources selected by the given predicate.
    *
    * @param type      the type of the resources
+   * @param request   the request object which defines the set of properties
+   *                  for the resources to be deleted
    * @param predicate the predicate object which can be used to filter which
    *                  resources are deleted
-   *
-   * @throws UnsupportedPropertyException thrown if the predicate contains
+   *  @throws UnsupportedPropertyException thrown if the predicate contains
    *                                      unsupported property ids
    * @throws SystemException an internal exception occurred
    * @throws NoSuchResourceException no matching resource(s) found
    * @throws NoSuchParentResourceException a specified parent resource doesn't exist
    */
-  public RequestStatus deleteResources(Resource.Type type, Predicate predicate)
+  RequestStatus deleteResources(Resource.Type type,
+                                Request request,
+                                Predicate predicate)
       throws UnsupportedPropertyException,
              SystemException,
              NoSuchResourceException,

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ResourceProvider.java
index de1c9dd..56d9748 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ResourceProvider.java
@@ -44,7 +44,7 @@ public interface ResourceProvider {
    * @throws ResourceAlreadyExistsException attempted to create a resource which already exists
    * @throws NoSuchParentResourceException a parent resource of the resource to create doesn't exist
    */
-  public RequestStatus createResources(Request request)
+  RequestStatus createResources(Request request)
       throws SystemException,
       UnsupportedPropertyException,
       ResourceAlreadyExistsException,
@@ -77,7 +77,7 @@ public interface ResourceProvider {
    * @throws NoSuchResourceException the requested resource instance doesn't exist
    * @throws NoSuchParentResourceException a parent resource of the requested resource doesn't exist
    */
-  public Set<Resource> getResources(Request request, Predicate predicate)
+  Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException,
       UnsupportedPropertyException,
       NoSuchResourceException,
@@ -101,7 +101,7 @@ public interface ResourceProvider {
    * @throws NoSuchResourceException the resource instance to be updated doesn't exist
    * @throws NoSuchParentResourceException a parent resource of the resource doesn't exist
    */
-  public RequestStatus updateResources(Request request, Predicate predicate)
+  RequestStatus updateResources(Request request, Predicate predicate)
       throws SystemException,
       UnsupportedPropertyException,
       NoSuchResourceException,
@@ -110,8 +110,8 @@ public interface ResourceProvider {
   /**
    * Delete the resources selected by the given predicate.
    *
-   *
-   *
+   * @param request   the request object which defines the set of properties
+   *                  for the resources to be updated
    * @param predicate the predicate object which can be used to filter which
    *                  resources are deleted
    *
@@ -122,7 +122,7 @@ public interface ResourceProvider {
    * @throws NoSuchResourceException the resource instance to be deleted doesn't exist
    * @throws NoSuchParentResourceException a parent resource of the resource doesn't exist
    */
-  public RequestStatus deleteResources(Predicate predicate)
+  RequestStatus deleteResources(Request request, Predicate predicate)
       throws SystemException,
       UnsupportedPropertyException,
       NoSuchResourceException,
@@ -139,7 +139,7 @@ public interface ResourceProvider {
    *
    * @return a map of key property ids
    */
-  public Map<Resource.Type, String> getKeyPropertyIds();
+  Map<Resource.Type, String> getKeyPropertyIds();
 
   /**
    * Check whether the set of given property ids is supported by this resource
@@ -149,5 +149,5 @@ public interface ResourceProvider {
    *         supported by this resource provider.  An empty return set indicates
    *         that all of the given property ids are supported.
    */
-  public Set<String> checkPropertyIds(Set<String> propertyIds);
+  Set<String> checkPropertyIds(Set<String> propertyIds);
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
index b6c2f12..4532d7f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CleanupServerAction.java
@@ -21,6 +21,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.agent.CommandReport;
 import org.apache.ambari.server.controller.internal.ArtifactResourceProvider;
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.spi.*;
 import org.apache.ambari.server.controller.utilities.ClusterControllerHelper;
 import org.apache.ambari.server.controller.utilities.PredicateBuilder;
@@ -101,7 +102,7 @@ public class CleanupServerAction extends KerberosServerAction {
       clusterController.ensureResourceProvider(Resource.Type.Artifact);
 
     try {
-      artifactProvider.deleteResources(predicate);
+      artifactProvider.deleteResources(new RequestImpl(null, null, null, null), predicate);
       LOG.info("Kerberos descriptor removed successfully.");
       actionLog.writeStdOut("Kerberos descriptor removed successfully.");
     } catch (NoSuchResourceException e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExternalSubResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExternalSubResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExternalSubResourceProvider.java
index f669e49..7aad0b6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExternalSubResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExternalSubResourceProvider.java
@@ -145,7 +145,7 @@ public class ViewExternalSubResourceProvider extends AbstractResourceProvider {
   }
 
   @Override
-  public RequestStatus deleteResources(Predicate predicate)
+  public RequestStatus deleteResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
     throw new UnsupportedOperationException("Not supported!");

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java
index 8e1ccbc..c498652 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java
@@ -212,7 +212,7 @@ public class ViewSubResourceProvider extends AbstractResourceProvider {
   }
 
   @Override
-  public RequestStatus deleteResources(Predicate predicate)
+  public RequestStatus deleteResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
 
     Set<Resource> resources = getResources(PropertyHelper.getReadRequest(), predicate);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java
index 243e06a..951c1db 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistenceManagerImplTest.java
@@ -23,6 +23,7 @@ import org.apache.ambari.server.api.query.Query;
 import org.apache.ambari.server.api.resources.ResourceDefinition;
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl;
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.internal.RequestStatusImpl;
 import org.apache.ambari.server.controller.spi.ClusterController;
 import org.apache.ambari.server.controller.spi.Predicate;
@@ -307,11 +308,11 @@ public class PersistenceManagerImplTest {
     expect(resource.getQuery()).andReturn(query).anyTimes();
     expect(query.getPredicate()).andReturn(predicate).anyTimes();
 
-    expect(controller.deleteResources(Resource.Type.Component, predicate)).andReturn(new RequestStatusImpl(null));
+    expect(controller.deleteResources(Resource.Type.Component, new RequestImpl(null, null, null, null), predicate)).andReturn(new RequestStatusImpl(null));
 
     replay(resource, resourceDefinition, controller, query, predicate);
 
-    new TestPersistenceManager(controller, null, null).delete(resource, body);
+    new PersistenceManagerImpl(controller).delete(resource, body);
 
     verify(resource, resourceDefinition, controller, query, predicate);
   }
@@ -337,4 +338,4 @@ public class PersistenceManagerImplTest {
       return m_request;
     }
   }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerClusterProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerClusterProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerClusterProviderTest.java
index e4a595c..ec462de 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerClusterProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerClusterProviderTest.java
@@ -19,6 +19,7 @@
 package org.apache.ambari.server.controller.gsinstaller;
 
 import junit.framework.Assert;
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.utilities.PredicateBuilder;
@@ -93,7 +94,7 @@ public class GSInstallerClusterProviderTest {
     GSInstallerResourceProvider provider = new GSInstallerClusterProvider(clusterDefinition);
 
     try {
-      provider.deleteResources(null);
+      provider.deleteResources(new RequestImpl(null, null, null, null), null);
       Assert.fail("Expected UnsupportedOperationException.");
     } catch (UnsupportedOperationException e) {
       //expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerComponentProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerComponentProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerComponentProviderTest.java
index 07ff7fe..fcbf35b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerComponentProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerComponentProviderTest.java
@@ -23,6 +23,7 @@ import java.util.Set;
 
 import junit.framework.Assert;
 
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.utilities.PredicateBuilder;
@@ -92,7 +93,7 @@ public class GSInstallerComponentProviderTest {
     GSInstallerResourceProvider provider = new GSInstallerComponentProvider(clusterDefinition);
 
     try {
-      provider.deleteResources(null);
+      provider.deleteResources(new RequestImpl(null, null, null, null), null);
       Assert.fail("Expected UnsupportedOperationException.");
     } catch (UnsupportedOperationException e) {
       //expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostComponentProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostComponentProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostComponentProviderTest.java
index c9878f5..21a2d1d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostComponentProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostComponentProviderTest.java
@@ -23,6 +23,7 @@ import java.util.Set;
 
 import junit.framework.Assert;
 
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.utilities.PredicateBuilder;
@@ -139,7 +140,7 @@ public class GSInstallerHostComponentProviderTest {
     GSInstallerResourceProvider provider = new GSInstallerHostComponentProvider(clusterDefinition);
 
     try {
-      provider.deleteResources(null);
+      provider.deleteResources(new RequestImpl(null, null, null, null), null);
       Assert.fail("Expected UnsupportedOperationException.");
     } catch (UnsupportedOperationException e) {
       //expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostProviderTest.java
index 32b1250..fa9a274 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerHostProviderTest.java
@@ -19,6 +19,7 @@
 package org.apache.ambari.server.controller.gsinstaller;
 
 import junit.framework.Assert;
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.utilities.PredicateBuilder;
@@ -141,7 +142,7 @@ public class GSInstallerHostProviderTest {
     GSInstallerResourceProvider provider = new GSInstallerHostProvider(clusterDefinition);
 
     try {
-      provider.deleteResources(null);
+      provider.deleteResources(new RequestImpl(null, null, null, null), null);
       Assert.fail("Expected UnsupportedOperationException.");
     } catch (UnsupportedOperationException e) {
       //expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerServiceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerServiceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerServiceProviderTest.java
index 3fd4bd7..aecf201 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerServiceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/gsinstaller/GSInstallerServiceProviderTest.java
@@ -23,6 +23,8 @@ import java.util.Set;
 
 import junit.framework.Assert;
 
+import org.apache.ambari.server.api.services.ResultImpl;
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.utilities.PredicateBuilder;
@@ -156,7 +158,7 @@ public class GSInstallerServiceProviderTest {
     GSInstallerResourceProvider provider = new GSInstallerServiceProvider(clusterDefinition);
 
     try {
-      provider.deleteResources(null);
+      provider.deleteResources(new RequestImpl(null, null, null, null), null);
       Assert.fail("Expected UnsupportedOperationException.");
     } catch (UnsupportedOperationException e) {
       //expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
index 0a5cfcc..466b998 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
@@ -121,7 +121,7 @@ public class AbstractJDBCResourceProviderTest {
     }
 
     @Override
-    public RequestStatus deleteResources(Predicate predicate)
+    public RequestStatus deleteResources(Request request, Predicate predicate)
         throws SystemException, UnsupportedPropertyException,
         NoSuchResourceException, NoSuchParentResourceException {
       return null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
index 1731439..ed16d68 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
@@ -887,7 +887,7 @@ public class AbstractResourceProviderTest {
     }
 
     @Override
-    public RequestStatus deleteResources(Predicate predicate)
+    public RequestStatus deleteResources(Request request, Predicate predicate)
         throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
       return new RequestStatusImpl(null);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java
index e9abfb3..d38108f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java
@@ -316,7 +316,7 @@ public class ActiveWidgetLayoutResourceProviderTest extends EasyMockSupport {
 
     ResourceProvider provider = getResourceProvider(injector, managementController);
 
-    provider.deleteResources(createPredicate(requestedUsername));
+    provider.deleteResources(new RequestImpl(null, null, null, null), createPredicate(requestedUsername));
 
     verifyAll();
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java
index 79d512a..735e927 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java
@@ -829,7 +829,7 @@ public class AlertDefinitionResourceProviderTest {
     expectLastCall();
     replay(dao);
 
-    provider.deleteResources(p);
+    provider.deleteResources(new RequestImpl(null, null, null, null), p);
 
     AlertDefinitionEntity entity1 = entityCapture.getValue();
     Assert.assertEquals(Long.valueOf(1), entity1.getDefinitionId());

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java
index eaf351d..1aeb9f5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java
@@ -789,7 +789,7 @@ public class AlertGroupResourceProviderTest {
     expectLastCall();
     replay(m_dao);
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     AlertGroupEntity entity1 = entityCapture.getValue();
     assertEquals(ALERT_GROUP_ID, entity1.getGroupId());
@@ -850,7 +850,7 @@ public class AlertGroupResourceProviderTest {
         AlertGroupResourceProvider.ALERT_GROUP_ID).equals(
         ALERT_GROUP_ID.toString()).toPredicate();
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
     verify(m_dao, m_amc);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
index 7277b67..254d72f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
@@ -819,7 +819,7 @@ public class AlertTargetResourceProviderTest {
     expectLastCall();
     replay(m_dao);
 
-    provider.deleteResources(p);
+    provider.deleteResources(new RequestImpl(null, null, null, null), p);
 
     AlertTargetEntity entity1 = entityCapture.getValue();
     Assert.assertEquals(ALERT_TARGET_ID, entity1.getTargetId());

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
index 98494d8..67a94ea 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
@@ -784,7 +784,7 @@ public class AmbariPrivilegeResourceProviderTest extends EasyMockSupport {
     SecurityContextHolder.getContext().setAuthentication(authentication);
 
     ResourceProvider provider = getResourceProvider(injector);
-    provider.deleteResources(createPredicate(1L));
+    provider.deleteResources(new RequestImpl(null, null, null, null), createPredicate(1L));
 
     verifyAll();
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java
index 33a228a..7486f40 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java
@@ -450,7 +450,7 @@ public class ArtifactResourceProviderTest {
     PredicateBuilder pb = new PredicateBuilder();
     Predicate predicate = pb.begin().property("Artifacts/cluster_name").equals("test-cluster").end().toPredicate();
 
-    RequestStatus response = resourceProvider.deleteResources(predicate);
+    RequestStatus response = resourceProvider.deleteResources(new RequestImpl(null, null, null, null), predicate);
     ArtifactEntity deleteEntity = deleteEntityCapture.getValue();
     ArtifactEntity deleteEntity2 = deleteEntityCapture2.getValue();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
index 30e7c01..2f4f890 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
@@ -478,7 +478,7 @@ public class BlueprintResourceProviderTest {
     AbstractResourceProviderTest.TestObserver observer = new AbstractResourceProviderTest.TestObserver();
     provider.addObserver(observer);
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();
     assertNotNull(lastEvent);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
index e2146d0..9603226 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
@@ -553,7 +553,7 @@ public class ClientConfigResourceProviderTest {
     Predicate predicate = new PredicateBuilder().property(
             ClientConfigResourceProvider.COMPONENT_COMPONENT_NAME_PROPERTY_ID).equals("HDFS_CLIENT").toPredicate();
     try {
-      provider.deleteResources(predicate);
+      provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
       Assert.fail("Expected an UnsupportedOperationException");
     } catch (SystemException e) {
       // expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java
index 3f292ca..0bcd067 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java
@@ -767,7 +767,7 @@ public class ClusterControllerImplTest {
 
     Predicate predicate = new PredicateBuilder().property("c1/p2").equals(1).toPredicate();
 
-    controller.deleteResources(Resource.Type.Host, predicate);
+    controller.deleteResources(Resource.Type.Host, new RequestImpl(null, null, null, null), predicate);
 
     Assert.assertEquals(TestHostResourceProvider.Action.Delete, resourceProvider.getLastAction());
     Assert.assertNull(resourceProvider.getLastRequest());
@@ -782,7 +782,7 @@ public class ClusterControllerImplTest {
     Predicate predicate = new PredicateBuilder().property(UNSUPPORTED_PROPERTY).equals(1).toPredicate();
 
     try {
-      controller.deleteResources(Resource.Type.Host, predicate);
+      controller.deleteResources(Resource.Type.Host, new RequestImpl(null, null, null, null), predicate);
       Assert.fail("Expected an UnsupportedPropertyException for the unsupported properties.");
     } catch (UnsupportedPropertyException e) {
       // Expected
@@ -797,7 +797,7 @@ public class ClusterControllerImplTest {
 
     Predicate predicate = new PredicateBuilder().property("c3/p6").equals(1).toPredicate();
 
-    controller.deleteResources(Resource.Type.Host, predicate);
+    controller.deleteResources(Resource.Type.Host, new RequestImpl(null, null, null, null), predicate);
 
     Assert.assertEquals(TestHostResourceProvider.Action.Delete, resourceProvider.getLastAction());
     Assert.assertNull(resourceProvider.getLastRequest());
@@ -989,7 +989,7 @@ public class ClusterControllerImplTest {
     }
 
     @Override
-    public RequestStatus deleteResources(Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
+    public RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
       throw new UnsupportedOperationException(); // not needed for testing
     }
 
@@ -1099,7 +1099,7 @@ public class ClusterControllerImplTest {
     }
 
     @Override
-    public RequestStatus deleteResources(Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
+    public RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
       lastAction = Action.Delete;
       lastRequest = null;
       lastPredicate = predicate;

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterKerberosDescriptorResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterKerberosDescriptorResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterKerberosDescriptorResourceProviderTest.java
index 2d72cb0..d56ed44 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterKerberosDescriptorResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterKerberosDescriptorResourceProviderTest.java
@@ -626,7 +626,7 @@ public class ClusterKerberosDescriptorResourceProviderTest extends EasyMockSuppo
         .toPredicate();
     Predicate predicate = new AndPredicate(predicate1, predicate2);
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     verifyAll();
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProviderTest.java
index bff15af..f00a21a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProviderTest.java
@@ -412,7 +412,7 @@ public class ClusterPrivilegeResourceProviderTest extends EasyMockSupport {
     SecurityContextHolder.getContext().setAuthentication(authentication);
 
     ResourceProvider provider = getResourceProvider(injector);
-    provider.deleteResources(createPredicate(1L));
+    provider.deleteResources(new RequestImpl(null, null, null, null), createPredicate(1L));
 
     verifyAll();
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
index 7292be2..7f2ea7c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
@@ -761,12 +761,12 @@ public class ClusterResourceProviderTest {
     // delete the cluster named Cluster102
     Predicate  predicate = new PredicateBuilder().property(
         ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID).equals("Cluster102").toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     // delete the cluster where id == 103
     predicate = new PredicateBuilder().property(
         ClusterResourceProvider.CLUSTER_ID_PROPERTY_ID).equals(103L).toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();
     Assert.assertNotNull(lastEvent);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
index 286b3cf..d7b45e0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
@@ -525,7 +525,7 @@ public class ComponentResourceProviderTest {
                 .property(ComponentResourceProvider.COMPONENT_COMPONENT_NAME_PROPERTY_ID)
                 .equals("Component100").toPredicate();
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     // verify
     verify(managementController, service);
@@ -579,7 +579,7 @@ public class ComponentResourceProviderTest {
                 .equals("Component100").toPredicate();
 
     try {
-      provider.deleteResources(predicate1);
+      provider.deleteResources(new RequestImpl(null, null, null, null), predicate1);
       Assert.fail("Expected IllegalArgumentException exception.");
     } catch (IllegalArgumentException e) {
       //expected
@@ -594,7 +594,7 @@ public class ComponentResourceProviderTest {
                 .and().toPredicate();
 
     try {
-      provider.deleteResources(predicate2);
+      provider.deleteResources(new RequestImpl(null, null, null, null), predicate2);
       Assert.fail("Expected IllegalArgumentException exception.");
     } catch (IllegalArgumentException e) {
       //expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
index 5b9785e..2913cf5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
@@ -720,7 +720,7 @@ public class ConfigGroupResourceProviderTest {
       .equals("Cluster100").and().property(ConfigGroupResourceProvider
         .CONFIGGROUP_ID_PROPERTY_ID).equals(1L).toPredicate();
 
-    resourceProvider.deleteResources(predicate);
+    resourceProvider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();
     Assert.assertNotNull(lastEvent);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
index 6f7db80..534a899 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
@@ -338,7 +338,7 @@ public class ConfigurationResourceProviderTest {
     Predicate predicate = new PredicateBuilder().property(
         ConfigurationResourceProvider.CONFIGURATION_CONFIG_TAG_PROPERTY_ID).equals("Configuration100").toPredicate();
     try {
-      provider.deleteResources(predicate);
+      provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
       Assert.fail("Expected an UnsupportedOperationException");
     } catch (UnsupportedOperationException e) {
       // expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
index 31bf191..df4d8ed 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
@@ -818,7 +818,7 @@ public class CredentialResourceProviderTest {
       }
     }
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     try {
       provider.getResources(request, predicate);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
index 39a0509..c4911c7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
@@ -193,7 +193,7 @@ public class FeedResourceProviderTest {
 
     Predicate predicate = new PredicateBuilder().property(FeedResourceProvider.FEED_NAME_PROPERTY_ID).equals("Feed1").toPredicate();
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     // verify
     verify(service);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
index 205f467..bab9394 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
@@ -87,7 +87,7 @@ public class GroupPrivilegeResourceProviderTest extends EasyMockSupport {
   public void testDeleteResources() throws Exception {
     SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createClusterAdministrator("user1", 2L));
     GroupPrivilegeResourceProvider resourceProvider = new GroupPrivilegeResourceProvider();
-    resourceProvider.deleteResources(createNiceMock(Predicate.class));
+    resourceProvider.deleteResources(new RequestImpl(null, null, null, null), createNiceMock(Predicate.class));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
index 7d1bddf..90e86a7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
@@ -233,7 +233,7 @@ public class GroupResourceProviderTest {
 
     Predicate predicate = new PredicateBuilder().property(GroupResourceProvider.GROUP_GROUPNAME_PROPERTY_ID).
         equals("engineering").toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     // verify
     verify(managementController, response);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
index a2e1fda..683a235 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
@@ -453,7 +453,7 @@ public class HostComponentResourceProviderTest {
     Predicate predicate = new PredicateBuilder().
         property(HostComponentResourceProvider.HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID).equals("Component100").and().
         property(HostComponentResourceProvider.HOST_COMPONENT_HOST_NAME_PROPERTY_ID).equals("Host100").toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
index 1b1b4ac..f3e1046 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
@@ -124,7 +124,7 @@ public class HostKerberosIdentityResourceProviderTest extends EasyMockSupport {
         .property(HostKerberosIdentityResourceProvider.KERBEROS_IDENTITY_PRINCIPAL_NAME_PROPERTY_ID)
         .equals("principal@REALM").toPredicate();
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
index c16013a..9dac445 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
@@ -1102,7 +1102,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     Predicate predicate = new PredicateBuilder().property(HostResourceProvider.HOST_NAME_PROPERTY_ID).equals("Host100").
         toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
index 1a74ac3..abfb1cd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
@@ -177,7 +177,7 @@ public class InstanceResourceProviderTest {
 
     Predicate predicate = new PredicateBuilder().property(InstanceResourceProvider.INSTANCE_ID_PROPERTY_ID).equals("Instance1").toPredicate();
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     // verify
     verify(service);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/LdapSyncEventResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/LdapSyncEventResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/LdapSyncEventResourceProviderTest.java
index 8a12c13..c998274 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/LdapSyncEventResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/LdapSyncEventResourceProviderTest.java
@@ -122,7 +122,7 @@ public class LdapSyncEventResourceProviderTest {
     Set<Resource> resources = provider.getResources(PropertyHelper.getReadRequest(), null);
     Assert.assertEquals(1, resources.size());
 
-    provider.deleteResources(null);
+    provider.deleteResources(new RequestImpl(null, null, null, null), null);
 
     resources = provider.getResources(PropertyHelper.getReadRequest(), null);
     Assert.assertEquals(0, resources.size());

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MemberResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MemberResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MemberResourceProviderTest.java
index 26a5cff..d9ba614 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MemberResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MemberResourceProviderTest.java
@@ -252,7 +252,7 @@ public class MemberResourceProviderTest {
     PredicateBuilder builder = new PredicateBuilder();
     builder.property(MemberResourceProvider.MEMBER_GROUP_NAME_PROPERTY_ID).equals("engineering");
     Predicate predicate = builder.toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     // verify
     verify(managementController, response);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
index fb4454e..bcfae8d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
@@ -57,18 +57,11 @@ public class PermissionResourceProviderTest {
     reset(dao);
   }
 
-  @Test
+  @Test (expected = UnsupportedOperationException.class)
   public void testCreateResources() throws Exception {
     PermissionResourceProvider provider = new PermissionResourceProvider();
-
     Request request = createNiceMock(Request.class);
-
-    try {
-      provider.createResources(request);
-      Assert.fail("expected UnsupportedOperationException");
-    } catch (UnsupportedOperationException e) {
-      // expected
-    }
+    provider.createResources(request);
   }
 
   @Test
@@ -103,29 +96,16 @@ public class PermissionResourceProviderTest {
     verify(dao, permissionEntity, resourceTypeEntity);
   }
 
-  @Test
+  @Test (expected = UnsupportedOperationException.class)
   public void testUpdateResources() throws Exception {
     PermissionResourceProvider provider = new PermissionResourceProvider();
-
     Request request = createNiceMock(Request.class);
-
-    try {
-      provider.updateResources(request, null);
-      Assert.fail("expected UnsupportedOperationException");
-    } catch (UnsupportedOperationException e) {
-      // expected
-    }
+    provider.updateResources(request, null);
   }
 
-  @Test
+  @Test (expected = UnsupportedOperationException.class)
   public void testDeleteResources() throws Exception {
     PermissionResourceProvider provider = new PermissionResourceProvider();
-
-    try {
-      provider.deleteResources(null);
-      Assert.fail("expected UnsupportedOperationException");
-    } catch (UnsupportedOperationException e) {
-      // expected
-    }
+    provider.deleteResources(new RequestImpl(null, null, null, null), null);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java
index d07ed76..a61af95 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java
@@ -421,7 +421,7 @@ public class RepositoryVersionResourceProviderTest {
     Assert.assertEquals(1, provider.getResources(getRequest, new AndPredicate(predicateStackName, predicateStackVersion)).size());
 
     final Predicate predicate = new PredicateBuilder().property(RepositoryVersionResourceProvider.REPOSITORY_VERSION_ID_PROPERTY_ID).equals("1").toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     Assert.assertEquals(0, provider.getResources(getRequest, new AndPredicate(predicateStackName, predicateStackVersion)).size());
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
index 42e75a7..d509fd3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
@@ -882,7 +882,7 @@ public class RequestResourceProviderTest {
     Predicate predicate = new PredicateBuilder().property(RequestResourceProvider.REQUEST_ID_PROPERTY_ID).
       equals("Request100").toPredicate();
     try {
-      provider.deleteResources(predicate);
+      provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
       Assert.fail("Expected an UnsupportedOperationException");
     } catch (UnsupportedOperationException e) {
       // expected

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestScheduleResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestScheduleResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestScheduleResourceProviderTest.java
index cb4d8aa..daeea27 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestScheduleResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestScheduleResourceProviderTest.java
@@ -412,7 +412,7 @@ public class RequestScheduleResourceProviderTest {
       .equals("Cluster100").and().property(RequestScheduleResourceProvider
         .REQUEST_SCHEDULE_ID_PROPERTY_ID).equals(1L).toPredicate();
 
-    resourceProvider.deleteResources(predicate);
+    resourceProvider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();
     Assert.assertNotNull(lastEvent);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RoleAuthorizationResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RoleAuthorizationResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RoleAuthorizationResourceProviderTest.java
index 23afa8f..56f7322 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RoleAuthorizationResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RoleAuthorizationResourceProviderTest.java
@@ -31,7 +31,6 @@ import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.apache.ambari.server.orm.dao.PermissionDAO;
-import org.apache.ambari.server.orm.dao.ResourceTypeDAO;
 import org.apache.ambari.server.orm.dao.RoleAuthorizationDAO;
 import org.apache.ambari.server.orm.entities.PermissionEntity;
 import org.apache.ambari.server.orm.entities.RoleAuthorizationEntity;
@@ -197,6 +196,6 @@ public class RoleAuthorizationResourceProviderTest extends EasyMockSupport {
     replayAll();
     AmbariManagementController managementController = injector.getInstance(AmbariManagementController.class);
     RoleAuthorizationResourceProvider provider = new RoleAuthorizationResourceProvider(managementController);
-    provider.deleteResources(null);
+    provider.deleteResources(new RequestImpl(null, null, null, null), null);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SchemaImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SchemaImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SchemaImplTest.java
index 1c3d14a..f9f3187 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SchemaImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SchemaImplTest.java
@@ -63,7 +63,7 @@ public class SchemaImplTest {
     }
 
     @Override
-    public RequestStatus deleteResources(Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
+    public RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
       return new RequestStatusImpl(null);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
index e113347..84f8124 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
@@ -58,7 +58,6 @@ import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
 
 import java.lang.reflect.Field;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -853,7 +852,7 @@ public class ServiceResourceProviderTest {
     // delete the service named Service100
     Predicate  predicate = new PredicateBuilder().property(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").and()
         .property(ServiceResourceProvider.SERVICE_SERVICE_NAME_PROPERTY_ID).equals(serviceName).toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();
@@ -901,7 +900,7 @@ public class ServiceResourceProviderTest {
     // delete the service named Service100
     Predicate  predicate = new PredicateBuilder().property(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").and()
         .property(ServiceResourceProvider.SERVICE_SERVICE_NAME_PROPERTY_ID).equals(serviceName).toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();
@@ -962,7 +961,7 @@ public class ServiceResourceProviderTest {
         .property(ServiceResourceProvider.SERVICE_SERVICE_NAME_PROPERTY_ID).equals(serviceName).toPredicate();
 
     try {
-      provider.deleteResources(predicate);
+      provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
       Assert.fail("Expected exception deleting a service in a non-removable state.");
     } catch (SystemException e) {
       // expected
@@ -1070,7 +1069,7 @@ public class ServiceResourceProviderTest {
     // delete the service named Service100
     Predicate  predicate = new PredicateBuilder().property(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID).equals(clusterName).and()
             .property(ServiceResourceProvider.SERVICE_SERVICE_NAME_PROPERTY_ID).equals(serviceName).toPredicate();
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
 
     ResourceProviderEvent lastEvent = observer.getLastEvent();

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SettingResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SettingResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SettingResourceProviderTest.java
index c133220..9054e4f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SettingResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/SettingResourceProviderTest.java
@@ -260,7 +260,7 @@ public class SettingResourceProviderTest {
   @Test(expected = AuthorizationException.class)
   public void testDeleteResources_noAuth() throws Exception {
     mockControl.replay();
-    resourceProvider.deleteResources(null);
+    resourceProvider.deleteResources(new RequestImpl(null, null, null, null), null);
   }
 
 
@@ -268,7 +268,7 @@ public class SettingResourceProviderTest {
   public void testDeleteResources_clusterUser() throws Exception {
     setupAuthenticationForClusterUser();
     mockControl.replay();
-    resourceProvider.deleteResources(null);
+    resourceProvider.deleteResources(new RequestImpl(null, null, null, null), null);
   }
 
   @Test
@@ -280,7 +280,7 @@ public class SettingResourceProviderTest {
     Predicate predicate = pb.begin().property(SETTING_NAME_PROPERTY_ID).equals(name).end().toPredicate();
     dao.removeByName(name);
     mockControl.replay();
-    resourceProvider.deleteResources(predicate);
+    resourceProvider.deleteResources(new RequestImpl(null, null, null, null), predicate);
   }
 
   private Set<Resource> getResources_instance(SettingEntity entity, Request request) throws Exception {

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StageResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StageResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StageResourceProviderTest.java
index 435587d..2c187a9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StageResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StageResourceProviderTest.java
@@ -136,17 +136,11 @@ public class StageResourceProviderTest {
     verify(clusters, cluster);
   }
 
-  @Test
+  @Test(expected = UnsupportedOperationException.class)
   public void testDeleteResources() throws Exception {
     StageResourceProvider provider = new StageResourceProvider(managementController);
-
     Predicate predicate = createNiceMock(Predicate.class);
-    try {
-      provider.deleteResources(predicate);
-      fail("Expected UnsupportedOperationException");
-    } catch (UnsupportedOperationException e) {
-      // expected
-    }
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProviderTest.java
index 96c6db4..904a0e9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProviderTest.java
@@ -225,7 +225,7 @@ public class TargetClusterResourceProviderTest {
 
     Predicate predicate = new PredicateBuilder().property(TargetClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID).equals("Cluster1").toPredicate();
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     // verify
     verify(service);

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java
index 587febe..91cfef8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java
@@ -27,6 +27,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
@@ -49,7 +50,6 @@ import org.apache.ambari.server.orm.dao.ExecutionCommandDAO;
 import org.apache.ambari.server.orm.dao.HostDAO;
 import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
 import org.apache.ambari.server.orm.entities.HostRoleCommandEntity;
-import org.apache.ambari.server.topology.LogicalRequest;
 import org.apache.ambari.server.topology.TopologyManager;
 import org.easymock.EasyMock;
 import org.junit.Assert;
@@ -260,7 +260,7 @@ public class TaskResourceProviderTest {
     verify(managementController, response);
   }
 
-  @Test
+  @Test(expected = UnsupportedOperationException.class)
   public void testDeleteResources() throws Exception {
     Resource.Type type = Resource.Type.Task;
 
@@ -275,15 +275,8 @@ public class TaskResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController);
 
-    Predicate predicate = new PredicateBuilder().property(TaskResourceProvider.TASK_ID_PROPERTY_ID).equals("Task100").
-        toPredicate();
-    try {
-      provider.deleteResources(predicate);
-      Assert.fail("Expected an UnsupportedOperationException");
-    } catch (UnsupportedOperationException e) {
-      // expected
-    }
-
+    Predicate predicate = new PredicateBuilder().property(TaskResourceProvider.TASK_ID_PROPERTY_ID).equals("Task100").toPredicate();
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
     // verify
     verify(managementController);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java
index c19e5ad..2ccbcda 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java
@@ -146,7 +146,7 @@ public class UserAuthorizationResourceProviderTest extends EasyMockSupport {
     SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createClusterAdministrator("user1", 2L));
     AmbariManagementController managementController = injector.getInstance(AmbariManagementController.class);
     UserAuthorizationResourceProvider provider = new UserAuthorizationResourceProvider(managementController);
-    provider.deleteResources(null);
+    provider.deleteResources(createNiceMock(Request.class), null);
     verifyAll();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
index 28a061c..d8bd566 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
@@ -94,7 +94,7 @@ public class UserPrivilegeResourceProviderTest extends EasyMockSupport {
   public void testDeleteResources() throws Exception {
     SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createClusterAdministrator("user1", 2L));
     UserPrivilegeResourceProvider resourceProvider = new UserPrivilegeResourceProvider();
-    resourceProvider.deleteResources(createNiceMock(Predicate.class));
+    resourceProvider.deleteResources(createNiceMock(Request.class), createNiceMock(Predicate.class));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java
index 3dd4ad2..dc22bb9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java
@@ -492,7 +492,7 @@ public class UserResourceProviderTest extends EasyMockSupport {
 
     ResourceProvider provider = getResourceProvider(managementController);
 
-    provider.deleteResources(createPredicate(requestedUsername));
+    provider.deleteResources(new RequestImpl(null, null, null, null), createPredicate(requestedUsername));
 
     // verify
     verifyAll();

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
index b384b8a..aedac18 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProviderTest.java
@@ -397,7 +397,7 @@ public class ViewInstanceResourceProviderTest {
     replay(viewregistry);
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    provider.deleteResources(predicate);
+    provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
 
     verify(viewregistry);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
index 2f05402..e9d8422 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProviderTest.java
@@ -343,7 +343,7 @@ public class WidgetLayoutResourceProviderTest {
     expectLastCall();
     replay(dao);
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(request, predicate);
 
     WidgetLayoutEntity entity1 = entityCapture.getValue();
     Assert.assertEquals(Long.valueOf(1), entity1.getId());

http://git-wip-us.apache.org/repos/asf/ambari/blob/36d2b0c9/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetResourceProviderTest.java
index 8192f38..096a7bc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetResourceProviderTest.java
@@ -419,7 +419,7 @@ public class WidgetResourceProviderTest {
     expectLastCall();
     replay(dao);
 
-    provider.deleteResources(predicate);
+    provider.deleteResources(request, predicate);
 
     WidgetEntity entity1 = entityCapture.getValue();
     Assert.assertEquals(Long.valueOf(1), entity1.getId());


Mime
View raw message