You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/04/28 16:05:09 UTC
[35/50] [abbrv] incubator-nifi git commit: NIFI-271
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java
index dd9fc0d..486e6d7 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java
@@ -37,12 +37,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
private ControllerServiceProvider serviceProvider;
- /**
- * Locates the specified controller service.
- *
- * @param controllerServiceId
- * @return
- */
private ControllerServiceNode locateControllerService(final String controllerServiceId) {
// get the controller service
final ControllerServiceNode controllerService = serviceProvider.getControllerServiceNode(controllerServiceId);
@@ -55,12 +49,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
return controllerService;
}
- /**
- * Creates a controller service.
- *
- * @param controllerServiceDTO The controller service DTO
- * @return The controller service
- */
@Override
public ControllerServiceNode createControllerService(final ControllerServiceDTO controllerServiceDTO) {
// ensure the type is specified
@@ -72,7 +60,7 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
// create the controller service
final ControllerServiceNode controllerService = serviceProvider.createControllerService(controllerServiceDTO.getType(), controllerServiceDTO.getId(), true);
- // ensure we can perform the update
+ // ensure we can perform the update
verifyUpdate(controllerService, controllerServiceDTO);
// perform the update
@@ -84,50 +72,27 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
}
}
- /**
- * Gets the specified controller service.
- *
- * @param controllerServiceId The controller service id
- * @return The controller service
- */
@Override
public ControllerServiceNode getControllerService(final String controllerServiceId) {
return locateControllerService(controllerServiceId);
}
- /**
- * Determines if the specified controller service exists.
- *
- * @param controllerServiceId
- * @return
- */
@Override
public boolean hasControllerService(final String controllerServiceId) {
return serviceProvider.getControllerServiceNode(controllerServiceId) != null;
}
- /**
- * Gets all of the controller services.
- *
- * @return The controller services
- */
@Override
public Set<ControllerServiceNode> getControllerServices() {
return serviceProvider.getAllControllerServices();
}
- /**
- * Updates the specified controller service.
- *
- * @param controllerServiceDTO The controller service DTO
- * @return The controller service
- */
@Override
public ControllerServiceNode updateControllerService(final ControllerServiceDTO controllerServiceDTO) {
// get the controller service
final ControllerServiceNode controllerService = locateControllerService(controllerServiceDTO.getId());
- // ensure we can perform the update
+ // ensure we can perform the update
verifyUpdate(controllerService, controllerServiceDTO);
// perform the update
@@ -151,7 +116,8 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
}
@Override
- public ControllerServiceReference updateControllerServiceReferencingComponents(final String controllerServiceId, final ScheduledState scheduledState, final ControllerServiceState controllerServiceState) {
+ public ControllerServiceReference updateControllerServiceReferencingComponents(
+ final String controllerServiceId, final ScheduledState scheduledState, final ControllerServiceState controllerServiceState) {
// get the controller service
final ControllerServiceNode controllerService = locateControllerService(controllerServiceId);
@@ -173,14 +139,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
return controllerService.getReferences();
}
- /**
- * Validates the specified configuration for the specified controller
- * service.
- *
- * @param controllerService
- * @param controllerServiceDTO
- * @return
- */
private List<String> validateProposedConfiguration(final ControllerServiceNode controllerService, final ControllerServiceDTO controllerServiceDTO) {
final List<String> validationErrors = new ArrayList<>();
return validationErrors;
@@ -217,12 +175,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
}
}
- /**
- * Verifies the controller service can be updated.
- *
- * @param controllerService
- * @param controllerServiceDTO
- */
private void verifyUpdate(final ControllerServiceNode controllerService, final ControllerServiceDTO controllerServiceDTO) {
// validate the new controller service state if appropriate
if (isNotNull(controllerServiceDTO.getState())) {
@@ -269,12 +221,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
}
}
- /**
- * Configures the specified controller service.
- *
- * @param controllerService
- * @param controllerServiceDTO
- */
private void configureControllerService(final ControllerServiceNode controllerService, final ControllerServiceDTO controllerServiceDTO) {
final String name = controllerServiceDTO.getName();
final String annotationData = controllerServiceDTO.getAnnotationData();
@@ -303,11 +249,6 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
}
}
- /**
- * Deletes the specified controller service.
- *
- * @param controllerServiceId The controller service id
- */
@Override
public void deleteControllerService(String controllerServiceId) {
final ControllerServiceNode controllerService = locateControllerService(controllerServiceId);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardFunnelDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardFunnelDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardFunnelDAO.java
index d54e2e6..2be8e26 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardFunnelDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardFunnelDAO.java
@@ -30,24 +30,10 @@ public class StandardFunnelDAO extends ComponentDAO implements FunnelDAO {
private FlowController flowController;
- /**
- * Locates the specified funnel.
- *
- * @param groupId
- * @param funnelId
- * @return
- */
private Funnel locateFunnel(String groupId, String funnelId) {
return locateFunnel(locateProcessGroup(flowController, groupId), funnelId);
}
- /**
- * Locates the specified funnel.
- *
- * @param group
- * @param funnelId
- * @return
- */
private Funnel locateFunnel(ProcessGroup group, String funnelId) {
// get the funnel
Funnel funnel = group.getFunnel(funnelId);
@@ -60,12 +46,6 @@ public class StandardFunnelDAO extends ComponentDAO implements FunnelDAO {
return funnel;
}
- /**
- * Creates a funnel.
- *
- * @param funnelDTO The funnel DTO
- * @return The funnel
- */
@Override
public Funnel createFunnel(String groupId, FunnelDTO funnelDTO) {
if (funnelDTO.getParentGroupId() != null && !flowController.areGroupsSame(groupId, funnelDTO.getParentGroupId())) {
@@ -87,23 +67,11 @@ public class StandardFunnelDAO extends ComponentDAO implements FunnelDAO {
return funnel;
}
- /**
- * Gets the specified funnel.
- *
- * @param funnelId The funnel id
- * @return The funnel
- */
@Override
public Funnel getFunnel(String groupId, String funnelId) {
return locateFunnel(groupId, funnelId);
}
- /**
- * Determines if the specified funnel exists.
- *
- * @param funnelId
- * @return
- */
@Override
public boolean hasFunnel(String groupId, String funnelId) {
ProcessGroup group;
@@ -116,23 +84,12 @@ public class StandardFunnelDAO extends ComponentDAO implements FunnelDAO {
return group.getFunnel(funnelId) != null;
}
- /**
- * Gets all of the funnels.
- *
- * @return The funnels
- */
@Override
public Set<Funnel> getFunnels(String groupId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
return group.getFunnels();
}
- /**
- * Updates the specified funnel.
- *
- * @param funnelDTO The funnel DTO
- * @return The funnel
- */
@Override
public Funnel updateFunnel(String groupId, FunnelDTO funnelDTO) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -157,11 +114,6 @@ public class StandardFunnelDAO extends ComponentDAO implements FunnelDAO {
funnel.verifyCanDelete();
}
- /**
- * Deletes the specified funnel.
- *
- * @param funnelId The funnel id
- */
@Override
public void deleteFunnel(String groupId, String funnelId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
index 6e79956..fd133a5 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardInputPortDAO.java
@@ -51,12 +51,6 @@ public class StandardInputPortDAO extends ComponentDAO implements PortDAO {
return port;
}
- /**
- * Creates a port.
- *
- * @param portDTO The port DTO
- * @return The port
- */
@Override
public Port createPort(String groupId, PortDTO portDTO) {
if (isNotNull(portDTO.getParentGroupId()) && !flowController.areGroupsSame(groupId, portDTO.getParentGroupId())) {
@@ -93,23 +87,11 @@ public class StandardInputPortDAO extends ComponentDAO implements PortDAO {
return port;
}
- /**
- * Gets the specified port.
- *
- * @param portId The port id
- * @return The port
- */
@Override
public Port getPort(String groupId, String portId) {
return locatePort(groupId, portId);
}
- /**
- * Determines if the specified port exists.
- *
- * @param portId
- * @return
- */
@Override
public boolean hasPort(String groupId, String portId) {
ProcessGroup group = flowController.getGroup(groupId);
@@ -121,11 +103,6 @@ public class StandardInputPortDAO extends ComponentDAO implements PortDAO {
return group.getInputPort(portId) != null;
}
- /**
- * Gets all of the ports.
- *
- * @return The ports
- */
@Override
public Set<Port> getPorts(String groupId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -187,13 +164,6 @@ public class StandardInputPortDAO extends ComponentDAO implements PortDAO {
}
}
- /**
- * Validates the proposed processor configuration.
- *
- * @param processorNode
- * @param config
- * @return
- */
private List<String> validateProposedConfiguration(PortDTO portDTO) {
List<String> validationErrors = new ArrayList<>();
@@ -207,12 +177,6 @@ public class StandardInputPortDAO extends ComponentDAO implements PortDAO {
return validationErrors;
}
- /**
- * Updates the specified port.
- *
- * @param portDTO The port DTO
- * @return The port
- */
@Override
public Port updatePort(String groupId, PortDTO portDTO) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -290,11 +254,6 @@ public class StandardInputPortDAO extends ComponentDAO implements PortDAO {
inputPort.verifyCanDelete();
}
- /**
- * Deletes the specified port.
- *
- * @param portId The port id
- */
@Override
public void deletePort(final String groupId, final String portId) {
final ProcessGroup group = locateProcessGroup(flowController, groupId);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardLabelDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardLabelDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardLabelDAO.java
index ea16ae3..bd774e2 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardLabelDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardLabelDAO.java
@@ -31,24 +31,10 @@ public class StandardLabelDAO extends ComponentDAO implements LabelDAO {
private FlowController flowController;
- /**
- * Locates the specified label.
- *
- * @param groupId
- * @param labelId
- * @return
- */
private Label locateLabel(String groupId, String labelId) {
return locateLabel(locateProcessGroup(flowController, groupId), labelId);
}
- /**
- * Locates the specified label.
- *
- * @param group
- * @param labelId
- * @return
- */
private Label locateLabel(ProcessGroup group, String labelId) {
// get the label
Label label = group.getLabel(labelId);
@@ -61,12 +47,6 @@ public class StandardLabelDAO extends ComponentDAO implements LabelDAO {
return label;
}
- /**
- * Creates a label.
- *
- * @param labelDTO The label DTO
- * @return The label
- */
@Override
public Label createLabel(String groupId, LabelDTO labelDTO) {
if (labelDTO.getParentGroupId() != null && !flowController.areGroupsSame(groupId, labelDTO.getParentGroupId())) {
@@ -91,23 +71,11 @@ public class StandardLabelDAO extends ComponentDAO implements LabelDAO {
return label;
}
- /**
- * Gets the specified label.
- *
- * @param labelId The label id
- * @return The label
- */
@Override
public Label getLabel(String groupId, String labelId) {
return locateLabel(groupId, labelId);
}
- /**
- * Determines if the specified label exists.
- *
- * @param labelId
- * @return
- */
@Override
public boolean hasLabel(String groupId, String labelId) {
ProcessGroup group;
@@ -120,23 +88,12 @@ public class StandardLabelDAO extends ComponentDAO implements LabelDAO {
return group.getLabel(labelId) != null;
}
- /**
- * Gets all of the labels.
- *
- * @return The labels
- */
@Override
public Set<Label> getLabels(String groupId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
return group.getLabels();
}
- /**
- * Updates the specified label.
- *
- * @param labelDTO The label DTO
- * @return The label
- */
@Override
public Label updateLabel(String groupId, LabelDTO labelDTO) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -161,11 +118,6 @@ public class StandardLabelDAO extends ComponentDAO implements LabelDAO {
return label;
}
- /**
- * Deletes the specified label.
- *
- * @param labelId The label id
- */
@Override
public void deleteLabel(String groupId, String labelId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
index 588ea49..a33682b 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardOutputPortDAO.java
@@ -51,12 +51,6 @@ public class StandardOutputPortDAO extends ComponentDAO implements PortDAO {
return port;
}
- /**
- * Creates a port.
- *
- * @param portDTO The port DTO
- * @return The port
- */
@Override
public Port createPort(String groupId, PortDTO portDTO) {
if (isNotNull(portDTO.getParentGroupId()) && !flowController.areGroupsSame(groupId, portDTO.getParentGroupId())) {
@@ -93,23 +87,11 @@ public class StandardOutputPortDAO extends ComponentDAO implements PortDAO {
return port;
}
- /**
- * Gets the specified port.
- *
- * @param portId The port id
- * @return The port
- */
@Override
public Port getPort(String groupId, String portId) {
return locatePort(groupId, portId);
}
- /**
- * Determines if the specified port exists.
- *
- * @param portId
- * @return
- */
@Override
public boolean hasPort(String groupId, String portId) {
ProcessGroup group = flowController.getGroup(groupId);
@@ -121,11 +103,6 @@ public class StandardOutputPortDAO extends ComponentDAO implements PortDAO {
return group.getOutputPort(portId) != null;
}
- /**
- * Gets all of the ports.
- *
- * @return The ports
- */
@Override
public Set<Port> getPorts(String groupId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -187,13 +164,6 @@ public class StandardOutputPortDAO extends ComponentDAO implements PortDAO {
}
}
- /**
- * Validates the proposed processor configuration.
- *
- * @param processorNode
- * @param config
- * @return
- */
private List<String> validateProposedConfiguration(PortDTO portDTO) {
List<String> validationErrors = new ArrayList<>();
@@ -207,12 +177,6 @@ public class StandardOutputPortDAO extends ComponentDAO implements PortDAO {
return validationErrors;
}
- /**
- * Updates the specified port.
- *
- * @param portDTO The port DTO
- * @return The port
- */
@Override
public Port updatePort(String groupId, PortDTO portDTO) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -290,11 +254,6 @@ public class StandardOutputPortDAO extends ComponentDAO implements PortDAO {
outputPort.verifyCanDelete();
}
- /**
- * Deletes the specified port.
- *
- * @param portId The port id
- */
@Override
public void deletePort(String groupId, String portId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessGroupDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessGroupDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessGroupDAO.java
index fd6f944..52887e4 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessGroupDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessGroupDAO.java
@@ -28,13 +28,6 @@ public class StandardProcessGroupDAO extends ComponentDAO implements ProcessGrou
private FlowController flowController;
- /**
- * Creates a process group reference.
- *
- * @param parentGroupId The parent group id
- * @param processGroup The process group
- * @return The process group
- */
@Override
public ProcessGroup createProcessGroup(String parentGroupId, ProcessGroupDTO processGroup) {
if (processGroup.getParentGroupId() != null && !flowController.areGroupsSame(processGroup.getParentGroupId(), parentGroupId)) {
@@ -58,32 +51,16 @@ public class StandardProcessGroupDAO extends ComponentDAO implements ProcessGrou
return group;
}
- /**
- * Gets the specified process group.
- *
- * @return The process group
- */
@Override
public ProcessGroup getProcessGroup(String groupId) {
return locateProcessGroup(flowController, groupId);
}
- /**
- * Determines if the specified process group exists.
- *
- * @return
- */
@Override
public boolean hasProcessGroup(String groupId) {
return flowController.getGroup(groupId) != null;
}
- /**
- * Gets all of the process groups.
- *
- * @param parentGroupId The parent group id
- * @return The process groups
- */
@Override
public Set<ProcessGroup> getProcessGroups(String parentGroupId) {
ProcessGroup group = locateProcessGroup(flowController, parentGroupId);
@@ -104,12 +81,6 @@ public class StandardProcessGroupDAO extends ComponentDAO implements ProcessGrou
}
}
- /**
- * Updates the specified process group.
- *
- * @param processGroupDTO
- * @return The process group
- */
@Override
public ProcessGroup updateProcessGroup(ProcessGroupDTO processGroupDTO) {
final ProcessGroup group = locateProcessGroup(flowController, processGroupDTO.getId());
@@ -145,11 +116,6 @@ public class StandardProcessGroupDAO extends ComponentDAO implements ProcessGrou
group.verifyCanDelete();
}
- /**
- * Deletes the specified process group.
- *
- * @param processGroupId The process group id
- */
@Override
public void deleteProcessGroup(String processGroupId) {
// get the group
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessorDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessorDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessorDAO.java
index be33d5a..e52a476 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessorDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardProcessorDAO.java
@@ -70,12 +70,6 @@ public class StandardProcessorDAO extends ComponentDAO implements ProcessorDAO {
return processor;
}
- /**
- * Determines if the specified processor is loaded.
- *
- * @param id
- * @return
- */
@Override
public boolean hasProcessor(String groupId, String id) {
ProcessGroup group = flowController.getGroup(groupId);
@@ -87,13 +81,6 @@ public class StandardProcessorDAO extends ComponentDAO implements ProcessorDAO {
return group.getProcessor(id) != null;
}
- /**
- * Creates a new Processor.
- *
- * @param groupId The group id
- * @param processorDTO The processor configuration
- * @return The new Processor
- */
@Override
public ProcessorNode createProcessor(String groupId, ProcessorDTO processorDTO) {
if (processorDTO.getParentGroupId() != null && !flowController.areGroupsSame(groupId, processorDTO.getParentGroupId())) {
@@ -129,13 +116,6 @@ public class StandardProcessorDAO extends ComponentDAO implements ProcessorDAO {
}
}
- /**
- * Configures the specified processor with the specified configuration dto.
- *
- * @param processor
- * @param processorDTO
- * @return
- */
private void configureProcessor(ProcessorNode processor, ProcessorDTO processorDTO) {
final ProcessorConfigDTO config = processorDTO.getConfig();
@@ -222,13 +202,6 @@ public class StandardProcessorDAO extends ComponentDAO implements ProcessorDAO {
}
}
- /**
- * Validates the proposed processor configuration.
- *
- * @param processorNode
- * @param config
- * @return
- */
private List<String> validateProposedConfiguration(ProcessorNode processorNode, ProcessorConfigDTO config) {
List<String> validationErrors = new ArrayList<>();
@@ -319,22 +292,11 @@ public class StandardProcessorDAO extends ComponentDAO implements ProcessorDAO {
return validationErrors;
}
- /**
- * Gets the Processor transfer object for the specified id.
- *
- * @param id Id of the processor to return
- * @return The Processor
- */
@Override
public ProcessorNode getProcessor(String groupId, String id) {
return locateProcessor(groupId, id);
}
- /**
- * Gets all the Processors for this controller.
- *
- * @return List of all the Processors
- */
@Override
public Set<ProcessorNode> getProcessors(String groupId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -417,12 +379,6 @@ public class StandardProcessorDAO extends ComponentDAO implements ProcessorDAO {
}
}
- /**
- * Updates the configuration for the processor using the specified
- * processorDTO.
- *
- * @param processorDTO
- */
@Override
public ProcessorNode updateProcessor(String groupId, ProcessorDTO processorDTO) {
ProcessorNode processor = locateProcessor(groupId, processorDTO.getId());
@@ -482,11 +438,6 @@ public class StandardProcessorDAO extends ComponentDAO implements ProcessorDAO {
processor.verifyCanDelete();
}
- /**
- * Deletes the specified processor.
- *
- * @param processorId The processor id to delete
- */
@Override
public void deleteProcessor(String groupId, String processorId) {
// get the group and the processor
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardRemoteProcessGroupDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardRemoteProcessGroupDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardRemoteProcessGroupDAO.java
index e237b0d..2b467c0 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardRemoteProcessGroupDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardRemoteProcessGroupDAO.java
@@ -105,8 +105,8 @@ public class StandardRemoteProcessGroupDAO extends ComponentDAO implements Remot
/**
* Determines if the specified remote process group exists.
*
- * @param remoteProcessGroupId
- * @return
+ * @param remoteProcessGroupId id
+ * @return true if exists
*/
@Override
public boolean hasRemoteProcessGroup(String groupId, String remoteProcessGroupId) {
@@ -139,9 +139,6 @@ public class StandardRemoteProcessGroupDAO extends ComponentDAO implements Remot
/**
* Verifies the specified remote group can be updated, if necessary.
- *
- * @param remoteProcessGroup
- * @param remoteProcessGroupDto
*/
private void verifyUpdate(RemoteProcessGroup remoteProcessGroup, RemoteProcessGroupDTO remoteProcessGroupDto) {
// see if the remote process group can start/stop transmitting
@@ -192,9 +189,6 @@ public class StandardRemoteProcessGroupDAO extends ComponentDAO implements Remot
/**
* Verified the specified remote port can be updated, if necessary.
- *
- * @param port
- * @param remoteProcessGroupPortDto
*/
private void verifyUpdatePort(RemoteGroupPort port, RemoteProcessGroupPortDTO remoteProcessGroupPortDto) {
// see if the remote process group can start/stop transmitting
@@ -217,10 +211,6 @@ public class StandardRemoteProcessGroupDAO extends ComponentDAO implements Remot
/**
* Validates the proposed configuration for the specified remote port.
- *
- * @param remoteGroupPort
- * @param remoteProcessGroupPortDTO
- * @return
*/
private List<String> validateProposedRemoteProcessGroupPortConfiguration(RemoteGroupPort remoteGroupPort, RemoteProcessGroupPortDTO remoteProcessGroupPortDTO) {
final List<String> validationErrors = new ArrayList<>();
@@ -235,10 +225,6 @@ public class StandardRemoteProcessGroupDAO extends ComponentDAO implements Remot
/**
* Validates the proposed configuration for the specified remote group.
- *
- * @param remoteProcessGroup
- * @param remoteProcessGroupDTO
- * @return
*/
private List<String> validateProposedRemoteProcessGroupConfiguration(RemoteProcessGroupDTO remoteProcessGroupDTO) {
final List<String> validationErrors = new ArrayList<>();
@@ -327,12 +313,6 @@ public class StandardRemoteProcessGroupDAO extends ComponentDAO implements Remot
return port;
}
- /**
- * Updates the specified remote process group.
- *
- * @param remoteProcessGroupDTO
- * @return The remote process group
- */
@Override
public RemoteProcessGroup updateRemoteProcessGroup(String groupId, RemoteProcessGroupDTO remoteProcessGroupDTO) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
@@ -383,11 +363,6 @@ public class StandardRemoteProcessGroupDAO extends ComponentDAO implements Remot
remoteProcessGroup.verifyCanDelete();
}
- /**
- * Deletes the specified remote process group.
- *
- * @param remoteProcessGroupId The remote process group id
- */
@Override
public void deleteRemoteProcessGroup(String groupId, String remoteProcessGroupId) {
ProcessGroup group = locateProcessGroup(flowController, groupId);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardReportingTaskDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardReportingTaskDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardReportingTaskDAO.java
index 4c85b04..ffe606a 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardReportingTaskDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardReportingTaskDAO.java
@@ -43,12 +43,6 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
private ReportingTaskProvider reportingTaskProvider;
- /**
- * Locates the specified reporting task.
- *
- * @param reportingTaskId
- * @return
- */
private ReportingTaskNode locateReportingTask(final String reportingTaskId) {
// get the reporting task
final ReportingTaskNode reportingTask = reportingTaskProvider.getReportingTaskNode(reportingTaskId);
@@ -61,12 +55,6 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
return reportingTask;
}
- /**
- * Creates a reporting task.
- *
- * @param reportingTaskDTO The reporting task DTO
- * @return The reporting task
- */
@Override
public ReportingTaskNode createReportingTask(final ReportingTaskDTO reportingTaskDTO) {
// ensure the type is specified
@@ -78,7 +66,7 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
// create the reporting task
final ReportingTaskNode reportingTask = reportingTaskProvider.createReportingTask(reportingTaskDTO.getType(), reportingTaskDTO.getId(), true);
- // ensure we can perform the update
+ // ensure we can perform the update
verifyUpdate(reportingTask, reportingTaskDTO);
// perform the update
@@ -90,50 +78,27 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
}
}
- /**
- * Gets the specified reporting task.
- *
- * @param reportingTaskId The reporting task id
- * @return The reporting task
- */
@Override
public ReportingTaskNode getReportingTask(final String reportingTaskId) {
return locateReportingTask(reportingTaskId);
}
- /**
- * Determines if the specified reporting task exists.
- *
- * @param reportingTaskId
- * @return
- */
@Override
public boolean hasReportingTask(final String reportingTaskId) {
return reportingTaskProvider.getReportingTaskNode(reportingTaskId) != null;
}
- /**
- * Gets all of the reporting tasks.
- *
- * @return The reporting tasks
- */
@Override
public Set<ReportingTaskNode> getReportingTasks() {
return reportingTaskProvider.getAllReportingTasks();
}
- /**
- * Updates the specified reporting task.
- *
- * @param reportingTaskDTO The reporting task DTO
- * @return The reporting task
- */
@Override
public ReportingTaskNode updateReportingTask(final ReportingTaskDTO reportingTaskDTO) {
// get the reporting task
final ReportingTaskNode reportingTask = locateReportingTask(reportingTaskDTO.getId());
- // ensure we can perform the update
+ // ensure we can perform the update
verifyUpdate(reportingTask, reportingTaskDTO);
// perform the update
@@ -181,13 +146,6 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
return reportingTask;
}
- /**
- * Validates the specified configuration for the specified reporting task.
- *
- * @param reportingTask
- * @param reportingTaskDTO
- * @return
- */
private List<String> validateProposedConfiguration(final ReportingTaskNode reportingTask, final ReportingTaskDTO reportingTaskDTO) {
final List<String> validationErrors = new ArrayList<>();
@@ -240,12 +198,6 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
verifyUpdate(reportingTask, reportingTaskDTO);
}
- /**
- * Verifies the reporting task can be updated.
- *
- * @param reportingTask
- * @param reportingTaskDTO
- */
private void verifyUpdate(final ReportingTaskNode reportingTask, final ReportingTaskDTO reportingTaskDTO) {
// ensure the state, if specified, is valid
if (isNotNull(reportingTaskDTO.getState())) {
@@ -303,12 +255,6 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
}
}
- /**
- * Configures the specified reporting task.
- *
- * @param reportingTask
- * @param reportingTaskDTO
- */
private void configureReportingTask(final ReportingTaskNode reportingTask, final ReportingTaskDTO reportingTaskDTO) {
final String name = reportingTaskDTO.getName();
final String schedulingStrategy = reportingTaskDTO.getSchedulingStrategy();
@@ -347,11 +293,6 @@ public class StandardReportingTaskDAO extends ComponentDAO implements ReportingT
}
}
- /**
- * Deletes the specified reporting task.
- *
- * @param reportingTaskId The reporting task id
- */
@Override
public void deleteReportingTask(String reportingTaskId) {
final ReportingTaskNode reportingTask = locateReportingTask(reportingTaskId);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
index 0d75c30..73a1501 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardSnippetDAO.java
@@ -40,9 +40,6 @@ import org.apache.nifi.web.dao.SnippetDAO;
import org.apache.nifi.web.util.SnippetUtils;
import org.apache.commons.lang3.StringUtils;
-/**
- *
- */
public class StandardSnippetDAO implements SnippetDAO {
private FlowController flowController;
@@ -58,15 +55,6 @@ public class StandardSnippetDAO implements SnippetDAO {
return snippet;
}
- /**
- * Creates a new snippet based off of an existing snippet. Used for copying
- * and pasting.
- *
- * @param groupId
- * @param originX
- * @param originY
- * @return
- */
@Override
public FlowSnippetDTO copySnippet(final String groupId, final String snippetId, final Double originX, final Double originY) {
try {
@@ -111,13 +99,6 @@ public class StandardSnippetDAO implements SnippetDAO {
}
}
- /**
- * Creates a new snippet containing the specified components. Whether or not
- * the snippet is linked will determine whether actions on this snippet
- * actually affect the data flow.
- *
- * @return
- */
@Override
public Snippet createSnippet(final SnippetDTO snippetDTO) {
// create the snippet request
@@ -167,12 +148,6 @@ public class StandardSnippetDAO implements SnippetDAO {
}
}
- /**
- * Deletes a snippet. If the snippet is linked, also deletes the underlying
- * components.
- *
- * @param snippetId
- */
@Override
public void deleteSnippet(String snippetId) {
final StandardSnippet snippet = locateSnippet(snippetId);
@@ -238,12 +213,6 @@ public class StandardSnippetDAO implements SnippetDAO {
}
}
- /**
- * Updates the specified snippet. If the snippet is linked, the underlying
- * components will be moved into the specified groupId.
- *
- * @return
- */
@Override
public Snippet updateSnippet(final SnippetDTO snippetDTO) {
final StandardSnippet snippet = locateSnippet(snippetDTO.getId());
@@ -275,12 +244,6 @@ public class StandardSnippetDAO implements SnippetDAO {
return snippet;
}
- /**
- * Looks up the actual value for any sensitive properties from the specified
- * snippet.
- *
- * @param snippet
- */
private void lookupSensitiveProperties(final FlowSnippetDTO snippet) {
// ensure that contents have been specified
if (snippet != null) {
@@ -302,12 +265,6 @@ public class StandardSnippetDAO implements SnippetDAO {
}
}
- /**
- * Looks up the actual value for any sensitive properties from the specified
- * processors.
- *
- * @param snippet
- */
private void lookupSensitiveProcessorProperties(final Set<ProcessorDTO> processors) {
final ProcessGroup rootGroup = flowController.getGroup(flowController.getRootGroupId());
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/filter/NodeRequestFilter.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/filter/NodeRequestFilter.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/filter/NodeRequestFilter.java
index 9079d0f..13a8bde 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/filter/NodeRequestFilter.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/filter/NodeRequestFilter.java
@@ -40,18 +40,13 @@ import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
/**
- * A filter that prevents direct access to nodes (i.e., flow controllers
- * connected to a cluster). Direct access to nodes by clients external to the
- * cluster is prevented because the dataflow must be identical across the
- * cluster.
+ * A filter that prevents direct access to nodes (i.e., flow controllers connected to a cluster). Direct access to nodes by clients external to the cluster is prevented because the dataflow must be
+ * identical across the cluster.
*
- * Direct access to a node is determined by the presence of a custom request
- * header. The header key is "X-CLUSTER_MANAGER" and the value can be
- * anything/empty. The presence of this header is a simple way to flag that the
- * request was issued by the cluster manager and may proceed to the next filter.
+ * Direct access to a node is determined by the presence of a custom request header. The header key is "X-CLUSTER_MANAGER" and the value can be anything/empty. The presence of this header is a simple
+ * way to flag that the request was issued by the cluster manager and may proceed to the next filter.
*
- * Since this header may be faked, we only make decisions about the header if
- * the application instance is a node and connected to the cluster.
+ * Since this header may be faked, we only make decisions about the header if the application instance is a node and connected to the cluster.
*
* @author unattributed
*/
@@ -72,8 +67,8 @@ public class NodeRequestFilter implements Filter {
HttpServletResponse httpResp = (HttpServletResponse) resp;
/*
- * If we're the cluster manager or we're sent head requests, continue.
- * Head requests are included because there exists a AJAX/XHR race
+ * If we're the cluster manager or we're sent head requests, continue.
+ * Head requests are included because there exists a AJAX/XHR race
* condition between the following requests:
* HEAD /nifi-api/cluster
* GET /nifi-api/controller/config
@@ -105,7 +100,7 @@ public class NodeRequestFilter implements Filter {
}
}
- // if don't have a cluster context or the context indicates
+ // if don't have a cluster context or the context indicates
if (clusterContext == null || !clusterContext.isRequestSentByClusterManager()) {
// node is connected and request is not from cluster manager, so respond with error
httpResp.setContentType("text/plain");
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/Availability.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/Availability.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/Availability.java
index 7f51e0f..91f53b5 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/Availability.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/Availability.java
@@ -26,8 +26,7 @@ public enum Availability {
*/
NCM,
/**
- * Service or reporting task will run only on NiFi Nodes (or standalone
- * instance, if not clustered)
+ * Service or reporting task will run only on NiFi Nodes (or standalone instance, if not clustered)
*/
NODE;
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
index b0e7f3c..6d89cbf 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
@@ -70,9 +70,9 @@ public final class SnippetUtils {
/**
* Populates the specified snippet and returns the details.
*
- * @param snippet
- * @param recurse
- * @return
+ * @param snippet snippet
+ * @param recurse recurse
+ * @return snippet
*/
public FlowSnippetDTO populateFlowSnippet(Snippet snippet, boolean recurse) {
final FlowSnippetDTO snippetDto = new FlowSnippetDTO();
@@ -477,7 +477,7 @@ public final class SnippetUtils {
// if there is any controller service that maps to another controller service, update the id's
updateControllerServiceIdentifiers(snippetContentsCopy, serviceIdMap);
- //
+ //
// Copy ProcessGroups
//
// instantiate the process groups, renaming as necessary
@@ -578,11 +578,7 @@ public final class SnippetUtils {
}
/**
- * Generates a new id for the current id that is specified. If no seed is
- * found, a new random id will be created.
- *
- * @param currentId
- * @return
+ * Generates a new id for the current id that is specified. If no seed is found, a new random id will be created.
*/
private String generateId(final String currentId) {
final ClusterContext clusterContext = ClusterContextThreadLocal.getContext();
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/NiFiWebApiTest.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/NiFiWebApiTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/NiFiWebApiTest.java
index b81863b..dbe158a 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/NiFiWebApiTest.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/NiFiWebApiTest.java
@@ -47,12 +47,6 @@ import org.junit.Ignore;
@Ignore
public class NiFiWebApiTest {
- /**
- * Populates the flow.
- *
- * @param revision The revision to use
- * @return The new revision
- */
public static void populateFlow(Client client, String baseUrl, String clientId) throws Exception {
NiFiTestUser dfm = new NiFiTestUser(client, DfmAccessControlTest.DFM_USER_DN);
@@ -248,27 +242,6 @@ public class NiFiWebApiTest {
throw new Exception("Unable to populate initial flow: " + responseEntity);
}
-// // -----------------------------------------------
-// // Create a remote process group
-// // -----------------------------------------------
-//
-// // create the remote process group
-// RemoteProcessGroupDTO remoteProcessGroup = new RemoteProcessGroupDTO();
-// remoteProcessGroup.setTargetUri(baseUrl);
-//
-// // create the remote process group entity
-// RemoteProcessGroupEntity remoteProcessGroupEntity = new RemoteProcessGroupEntity();
-// remoteProcessGroupEntity.setRevision(NiFiTestUser.REVISION);
-// remoteProcessGroupEntity.setClientId(clientId);
-// remoteProcessGroupEntity.setRemoteProcessGroup(remoteProcessGroup);
-//
-// // add the remote process group
-// response = dfm.testPost(baseUrl + "/controller/process-groups/root/remote-process-groups", remoteProcessGroupEntity);
-//
-// // ensure a successful response
-// if (Status.CREATED.getStatusCode() != response.getStatusInfo().getStatusCode()) {
-// throw new Exception("Unable to populate initial flow.");
-// }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/AdminAccessControlTest.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/AdminAccessControlTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/AdminAccessControlTest.java
index ac554a7..8e0efd1 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/AdminAccessControlTest.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/AdminAccessControlTest.java
@@ -105,7 +105,7 @@ public class AdminAccessControlTest {
/**
* Ensures the admin user can get a groups content.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testGroupGet() throws Exception {
@@ -137,13 +137,12 @@ public class AdminAccessControlTest {
Assert.assertEquals(1, processGroupContentsDTO.getInputPorts().size());
Assert.assertEquals(1, processGroupContentsDTO.getOutputPorts().size());
Assert.assertEquals(1, processGroupContentsDTO.getLabels().size());
-// Assert.assertEquals(1, processGroupContentsDTO.getRemoteProcessGroups().size());
}
/**
* Verifies the admin user cannot update a group.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testGroupPut() throws Exception {
@@ -167,7 +166,7 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user can retrieve the controller configuration.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testControllerConfigurationGet() throws Exception {
@@ -192,7 +191,7 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user cannot update the controller configuration.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testControllerConfigurationPut() throws Exception {
@@ -216,7 +215,7 @@ public class AdminAccessControlTest {
/**
* Verifies the read only user cannot create a new flow archive.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testFlowConfigurationArchivePost() throws Exception {
@@ -237,7 +236,7 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user can retrieve his credentials.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testAuthoritiesGet() throws Exception {
@@ -260,7 +259,7 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user can retrieve the banners.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testBannersGet() throws Exception {
@@ -283,7 +282,7 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user can retrieve the processor types.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorTypesGet() throws Exception {
@@ -305,7 +304,7 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user can retrieve the prioritizer types.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testPrioritizerTypesGet() throws Exception {
@@ -330,7 +329,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user can get process groups.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorGroupsGet() throws Exception {
@@ -351,7 +350,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the operator user cannot create new process groups.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessGroupPost() throws Exception {
@@ -374,10 +373,9 @@ public class AdminAccessControlTest {
}
/**
- * Verifies that the operator user cannot update process group
- * configuration.
+ * Verifies that the operator user cannot update process group configuration.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessGroupPut() throws Exception {
@@ -402,7 +400,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the operator user cannot delete process groups.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessGroupDelete() throws Exception {
@@ -421,7 +419,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user can get processors.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorsGet() throws Exception {
@@ -442,7 +440,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create new processors.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorPost() throws Exception {
@@ -467,7 +465,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create new processors.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorPut() throws Exception {
@@ -492,7 +490,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot delete processors.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorDelete() throws Exception {
@@ -511,7 +509,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user can get connections.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testConnectionsGet() throws Exception {
@@ -532,7 +530,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create connections.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testConnectionPost() throws Exception {
@@ -557,7 +555,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create connections.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testConnectionPut() throws Exception {
@@ -582,7 +580,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot delete connections.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testConnectionDelete() throws Exception {
@@ -601,7 +599,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user can get input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testInputPortsGet() throws Exception {
@@ -622,7 +620,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testInputPortPost() throws Exception {
@@ -647,7 +645,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testInputPortPut() throws Exception {
@@ -672,7 +670,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot delete input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testInputPortDelete() throws Exception {
@@ -691,7 +689,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user can get output ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testOutputPortsGet() throws Exception {
@@ -712,7 +710,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create output ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testOutputPortPost() throws Exception {
@@ -737,7 +735,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testOutputPortPut() throws Exception {
@@ -762,7 +760,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot delete output ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testOutputPortDelete() throws Exception {
@@ -781,7 +779,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user can get input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testLabelsGet() throws Exception {
@@ -802,7 +800,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create labels.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testLabelPost() throws Exception {
@@ -827,7 +825,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot create labels.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testLabelPut() throws Exception {
@@ -852,7 +850,7 @@ public class AdminAccessControlTest {
/**
* Verifies that the admin user cannot delete labels.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testLabelDelete() throws Exception {
@@ -868,91 +866,13 @@ public class AdminAccessControlTest {
// ----------------------------------------------
// REMOTE PROCESS GROUP
// ----------------------------------------------
-// /**
-// * Verifies that the admin user can get input ports.
-// *
-// * @throws Exception
-// */
-// @Test
-// public void testRemoteProcessGroupsGet() throws Exception {
-// String url = BASE_URL + "/controller/process-groups/root/remote-process-groups";
-//
-// // perform the request
-// ClientResponse response = ADMIN_USER.testGet(url);
-//
-// // get the response
-// RemoteProcessGroupsEntity entity = response.getEntity(RemoteProcessGroupsEntity.class);
-//
-// // ensure the request was successful
-// Assert.assertEquals(200, response.getStatus());
-// Assert.assertNotNull(entity.getRemoteProcessGroups());
-// Assert.assertEquals(1, entity.getRemoteProcessGroups().size());
-// }
-//
-// /**
-// * Verifies that the admin user cannot create new remote process groups.
-// *
-// * @throws Exception
-// */
-// @Test
-// public void testRemoteProcessGroupPost() throws Exception {
-// String url = BASE_URL + "/controller/process-groups/root/remote-process-groups";
-//
-// // create the entity body
-// RemoteProcessGroupEntity entity = new RemoteProcessGroupEntity();
-// entity.setRevision(NiFiTestUser.REVISION);
-// entity.setClientId(CLIENT_ID);
-//
-// // perform the request
-// ClientResponse response = ADMIN_USER.testPost(url, entity);
-//
-// // ensure the request is failed with a forbidden status code
-// Assert.assertEquals(403, response.getStatus());
-// }
-//
-// /**
-// * Verifies that the admin user update remote process groups.
-// *
-// * @throws Exception
-// */
-// @Test
-// public void testRemoteProcessGroupPut() throws Exception {
-// String url = BASE_URL + "/controller/process-groups/root/remote-process-groups/1";
-//
-// // create the entity body
-// RemoteProcessGroupEntity entity = new RemoteProcessGroupEntity();
-// entity.setRevision(NiFiTestUser.REVISION);
-// entity.setClientId(CLIENT_ID);
-//
-// // perform the request
-// ClientResponse response = ADMIN_USER.testPut(url, entity);
-//
-// // ensure the request is failed with a forbidden status code
-// Assert.assertEquals(403, response.getStatus());
-// }
-//
-// /**
-// * Verifies that the admin user cannot delete remote process groups.
-// *
-// * @throws Exception
-// */
-// @Test
-// public void testRemoteProcessGroupDelete() throws Exception {
-// String url = BASE_URL + "/controller/process-groups/root/remote-process-groups/1";
-//
-// // perform the request
-// ClientResponse response = ADMIN_USER.testDelete(url);
-//
-// // ensure the request is failed with a forbidden status code
-// Assert.assertEquals(403, response.getStatus());
-// }
// ----------------------------------------------
// HISTORY
// ----------------------------------------------
/**
* Tests the ability to retrieve the NiFi history.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testHistoryGet() throws Exception {
@@ -972,7 +892,7 @@ public class AdminAccessControlTest {
/**
* Tests the ability to retrieve a specific action.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testActionGet() throws Exception {
@@ -989,7 +909,7 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user can purge history.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testHistoryDelete() throws Exception {
@@ -1012,7 +932,7 @@ public class AdminAccessControlTest {
/**
* Tests the ability to retrieve the NiFi users.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testUsersGet() throws Exception {
@@ -1028,7 +948,7 @@ public class AdminAccessControlTest {
/**
* Tests the ability to retrieve a specific user.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testUserGet() throws Exception {
@@ -1045,9 +965,9 @@ public class AdminAccessControlTest {
/**
* Verifies the admin user can update a person.
*
- * @throws Exception
+ * @throws Exception ex
*/
-// @Test
+ //@Test
public void testUserUpdate() throws Exception {
String url = BASE_URL + "/controller/users";
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
index 03b26ca..283a4a9 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
@@ -137,11 +137,6 @@ public class DfmAccessControlTest {
// ----------------------------------------------
// PROCESS GROUPS
// ----------------------------------------------
- /**
- * Ensures the dfm user can get a group contents.
- *
- * @throws Exception
- */
@Test
public void testGroupGet() throws Exception {
String url = BASE_URL + "/controller/process-groups/root";
@@ -179,7 +174,7 @@ public class DfmAccessControlTest {
/**
* Verifies the dfm user can update a group.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testGroupPut() throws Exception {
@@ -203,7 +198,7 @@ public class DfmAccessControlTest {
/**
* Verifies the dfm user can retrieve the controller configuration.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testControllerConfiguration() throws Exception {
@@ -242,7 +237,7 @@ public class DfmAccessControlTest {
/**
* Verifies the read only user cannot create a new flow archive.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testFlowConfigurationArchivePost() throws Exception {
@@ -263,7 +258,7 @@ public class DfmAccessControlTest {
/**
* Verifies the dfm user can retrieve his credentials.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testAuthoritiesGet() throws Exception {
@@ -286,7 +281,7 @@ public class DfmAccessControlTest {
/**
* Verifies the dfm user can retrieve the banners.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testBannersGet() throws Exception {
@@ -309,7 +304,7 @@ public class DfmAccessControlTest {
/**
* Verifies the dfm user can retrieve the processor types.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorTypesGet() throws Exception {
@@ -331,7 +326,7 @@ public class DfmAccessControlTest {
/**
* Verifies the dfm user can retrieve the prioritizer types.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
@Ignore
@@ -357,7 +352,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update a process group state.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessGroupPutState() throws Exception {
@@ -387,7 +382,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update a process group configuration.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessGroupPutConfiguration() throws Exception {
@@ -422,7 +417,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update processor state.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorPutState() throws Exception {
@@ -452,7 +447,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update processor state.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorPutConfiguration() throws Exception {
@@ -487,7 +482,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update connections.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testConnectionPut() throws Exception {
@@ -517,7 +512,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update labels.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testLabelPut() throws Exception {
@@ -552,7 +547,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testInputPortPut() throws Exception {
@@ -587,7 +582,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can update output ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testOutputPortPut() throws Exception {
@@ -619,37 +614,13 @@ public class DfmAccessControlTest {
Assert.assertEquals("new output port name", entity.getOutputPort().getName());
}
-// /**
-// * Verifies that the dfm user can update remote process groups.
-// *
-// * @throws Exception
-// */
-// @Test
-// public void testRemoteProcessGroupPut() throws Exception {
-// String url = BASE_URL + "/controller/process-groups/root/remote-process-groups";
-//
-// // get a random controller reference
-// RemoteProcessGroupDTO controllerReference = getRandomRemoteProcessGroup();
-//
-// // create the entity body
-// RemoteProcessGroupEntity entity = new RemoteProcessGroupEntity();
-// entity.setRevision(NiFiTestUser.REVISION);
-// entity.setClientId(CLIENT_ID);
-// entity.setRemoteProcessGroup(controllerReference);
-//
-// // perform the request
-// ClientResponse response = DFM_USER.testPut(url + "/" + controllerReference.getId(), entity);
-//
-// // ensure the request succeeded
-// Assert.assertEquals(200, response.getStatus());
-// }
// ----------------------------------------------
// POST and DELETE
// ----------------------------------------------
/**
* Verifies that the dfm user can create/delete processors.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessorCreateDelete() throws Exception {
@@ -660,7 +631,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can create/delete process groups.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testProcessGroupCreateDelete() throws Exception {
@@ -671,7 +642,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can create/delete input ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testInputPortCreateDelete() throws Exception {
@@ -682,7 +653,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can create/delete output ports.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testOutputPortCreateDelete() throws Exception {
@@ -693,7 +664,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can create/delete connections.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testConnectionCreateDelete() throws Exception {
@@ -707,7 +678,7 @@ public class DfmAccessControlTest {
/**
* Verifies that the dfm user can create/delete labels.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testLabelCreateDelete() throws Exception {
@@ -715,23 +686,13 @@ public class DfmAccessControlTest {
deleteLabel(label.getId());
}
-// /**
-// * Verifies that the dfm user can create/delete remote process groups.
-// *
-// * @throws Exception
-// */
-// @Test
-// public void testRemoteProcessGroupCreateDelete() throws Exception {
-// RemoteProcessGroupDTO remoteProcessGroup = createRemoteProcessGroup();
-// deleteRemoteProcessGroup(remoteProcessGroup.getId());
-// }
// ----------------------------------------------
// HISTORY
// ----------------------------------------------
/**
* Tests the ability to retrieve the NiFi history.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testHistoryGet() throws Exception {
@@ -751,7 +712,7 @@ public class DfmAccessControlTest {
/**
* Tests the ability to retrieve a specific action.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testActionGet() throws Exception {
@@ -768,7 +729,7 @@ public class DfmAccessControlTest {
/**
* Verifies the dfm user can purge history.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testHistoryDelete() throws Exception {
@@ -920,27 +881,6 @@ public class DfmAccessControlTest {
return inputPortsIter.next();
}
-// private RemoteProcessGroupDTO getRandomRemoteProcessGroup() throws Exception {
-// String url = BASE_URL + "/controller/process-groups/root/remote-process-groups";
-//
-// // get the remote process groups
-// ClientResponse response = DFM_USER.testGet(url);
-//
-// // ensure the response was successful
-// Assert.assertEquals(200, response.getStatus());
-//
-// // get the remote process group dtos
-// RemoteProcessGroupsEntity remoteProcessGroupEntity = response.getEntity(RemoteProcessGroupsEntity.class);
-// Collection<RemoteProcessGroupDTO> remoteProcessGroup = remoteProcessGroupEntity.getRemoteProcessGroups();
-//
-// // ensure the correct number of remote process group
-// Assert.assertFalse(remoteProcessGroup.isEmpty());
-//
-// // use the first remote process group as the target
-// Iterator<RemoteProcessGroupDTO> controllerReferenceIter = remoteProcessGroup.iterator();
-// Assert.assertTrue(controllerReferenceIter.hasNext());
-// return controllerReferenceIter.next();
-// }
// ----------------------------------------------
// Create resource utility methods
// ----------------------------------------------
@@ -1169,32 +1109,6 @@ public class DfmAccessControlTest {
return label;
}
-// public RemoteProcessGroupDTO createRemoteProcessGroup() throws Exception {
-// String url = BASE_URL + "/controller/process-groups/root/remote-process-groups";
-//
-// // create the controller reference
-// RemoteProcessGroupDTO remoteProcessGroup = new RemoteProcessGroupDTO();
-// remoteProcessGroup.setTargetUri(BASE_URL);
-//
-// // create the entity body
-// RemoteProcessGroupEntity entity = new RemoteProcessGroupEntity();
-// entity.setRevision(NiFiTestUser.REVISION);
-// entity.setClientId(CLIENT_ID);
-// entity.setRemoteProcessGroup(remoteProcessGroup);
-//
-// // perform the request
-// ClientResponse response = DFM_USER.testPost(url, entity);
-//
-// // ensure the request is successful
-// Assert.assertEquals(201, response.getStatus());
-//
-// // get the entity body
-// entity = response.getEntity(RemoteProcessGroupEntity.class);
-//
-// // get the controller reference id
-// Assert.assertNotNull(entity.getRemoteProcessGroup());
-// return entity.getRemoteProcessGroup();
-// }
// ----------------------------------------------
// Delete resource utility methods
// ----------------------------------------------
@@ -1339,7 +1253,7 @@ public class DfmAccessControlTest {
/**
* Tests the ability to retrieve the NiFi users.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testUsersGet() throws Exception {
@@ -1355,7 +1269,7 @@ public class DfmAccessControlTest {
/**
* Tests the ability to retrieve a specific user.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testUserGet() throws Exception {
@@ -1372,7 +1286,7 @@ public class DfmAccessControlTest {
/**
* Verifies the admin user can update a person.
*
- * @throws Exception
+ * @throws Exception ex
*/
@Test
public void testUserPut() throws Exception {