Repository: nifi Updated Branches: refs/heads/master 252bfb5c3 -> 6b87e1ea8
NIFI-2252: Fixed issue where POST to Controller Resource createControllerService and also ensure that URI is set on the entity. This closes #641 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/6b87e1ea Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/6b87e1ea Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/6b87e1ea Branch: refs/heads/master Commit: 6b87e1ea84d1ec42d7bdb6a7a335c8cc04416779 Parents: 252bfb5 Author: Mark Payne <[email protected]> Authored: Wed Jul 13 10:54:27 2016 -0400 Committer: Matt Gilman <[email protected]> Committed: Wed Jul 13 14:40:43 2016 -0400 ---------------------------------------------------------------------- .../main/java/org/apache/nifi/web/api/ControllerResource.java | 4 ++-- .../java/org/apache/nifi/web/api/ControllerServiceResource.java | 2 +- .../main/java/org/apache/nifi/web/api/ProcessGroupResource.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/6b87e1ea/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java index 70514ac..4c5ab05 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java @@ -416,7 +416,7 @@ public class ControllerResource extends ApplicationResource { } if (isReplicateRequest()) { - return replicate(HttpMethod.GET); + return replicate(HttpMethod.POST, controllerServiceEntity); } // handle expects request (usually from the cluster manager) @@ -437,7 +437,7 @@ public class ControllerResource extends ApplicationResource { // create the controller service and generate the json final Revision revision = getRevision(controllerServiceEntity, controllerServiceEntity.getComponent().getId()); final ControllerServiceEntity entity = serviceFacade.createControllerService(revision, null, controllerServiceEntity.getComponent()); - controllerServiceResource.populateRemainingControllerServiceContent(entity.getComponent()); + controllerServiceResource.populateRemainingControllerServiceEntityContent(entity); // build the response return clusterContext(generateCreatedResponse(URI.create(entity.getUri()), entity)).build(); http://git-wip-us.apache.org/repos/asf/nifi/blob/6b87e1ea/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java index fc3524f..4eb1d1a 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java @@ -616,7 +616,7 @@ public class ControllerServiceResource extends ApplicationResource { () -> { // update the controller service final ControllerServiceEntity entity = serviceFacade.updateControllerService(revision, requestControllerServiceDTO); - populateRemainingControllerServiceContent(entity.getComponent()); + populateRemainingControllerServiceEntityContent(entity); return clusterContext(generateOkResponse(entity)).build(); } http://git-wip-us.apache.org/repos/asf/nifi/blob/6b87e1ea/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java index 7074379..70852c1 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java @@ -2125,7 +2125,7 @@ public class ProcessGroupResource extends ApplicationResource { // create the controller service and generate the json final Revision revision = getRevision(controllerServiceEntity, controllerServiceEntity.getComponent().getId()); final ControllerServiceEntity entity = serviceFacade.createControllerService(revision, groupId, controllerServiceEntity.getComponent()); - controllerServiceResource.populateRemainingControllerServiceContent(entity.getComponent()); + controllerServiceResource.populateRemainingControllerServiceEntityContent(entity); // build the response return clusterContext(generateCreatedResponse(URI.create(entity.getUri()), entity)).build();
