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:13 UTC
[39/50] [abbrv] incubator-nifi git commit: NIFI-271
NIFI-271
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/e1160f59
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/e1160f59
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/e1160f59
Branch: refs/heads/NIFI-292
Commit: e1160f5932b59eedf738eca18b8031a58385ca16
Parents: a52cf52
Author: joewitt <jo...@apache.org>
Authored: Tue Apr 28 00:27:12 2015 -0400
Committer: joewitt <jo...@apache.org>
Committed: Tue Apr 28 00:27:12 2015 -0400
----------------------------------------------------------------------
nifi-parent/pom.xml | 33 ++--
.../apache/nifi/audit/ControllerAuditor.java | 38 ++--
.../nifi/audit/ControllerServiceAuditor.java | 93 +++++-----
.../org/apache/nifi/audit/FunnelAuditor.java | 33 ++--
.../java/org/apache/nifi/audit/NiFiAuditor.java | 8 +-
.../java/org/apache/nifi/audit/PortAuditor.java | 45 +++--
.../apache/nifi/audit/ProcessGroupAuditor.java | 42 ++---
.../org/apache/nifi/audit/ProcessorAuditor.java | 66 +++----
.../apache/nifi/audit/RelationshipAuditor.java | 72 ++++----
.../nifi/audit/RemoteProcessGroupAuditor.java | 56 +++---
.../apache/nifi/audit/ReportingTaskAuditor.java | 64 ++++---
.../org/apache/nifi/audit/SnippetAuditor.java | 40 ++---
.../IllegalClusterResourceRequestException.java | 3 +-
.../nifi/web/StandardNiFiServiceFacade.java | 36 ++--
.../StandardNiFiWebConfigurationContext.java | 35 ++--
.../apache/nifi/web/StandardNiFiWebContext.java | 8 +-
.../nifi/web/api/ApplicationResource.java | 34 ++--
.../nifi/web/api/BulletinBoardResource.java | 7 +-
.../apache/nifi/web/api/ClusterResource.java | 6 +-
.../apache/nifi/web/api/ConnectionResource.java | 80 +++------
.../apache/nifi/web/api/ControllerResource.java | 113 ++++--------
.../nifi/web/api/ControllerServiceResource.java | 132 ++++++--------
.../org/apache/nifi/web/api/FunnelResource.java | 43 ++---
.../apache/nifi/web/api/HistoryResource.java | 52 ++----
.../apache/nifi/web/api/InputPortResource.java | 48 ++----
.../org/apache/nifi/web/api/LabelResource.java | 46 ++---
.../org/apache/nifi/web/api/NodeResource.java | 20 +--
.../apache/nifi/web/api/OutputPortResource.java | 48 ++----
.../nifi/web/api/ProcessGroupResource.java | 155 ++++++-----------
.../apache/nifi/web/api/ProcessorResource.java | 69 +++-----
.../apache/nifi/web/api/ProvenanceResource.java | 129 +++++---------
.../web/api/RemoteProcessGroupResource.java | 99 ++++-------
.../nifi/web/api/ReportingTaskResource.java | 92 +++-------
.../apache/nifi/web/api/SnippetResource.java | 79 ++++-----
.../nifi/web/api/SystemDiagnosticsResource.java | 4 +-
.../apache/nifi/web/api/TemplateResource.java | 38 ++--
.../apache/nifi/web/api/UserGroupResource.java | 44 ++---
.../org/apache/nifi/web/api/UserResource.java | 33 ++--
.../config/AdministrationExceptionMapper.java | 1 -
...ationCredentialsNotFoundExceptionMapper.java | 3 +-
.../web/api/config/ClusterExceptionMapper.java | 1 -
.../NoResponseFromNodesExceptionMapper.java | 3 +-
.../nifi/web/api/config/ThrowableMapper.java | 1 -
.../org/apache/nifi/web/api/dto/DtoFactory.java | 172 +++++++++----------
.../org/apache/nifi/web/api/package-info.java | 41 ++---
.../request/BulletinBoardPatternParameter.java | 3 +-
.../nifi/web/api/request/ClientIdParameter.java | 3 +-
.../nifi/web/api/request/DateTimeParameter.java | 3 +-
.../nifi/web/api/request/DoubleParameter.java | 3 +-
.../nifi/web/api/request/IntegerParameter.java | 3 +-
.../nifi/web/api/request/LongParameter.java | 3 +-
.../ApplicationStartupContextListener.java | 8 +-
.../nifi/web/controller/ControllerFacade.java | 162 ++++++++---------
.../nifi/web/dao/ControllerServiceDAO.java | 3 +-
.../java/org/apache/nifi/web/dao/PortDAO.java | 2 +-
.../apache/nifi/web/dao/ProcessGroupDAO.java | 11 +-
.../org/apache/nifi/web/dao/ProcessorDAO.java | 3 +-
.../nifi/web/dao/RemoteProcessGroupDAO.java | 4 +-
.../apache/nifi/web/dao/ReportingTaskDAO.java | 11 +-
.../org/apache/nifi/web/dao/SnippetDAO.java | 3 +-
.../org/apache/nifi/web/dao/TemplateDAO.java | 17 +-
.../apache/nifi/web/dao/impl/ComponentDAO.java | 21 +--
.../web/dao/impl/StandardConnectionDAO.java | 48 ------
.../dao/impl/StandardControllerServiceDAO.java | 67 +-------
.../nifi/web/dao/impl/StandardFunnelDAO.java | 48 ------
.../nifi/web/dao/impl/StandardInputPortDAO.java | 41 -----
.../nifi/web/dao/impl/StandardLabelDAO.java | 48 ------
.../web/dao/impl/StandardOutputPortDAO.java | 41 -----
.../web/dao/impl/StandardProcessGroupDAO.java | 34 ----
.../nifi/web/dao/impl/StandardProcessorDAO.java | 49 ------
.../dao/impl/StandardRemoteProcessGroupDAO.java | 29 +---
.../web/dao/impl/StandardReportingTaskDAO.java | 63 +------
.../nifi/web/dao/impl/StandardSnippetDAO.java | 43 -----
.../nifi/web/filter/NodeRequestFilter.java | 21 +--
.../org/apache/nifi/web/util/Availability.java | 3 +-
.../org/apache/nifi/web/util/SnippetUtils.java | 14 +-
.../apache/nifi/integration/NiFiWebApiTest.java | 27 ---
.../accesscontrol/AdminAccessControlTest.java | 162 +++++------------
.../accesscontrol/DfmAccessControlTest.java | 140 +++------------
.../ReadOnlyAccessControlTest.java | 162 +++++------------
.../util/NiFiTestAuthorizationProvider.java | 36 ++--
.../nifi/integration/util/NiFiTestServer.java | 7 +-
.../nifi/integration/util/NiFiTestUser.java | 88 +++++-----
.../nifi/web/docs/DocumentationController.java | 2 +-
.../nifi-framework/nifi-web/nifi-web-ui/pom.xml | 17 --
85 files changed, 1165 insertions(+), 2553 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e1160f59/nifi-parent/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-parent/pom.xml b/nifi-parent/pom.xml
index bdb94c8..dbc31df 100644
--- a/nifi-parent/pom.xml
+++ b/nifi-parent/pom.xml
@@ -248,6 +248,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>check-style</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
<checkstyleRules>
<module name="Checker">
@@ -354,38 +362,29 @@
</exclusions>
</dependency>
</dependencies>
- <executions>
- <execution>
- <id>check-licenses</id>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
</plugin>
</plugins>
</build>
<profiles>
- <profile> <!-- will move this up with the always on plugins once we get all checkstyle stuff resolved-->
- <id>checkstyle</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
+ <profile>
+ <!-- Automatically check for licenses. Too slow to always run.
+ Activate with -P check-licenses -->
+ <id>check-licenses</id>
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
<executions>
<execution>
- <id>check-style</id>
<goals>
<goal>check</goal>
</goals>
+ <phase>verify</phase>
</execution>
</executions>
</plugin>
- </plugins>
+ </plugins>
</build>
</profile>
</profiles>
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/audit/ControllerAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerAuditor.java
index 7f5f926..f1e31dd 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerAuditor.java
@@ -43,10 +43,10 @@ public class ControllerAuditor extends NiFiAuditor {
/**
* Audits updating the name of the controller.
*
- * @param proceedingJoinPoint
- * @param name
- * @param controllerFacade
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @param name name
+ * @param controllerFacade facade
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.controller.ControllerFacade) && "
+ "execution(void setName(java.lang.String)) && "
@@ -96,10 +96,10 @@ public class ControllerAuditor extends NiFiAuditor {
/**
* Audits updating the comments of the controller.
*
- * @param proceedingJoinPoint
- * @param comments
- * @param controllerFacade
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @param comments comments
+ * @param controllerFacade facade
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.controller.ControllerFacade) && "
+ "execution(void setComments(java.lang.String)) && "
@@ -147,13 +147,12 @@ public class ControllerAuditor extends NiFiAuditor {
}
/**
- * Audits updating the max number of timer driven threads for the
- * controller.
+ * Audits updating the max number of timer driven threads for the controller.
*
- * @param proceedingJoinPoint
- * @param maxTimerDrivenThreadCount
- * @param controllerFacade
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint joint point
+ * @param maxTimerDrivenThreadCount thread count
+ * @param controllerFacade facade
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.controller.ControllerFacade) && "
+ "execution(void setMaxTimerDrivenThreadCount(int)) && "
@@ -201,13 +200,12 @@ public class ControllerAuditor extends NiFiAuditor {
}
/**
- * Audits updating the max number of event driven threads for the
- * controller.
+ * Audits updating the max number of event driven threads for the controller.
*
- * @param proceedingJoinPoint
- * @param maxEventDrivenThreadCount
- * @param controllerFacade
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @param maxEventDrivenThreadCount thread count
+ * @param controllerFacade facade
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.controller.ControllerFacade) && "
+ "execution(void setMaxEventDrivenThreadCount(int)) && "
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/audit/ControllerServiceAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerServiceAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerServiceAuditor.java
index a044b46..8ca3f0e 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerServiceAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ControllerServiceAuditor.java
@@ -63,16 +63,12 @@ public class ControllerServiceAuditor extends NiFiAuditor {
/**
* Audits the creation of controller service via createControllerService().
*
- * This method only needs to be run 'after returning'. However, in Java 7
- * the order in which these methods are returned from
- * Class.getDeclaredMethods (even though there is no order guaranteed) seems
- * to differ from Java 6. SpringAOP depends on this ordering to determine
- * advice precedence. By normalizing all advice into Around advice we can
- * alleviate this issue.
+ * This method only needs to be run 'after returning'. However, in Java 7 the order in which these methods are returned from Class.getDeclaredMethods (even though there is no order guaranteed)
+ * seems to differ from Java 6. SpringAOP depends on this ordering to determine advice precedence. By normalizing all advice into Around advice we can alleviate this issue.
*
- * @param proceedingJoinPoint
- * @return
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @return node
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ControllerServiceDAO+) && "
+ "execution(org.apache.nifi.controller.service.ControllerServiceNode createControllerService(org.apache.nifi.web.api.dto.ControllerServiceDTO))")
@@ -94,11 +90,11 @@ public class ControllerServiceAuditor extends NiFiAuditor {
/**
* Audits the configuration of a single controller service.
*
- * @param proceedingJoinPoint
- * @param controllerServiceDTO
- * @param controllerServiceDAO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param controllerServiceDTO dto
+ * @param controllerServiceDAO dao
+ * @return object
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ControllerServiceDAO+) && "
+ "execution(org.apache.nifi.controller.service.ControllerServiceNode updateControllerService(org.apache.nifi.web.api.dto.ControllerServiceDTO)) && "
@@ -220,13 +216,14 @@ public class ControllerServiceAuditor extends NiFiAuditor {
/**
* Audits the update of a component referencing a controller service.
*
- * @param proceedingJoinPoint
- * @param controllerServiceId
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @return object
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ControllerServiceDAO+) && "
- + "execution(org.apache.nifi.controller.service.ControllerServiceReference updateControllerServiceReferencingComponents(java.lang.String, org.apache.nifi.controller.ScheduledState, org.apache.nifi.controller.service.ControllerServiceState))")
+ + "execution(org.apache.nifi.controller.service.ControllerServiceReference "
+ + "updateControllerServiceReferencingComponents(java.lang.String, org.apache.nifi.controller.ScheduledState, "
+ + "org.apache.nifi.controller.service.ControllerServiceState))")
public Object updateControllerServiceReferenceAdvice(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
// update the controller service references
final ControllerServiceReference controllerServiceReference = (ControllerServiceReference) proceedingJoinPoint.proceed();
@@ -255,12 +252,13 @@ public class ControllerServiceAuditor extends NiFiAuditor {
/**
* Gets the update actions for all specified referencing components.
*
- * @param user
- * @param actions
- * @param visitedServices
- * @param referencingComponents
+ * @param user user
+ * @param actions actions
+ * @param visitedServices services
+ * @param referencingComponents components
*/
- private void getUpdateActionsForReferencingComponents(final NiFiUser user, final Collection<Action> actions, final Collection<String> visitedServices, final Set<ConfiguredComponent> referencingComponents) {
+ private void getUpdateActionsForReferencingComponents(
+ final NiFiUser user, final Collection<Action> actions, final Collection<String> visitedServices, final Set<ConfiguredComponent> referencingComponents) {
// consider each component updates
for (final ConfiguredComponent component : referencingComponents) {
if (component instanceof ProcessorNode) {
@@ -329,10 +327,10 @@ public class ControllerServiceAuditor extends NiFiAuditor {
/**
* Audits the removal of a controller service via deleteControllerService().
*
- * @param proceedingJoinPoint
- * @param controllerServiceId
- * @param controllerServiceDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param controllerServiceId id
+ * @param controllerServiceDAO dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ControllerServiceDAO+) && "
+ "execution(void deleteControllerService(java.lang.String)) && "
@@ -358,9 +356,9 @@ public class ControllerServiceAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a controller service.
*
- * @param controllerService
- * @param operation
- * @return
+ * @param controllerService service
+ * @param operation operation
+ * @return action
*/
private Action generateAuditRecord(ControllerServiceNode controllerService, Operation operation) {
return generateAuditRecord(controllerService, operation, null);
@@ -369,10 +367,10 @@ public class ControllerServiceAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a controller service.
*
- * @param controllerService
- * @param operation
- * @param actionDetails
- * @return
+ * @param controllerService service
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
private Action generateAuditRecord(ControllerServiceNode controllerService, Operation operation, ActionDetails actionDetails) {
Action action = null;
@@ -406,12 +404,11 @@ public class ControllerServiceAuditor extends NiFiAuditor {
}
/**
- * Extracts the values for the configured properties from the specified
- * ControllerService.
+ * Extracts the values for the configured properties from the specified ControllerService.
*
- * @param controllerService
- * @param controllerServiceDTO
- * @return
+ * @param controllerService service
+ * @param controllerServiceDTO dto
+ * @return properties
*/
private Map<String, String> extractConfiguredPropertyValues(ControllerServiceNode controllerService, ControllerServiceDTO controllerServiceDTO) {
Map<String, String> values = new HashMap<>();
@@ -447,12 +444,11 @@ public class ControllerServiceAuditor extends NiFiAuditor {
}
/**
- * Locates the actual property descriptor for the given spec property
- * descriptor.
+ * Locates the actual property descriptor for the given spec property descriptor.
*
- * @param propertyDescriptors
- * @param specDescriptor
- * @return
+ * @param propertyDescriptors descriptors
+ * @param specDescriptor example descriptor
+ * @return property
*/
private PropertyDescriptor locatePropertyDescriptor(Set<PropertyDescriptor> propertyDescriptors, PropertyDescriptor specDescriptor) {
for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
@@ -464,11 +460,10 @@ public class ControllerServiceAuditor extends NiFiAuditor {
}
/**
- * Returns whether the specified controller service is disabled (or
- * disabling).
+ * Returns whether the specified controller service is disabled (or disabling).
*
- * @param controllerService
- * @return
+ * @param controllerService service
+ * @return whether the specified controller service is disabled (or disabling)
*/
private boolean isDisabled(final ControllerServiceNode controllerService) {
return ControllerServiceState.DISABLED.equals(controllerService.getState()) || ControllerServiceState.DISABLING.equals(controllerService.getState());
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/audit/FunnelAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/FunnelAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/FunnelAuditor.java
index e96604c..e864c89 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/FunnelAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/FunnelAuditor.java
@@ -33,9 +33,6 @@ import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- *
- */
@Aspect
public class FunnelAuditor extends NiFiAuditor {
@@ -44,9 +41,9 @@ public class FunnelAuditor extends NiFiAuditor {
/**
* Audits the creation of a funnel.
*
- * @param proceedingJoinPoint
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @return funnel
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.FunnelDAO+) && "
+ "execution(org.apache.nifi.connectable.Funnel createFunnel(java.lang.String, org.apache.nifi.web.api.dto.FunnelDTO))")
@@ -68,11 +65,11 @@ public class FunnelAuditor extends NiFiAuditor {
/**
* Audits the removal of a funnel.
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param funnelId
- * @param funnelDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param funnelId funnel id
+ * @param funnelDAO funnel dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.FunnelDAO+) && "
+ "execution(void deleteFunnel(java.lang.String, java.lang.String)) && "
@@ -97,9 +94,9 @@ public class FunnelAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of the specified funnel.
*
- * @param funnel
- * @param operation
- * @return
+ * @param funnel funnel
+ * @param operation operation
+ * @return action
*/
public Action generateAuditRecord(Funnel funnel, Operation operation) {
return generateAuditRecord(funnel, operation, null);
@@ -108,10 +105,10 @@ public class FunnelAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of the specified funnel.
*
- * @param funnel
- * @param operation
- * @param actionDetails
- * @return
+ * @param funnel funnel
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
public Action generateAuditRecord(Funnel funnel, Operation operation, ActionDetails actionDetails) {
Action action = null;
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/audit/NiFiAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/NiFiAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/NiFiAuditor.java
index e61a4a6..4477cce 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/NiFiAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/NiFiAuditor.java
@@ -41,8 +41,8 @@ public abstract class NiFiAuditor {
/**
* Records the specified action.
*
- * @param action
- * @param logger
+ * @param action action
+ * @param logger logger
*/
protected void saveAction(Action action, Logger logger) {
final Collection<Action> actions = new ArrayList<>();
@@ -53,8 +53,8 @@ public abstract class NiFiAuditor {
/**
* Records the actions.
*
- * @param actions
- * @param logger
+ * @param actions actions
+ * @param logger logger
*/
protected void saveActions(Collection<Action> actions, Logger logger) {
ClusterContext ctx = 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/main/java/org/apache/nifi/audit/PortAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/PortAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/PortAuditor.java
index 479842c..2df883d 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/PortAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/PortAuditor.java
@@ -43,9 +43,6 @@ import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- *
- */
@Aspect
public class PortAuditor extends NiFiAuditor {
@@ -54,9 +51,9 @@ public class PortAuditor extends NiFiAuditor {
/**
* Audits the creation of a port.
*
- * @param proceedingJoinPoint
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @return port
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.PortDAO+) && "
+ "execution(org.apache.nifi.connectable.Port createPort(java.lang.String, org.apache.nifi.web.api.dto.PortDTO))")
@@ -78,12 +75,12 @@ public class PortAuditor extends NiFiAuditor {
/**
* Audits the update of a port.
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param portDTO
- * @param portDAO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param portDTO port dto
+ * @param portDAO port dao
+ * @return port
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.PortDAO+) && "
+ "execution(org.apache.nifi.connectable.Port updatePort(java.lang.String, org.apache.nifi.web.api.dto.PortDTO)) && "
@@ -263,11 +260,11 @@ public class PortAuditor extends NiFiAuditor {
/**
* Audits the removal of a processor via deleteProcessor().
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param portId
- * @param portDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param portId port id
+ * @param portDAO port dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.PortDAO+) && "
+ "execution(void deletePort(java.lang.String, java.lang.String)) && "
@@ -293,9 +290,9 @@ public class PortAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of the specified port.
*
- * @param port
- * @param operation
- * @return
+ * @param port port
+ * @param operation operation
+ * @return action
*/
public Action generateAuditRecord(Port port, Operation operation) {
return generateAuditRecord(port, operation, null);
@@ -304,10 +301,10 @@ public class PortAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of the specified port.
*
- * @param port
- * @param operation
- * @param actionDetails
- * @return
+ * @param port port
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
public Action generateAuditRecord(Port port, Operation operation, ActionDetails actionDetails) {
Action action = null;
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/audit/ProcessGroupAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java
index 7acf4e2..fa5ac70 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java
@@ -47,16 +47,12 @@ public class ProcessGroupAuditor extends NiFiAuditor {
/**
* Audits the creation of process groups via createProcessGroup().
*
- * This method only needs to be run 'after returning'. However, in Java 7
- * the order in which these methods are returned from
- * Class.getDeclaredMethods (even though there is no order guaranteed) seems
- * to differ from Java 6. SpringAOP depends on this ordering to determine
- * advice precedence. By normalizing all advice into Around advice we can
- * alleviate this issue.
+ * This method only needs to be run 'after returning'. However, in Java 7 the order in which these methods are returned from Class.getDeclaredMethods (even though there is no order guaranteed)
+ * seems to differ from Java 6. SpringAOP depends on this ordering to determine advice precedence. By normalizing all advice into Around advice we can alleviate this issue.
*
- * @param proceedingJoinPoint
- * @return
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @return group
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ProcessGroupDAO+) && "
+ "execution(org.apache.nifi.groups.ProcessGroup createProcessGroup(java.lang.String, org.apache.nifi.web.api.dto.ProcessGroupDTO))")
@@ -79,10 +75,10 @@ public class ProcessGroupAuditor extends NiFiAuditor {
/**
* Audits the update of process group configuration.
*
- * @param proceedingJoinPoint
- * @param processGroupDTO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param processGroupDTO dto
+ * @return group
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ProcessGroupDAO+) && "
+ "execution(org.apache.nifi.groups.ProcessGroup updateProcessGroup(org.apache.nifi.web.api.dto.ProcessGroupDTO)) && "
@@ -190,9 +186,9 @@ public class ProcessGroupAuditor extends NiFiAuditor {
/**
* Audits the removal of a process group via deleteProcessGroup().
*
- * @param proceedingJoinPoint
- * @param groupId
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ProcessGroupDAO+) && "
+ "execution(void deleteProcessGroup(java.lang.String)) && "
@@ -218,9 +214,9 @@ public class ProcessGroupAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a process group.
*
- * @param processGroup
- * @param operation
- * @return
+ * @param processGroup group
+ * @param operation operation
+ * @return action
*/
public Action generateAuditRecord(ProcessGroup processGroup, Operation operation) {
return generateAuditRecord(processGroup, operation, null);
@@ -229,10 +225,10 @@ public class ProcessGroupAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a process group.
*
- * @param processGroup
- * @param operation
- * @param actionDetails
- * @return
+ * @param processGroup group
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
public Action generateAuditRecord(ProcessGroup processGroup, Operation operation, ActionDetails actionDetails) {
Action action = null;
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/audit/ProcessorAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java
index 0a9f857..23df486 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java
@@ -71,16 +71,12 @@ public class ProcessorAuditor extends NiFiAuditor {
/**
* Audits the creation of processors via createProcessor().
*
- * This method only needs to be run 'after returning'. However, in Java 7
- * the order in which these methods are returned from
- * Class.getDeclaredMethods (even though there is no order guaranteed) seems
- * to differ from Java 6. SpringAOP depends on this ordering to determine
- * advice precedence. By normalizing all advice into Around advice we can
- * alleviate this issue.
+ * This method only needs to be run 'after returning'. However, in Java 7 the order in which these methods are returned from Class.getDeclaredMethods (even though there is no order guaranteed)
+ * seems to differ from Java 6. SpringAOP depends on this ordering to determine advice precedence. By normalizing all advice into Around advice we can alleviate this issue.
*
- * @param proceedingJoinPoint
- * @return
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @return node
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ProcessorDAO+) && "
+ "execution(org.apache.nifi.controller.ProcessorNode createProcessor(java.lang.String, org.apache.nifi.web.api.dto.ProcessorDTO))")
@@ -102,12 +98,12 @@ public class ProcessorAuditor extends NiFiAuditor {
/**
* Audits the configuration of a single processor.
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param processorDTO
- * @param processorDAO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param processorDTO dto
+ * @param processorDAO dao
+ * @return node
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ProcessorDAO+) && "
+ "execution(org.apache.nifi.controller.ProcessorNode updateProcessor(java.lang.String, org.apache.nifi.web.api.dto.ProcessorDTO)) && "
@@ -237,11 +233,11 @@ public class ProcessorAuditor extends NiFiAuditor {
/**
* Audits the removal of a processor via deleteProcessor().
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param processorId
- * @param processorDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param processorId processor id
+ * @param processorDAO dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ProcessorDAO+) && "
+ "execution(void deleteProcessor(java.lang.String, java.lang.String)) && "
@@ -267,9 +263,9 @@ public class ProcessorAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a processor.
*
- * @param processor
- * @param operation
- * @return
+ * @param processor processor
+ * @param operation operation
+ * @return action
*/
public Action generateAuditRecord(ProcessorNode processor, Operation operation) {
return generateAuditRecord(processor, operation, null);
@@ -278,10 +274,10 @@ public class ProcessorAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a processor.
*
- * @param processor
- * @param operation
- * @param actionDetails
- * @return
+ * @param processor processor
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
public Action generateAuditRecord(ProcessorNode processor, Operation operation, ActionDetails actionDetails) {
Action action = null;
@@ -315,12 +311,7 @@ public class ProcessorAuditor extends NiFiAuditor {
}
/**
- * Extracts the values for the configured properties from the specified
- * Processor.
- *
- * @param processor
- * @param processorDTO
- * @return
+ * Extracts the values for the configured properties from the specified Processor.
*/
private Map<String, String> extractConfiguredPropertyValues(ProcessorNode processor, ProcessorDTO processorDTO) {
Map<String, String> values = new HashMap<>();
@@ -389,12 +380,11 @@ public class ProcessorAuditor extends NiFiAuditor {
}
/**
- * Locates the actual property descriptor for the given spec property
- * descriptor.
+ * Locates the actual property descriptor for the given spec property descriptor.
*
- * @param propertyDescriptors
- * @param specDescriptor
- * @return
+ * @param propertyDescriptors properties
+ * @param specDescriptor example property
+ * @return property
*/
private PropertyDescriptor locatePropertyDescriptor(Set<PropertyDescriptor> propertyDescriptors, PropertyDescriptor specDescriptor) {
for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
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/audit/RelationshipAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RelationshipAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RelationshipAuditor.java
index b651904..c55a1c6 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RelationshipAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RelationshipAuditor.java
@@ -69,16 +69,12 @@ public class RelationshipAuditor extends NiFiAuditor {
/**
* Audits the creation of relationships via createConnection().
*
- * This method only needs to be run 'after returning'. However, in Java 7
- * the order in which these methods are returned from
- * Class.getDeclaredMethods (even though there is no order guaranteed) seems
- * to differ from Java 6. SpringAOP depends on this ordering to determine
- * advice precedence. By normalizing all advice into Around advice we can
- * alleviate this issue.
+ * This method only needs to be run 'after returning'. However, in Java 7 the order in which these methods are returned from Class.getDeclaredMethods (even though there is no order guaranteed)
+ * seems to differ from Java 6. SpringAOP depends on this ordering to determine advice precedence. By normalizing all advice into Around advice we can alleviate this issue.
*
- * @param proceedingJoinPoint
- * @return
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @return connection
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ConnectionDAO+) && "
+ "execution(org.apache.nifi.connectable.Connection createConnection(java.lang.String, org.apache.nifi.web.api.dto.ConnectionDTO))")
@@ -101,12 +97,12 @@ public class RelationshipAuditor extends NiFiAuditor {
/**
* Audits the creation and removal of relationships via updateConnection().
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param connectionDTO
- * @param connectionDAO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param connectionDTO dto
+ * @param connectionDAO dao
+ * @return connection
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ConnectionDAO+) && "
+ "execution(org.apache.nifi.connectable.Connection updateConnection(java.lang.String, org.apache.nifi.web.api.dto.ConnectionDTO)) && "
@@ -215,11 +211,11 @@ public class RelationshipAuditor extends NiFiAuditor {
/**
* Audits the removal of relationships via deleteConnection().
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param id
- * @param connectionDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param id id
+ * @param connectionDAO dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ConnectionDAO+) && "
+ "execution(void deleteConnection(java.lang.String, java.lang.String)) && "
@@ -249,11 +245,11 @@ public class RelationshipAuditor extends NiFiAuditor {
/**
* Creates action details for connect/disconnect actions.
*
- * @param connection
- * @param source
- * @param relationships
- * @param destination
- * @return
+ * @param connection connection
+ * @param source source
+ * @param relationships relationships
+ * @param destination destinations
+ * @return details
*/
public ConnectDetails createConnectDetails(final Connection connection, final Connectable source, final Collection<Relationship> relationships, final Connectable destination) {
final Component sourceType = determineConnectableType(source);
@@ -279,12 +275,11 @@ public class RelationshipAuditor extends NiFiAuditor {
}
/**
- * Extracts configured settings from the specified connection only if they
- * have also been specified in the connectionDTO.
+ * Extracts configured settings from the specified connection only if they have also been specified in the connectionDTO.
*
- * @param connection
- * @param connectionDTO
- * @return
+ * @param connection connection
+ * @param connectionDTO dto
+ * @return properties
*/
private Map<String, String> extractConfiguredPropertyValues(Connection connection, ConnectionDTO connectionDTO) {
Map<String, String> values = new HashMap<>();
@@ -315,9 +310,9 @@ public class RelationshipAuditor extends NiFiAuditor {
/**
* Generates the audit records for the specified connection.
*
- * @param connection
- * @param operation
- * @return
+ * @param connection connection
+ * @param operation operation
+ * @return action
*/
public Action generateAuditRecordForConnection(Connection connection, Operation operation) {
return generateAuditRecordForConnection(connection, operation, null);
@@ -326,10 +321,10 @@ public class RelationshipAuditor extends NiFiAuditor {
/**
* Generates the audit records for the specified connection.
*
- * @param connection
- * @param operation
- * @param actionDetails
- * @return
+ * @param connection connection
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
public Action generateAuditRecordForConnection(Connection connection, Operation operation, ActionDetails actionDetails) {
Action action = null;
@@ -374,9 +369,6 @@ public class RelationshipAuditor extends NiFiAuditor {
/**
* Determines the type of component the specified connectable is.
- *
- * @param connectable
- * @return
*/
private Component determineConnectableType(Connectable connectable) {
String sourceId = connectable.getIdentifier();
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/audit/RemoteProcessGroupAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RemoteProcessGroupAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RemoteProcessGroupAuditor.java
index ba9e629..f201fe2 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RemoteProcessGroupAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/RemoteProcessGroupAuditor.java
@@ -50,19 +50,14 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor {
private static final Logger logger = LoggerFactory.getLogger(RemoteProcessGroupAuditor.class);
/**
- * Audits the creation of remote process groups via
- * createRemoteProcessGroup().
+ * Audits the creation of remote process groups via createRemoteProcessGroup().
*
- * This method only needs to be run 'after returning'. However, in Java 7
- * the order in which these methods are returned from
- * Class.getDeclaredMethods (even though there is no order guaranteed) seems
- * to differ from Java 6. SpringAOP depends on this ordering to determine
- * advice precedence. By normalizing all advice into Around advice we can
- * alleviate this issue.
+ * This method only needs to be run 'after returning'. However, in Java 7 the order in which these methods are returned from Class.getDeclaredMethods (even though there is no order guaranteed)
+ * seems to differ from Java 6. SpringAOP depends on this ordering to determine advice precedence. By normalizing all advice into Around advice we can alleviate this issue.
*
- * @param proceedingJoinPoint
- * @return
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint join point
+ * @return group
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.RemoteProcessGroupDAO+) && "
+ "execution(org.apache.nifi.groups.RemoteProcessGroup createRemoteProcessGroup(java.lang.String, org.apache.nifi.web.api.dto.RemoteProcessGroupDTO))")
@@ -85,18 +80,19 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor {
/**
* Audits the update of remote process group configuration.
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param remoteProcessGroupDTO
- * @param remoteProcessGroupDAO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param remoteProcessGroupDTO dto
+ * @param remoteProcessGroupDAO dao
+ * @return group
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.RemoteProcessGroupDAO+) && "
+ "execution(org.apache.nifi.groups.RemoteProcessGroup updateRemoteProcessGroup(java.lang.String, org.apache.nifi.web.api.dto.RemoteProcessGroupDTO)) && "
+ "args(groupId, remoteProcessGroupDTO) && "
+ "target(remoteProcessGroupDAO)")
- public RemoteProcessGroup auditUpdateProcessGroupConfiguration(ProceedingJoinPoint proceedingJoinPoint, String groupId, RemoteProcessGroupDTO remoteProcessGroupDTO, RemoteProcessGroupDAO remoteProcessGroupDAO) throws Throwable {
+ public RemoteProcessGroup auditUpdateProcessGroupConfiguration(
+ ProceedingJoinPoint proceedingJoinPoint, String groupId, RemoteProcessGroupDTO remoteProcessGroupDTO, RemoteProcessGroupDAO remoteProcessGroupDAO) throws Throwable {
final RemoteProcessGroup remoteProcessGroup = remoteProcessGroupDAO.getRemoteProcessGroup(groupId, remoteProcessGroupDTO.getId());
// record the current value of this remoteProcessGroups configuration for comparisons later
@@ -300,11 +296,11 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor {
/**
* Audits the removal of a process group via deleteProcessGroup().
*
- * @param proceedingJoinPoint
- * @param groupId
- * @param remoteProcessGroupId
- * @param remoteProcessGroupDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param groupId group id
+ * @param remoteProcessGroupId remote group id
+ * @param remoteProcessGroupDAO remote group dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.RemoteProcessGroupDAO+) && "
+ "execution(void deleteRemoteProcessGroup(java.lang.String, java.lang.String)) && "
@@ -329,9 +325,9 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor {
/**
* Generates an audit record for the specified remote process group.
*
- * @param remoteProcessGroup
- * @param operation
- * @return
+ * @param remoteProcessGroup group
+ * @param operation operation
+ * @return action
*/
public Action generateAuditRecord(RemoteProcessGroup remoteProcessGroup, Operation operation) {
return generateAuditRecord(remoteProcessGroup, operation, null);
@@ -340,10 +336,10 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor {
/**
* Generates an audit record for the specified remote process group.
*
- * @param remoteProcessGroup
- * @param operation
- * @param actionDetails
- * @return
+ * @param remoteProcessGroup group
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
public Action generateAuditRecord(RemoteProcessGroup remoteProcessGroup, Operation operation, ActionDetails actionDetails) {
Action action = null;
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/audit/ReportingTaskAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ReportingTaskAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ReportingTaskAuditor.java
index 38aaf1f..bad91ec 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ReportingTaskAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ReportingTaskAuditor.java
@@ -56,16 +56,12 @@ public class ReportingTaskAuditor extends NiFiAuditor {
/**
* Audits the creation of reporting task via createReportingTask().
*
- * This method only needs to be run 'after returning'. However, in Java 7
- * the order in which these methods are returned from
- * Class.getDeclaredMethods (even though there is no order guaranteed) seems
- * to differ from Java 6. SpringAOP depends on this ordering to determine
- * advice precedence. By normalizing all advice into Around advice we can
- * alleviate this issue.
+ * This method only needs to be run 'after returning'. However, in Java 7 the order in which these methods are returned from Class.getDeclaredMethods (even though there is no order guaranteed)
+ * seems to differ from Java 6. SpringAOP depends on this ordering to determine advice precedence. By normalizing all advice into Around advice we can alleviate this issue.
*
- * @param proceedingJoinPoint
- * @return
- * @throws java.lang.Throwable
+ * @param proceedingJoinPoint joinpoint
+ * @return node
+ * @throws java.lang.Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ReportingTaskDAO+) && "
+ "execution(org.apache.nifi.controller.ReportingTaskNode createReportingTask(org.apache.nifi.web.api.dto.ReportingTaskDTO))")
@@ -87,11 +83,11 @@ public class ReportingTaskAuditor extends NiFiAuditor {
/**
* Audits the configuration of a reporting task.
*
- * @param proceedingJoinPoint
- * @param reportingTaskDTO
- * @param reportingTaskDAO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint joinpoint
+ * @param reportingTaskDTO dto
+ * @param reportingTaskDAO dao
+ * @return object
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ReportingTaskDAO+) && "
+ "execution(org.apache.nifi.controller.ReportingTaskNode updateReportingTask(org.apache.nifi.web.api.dto.ReportingTaskDTO)) && "
@@ -220,10 +216,10 @@ public class ReportingTaskAuditor extends NiFiAuditor {
/**
* Audits the removal of a reporting task via deleteReportingTask().
*
- * @param proceedingJoinPoint
- * @param reportingTaskId
- * @param reportingTaskDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param reportingTaskId task id
+ * @param reportingTaskDAO task dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.ReportingTaskDAO+) && "
+ "execution(void deleteReportingTask(java.lang.String)) && "
@@ -249,9 +245,9 @@ public class ReportingTaskAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a reporting task.
*
- * @param reportingTask
- * @param operation
- * @return
+ * @param reportingTask task
+ * @param operation operation
+ * @return action
*/
public Action generateAuditRecord(ReportingTaskNode reportingTask, Operation operation) {
return generateAuditRecord(reportingTask, operation, null);
@@ -260,10 +256,10 @@ public class ReportingTaskAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of a reporting task.
*
- * @param reportingTask
- * @param operation
- * @param actionDetails
- * @return
+ * @param reportingTask task
+ * @param operation operation
+ * @param actionDetails details
+ * @return action
*/
public Action generateAuditRecord(ReportingTaskNode reportingTask, Operation operation, ActionDetails actionDetails) {
Action action = null;
@@ -297,12 +293,11 @@ public class ReportingTaskAuditor extends NiFiAuditor {
}
/**
- * Extracts the values for the configured properties from the specified
- * ReportingTask.
+ * Extracts the values for the configured properties from the specified ReportingTask.
*
- * @param reportingTask
- * @param reportingTaskDTO
- * @return
+ * @param reportingTask task
+ * @param reportingTaskDTO dto
+ * @return properties of task
*/
private Map<String, String> extractConfiguredPropertyValues(ReportingTaskNode reportingTask, ReportingTaskDTO reportingTaskDTO) {
Map<String, String> values = new HashMap<>();
@@ -335,12 +330,11 @@ public class ReportingTaskAuditor extends NiFiAuditor {
}
/**
- * Locates the actual property descriptor for the given spec property
- * descriptor.
+ * Locates the actual property descriptor for the given spec property descriptor.
*
- * @param propertyDescriptors
- * @param specDescriptor
- * @return
+ * @param propertyDescriptors properties
+ * @param specDescriptor example property
+ * @return property
*/
private PropertyDescriptor locatePropertyDescriptor(Set<PropertyDescriptor> propertyDescriptors, PropertyDescriptor specDescriptor) {
for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
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/audit/SnippetAuditor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/SnippetAuditor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/SnippetAuditor.java
index 38769bb..20ce740 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/SnippetAuditor.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/SnippetAuditor.java
@@ -88,9 +88,9 @@ public class SnippetAuditor extends NiFiAuditor {
/**
* Audits copy/paste.
*
- * @param proceedingJoinPoint
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @return dto
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.SnippetDAO+) && "
+ "execution(org.apache.nifi.web.api.dto.FlowSnippetDTO copySnippet(java.lang.String, java.lang.String, java.lang.Double, java.lang.Double))")
@@ -104,9 +104,9 @@ public class SnippetAuditor extends NiFiAuditor {
/**
* Audits the instantiation of a template.
*
- * @param proceedingJoinPoint
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @return dto
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.TemplateDAO+) && "
+ "execution(org.apache.nifi.web.api.dto.FlowSnippetDTO instantiateTemplate(java.lang.String, java.lang.Double, java.lang.Double, java.lang.String))")
@@ -119,8 +119,6 @@ public class SnippetAuditor extends NiFiAuditor {
/**
* Audits the specified snippet.
- *
- * @param snippet
*/
private void auditSnippet(final FlowSnippetDTO snippet) {
final Collection<Action> actions = new ArrayList<>();
@@ -199,9 +197,6 @@ public class SnippetAuditor extends NiFiAuditor {
/**
* Determines the type of component the specified connectable is.
- *
- * @param connectable
- * @return
*/
private Component determineConnectableType(ConnectableDTO connectable) {
Component component = Component.Controller;
@@ -224,11 +219,6 @@ public class SnippetAuditor extends NiFiAuditor {
/**
* Generates an audit record for the creation of the specified funnel.
- *
- * @param id
- * @param name
- * @param type
- * @param operation
*/
private Action generateAuditRecord(String id, String name, Component type, Operation operation, Date timestamp) {
Action action = null;
@@ -255,11 +245,11 @@ public class SnippetAuditor extends NiFiAuditor {
/**
* Audits a bulk move.
*
- * @param proceedingJoinPoint
- * @param snippetDTO
- * @param snippetDAO
- * @return
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param snippetDTO dto
+ * @param snippetDAO dao
+ * @return snippet
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.SnippetDAO+) && "
+ "execution(org.apache.nifi.controller.Snippet updateSnippet(org.apache.nifi.web.api.dto.SnippetDTO)) && "
@@ -349,10 +339,10 @@ public class SnippetAuditor extends NiFiAuditor {
/**
* Audits bulk delete.
*
- * @param proceedingJoinPoint
- * @param snippetId
- * @param snippetDAO
- * @throws Throwable
+ * @param proceedingJoinPoint join point
+ * @param snippetId snippet id
+ * @param snippetDAO dao
+ * @throws Throwable ex
*/
@Around("within(org.apache.nifi.web.dao.SnippetDAO+) && "
+ "execution(void deleteSnippet(java.lang.String)) && "
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/IllegalClusterResourceRequestException.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/IllegalClusterResourceRequestException.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/IllegalClusterResourceRequestException.java
index 1336a14..fa65504 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/IllegalClusterResourceRequestException.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/IllegalClusterResourceRequestException.java
@@ -17,8 +17,7 @@
package org.apache.nifi.web;
/**
- * Exception indicating a clustering-related request was issued to a node when
- * it should have been issued to the cluster manager.
+ * Exception indicating a clustering-related request was issued to a node when it should have been issued to the cluster manager.
*/
@SuppressWarnings("serial")
public class IllegalClusterResourceRequestException extends RuntimeException {
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/StandardNiFiServiceFacade.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/StandardNiFiServiceFacade.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
index fbd4742..9436fb8 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
@@ -545,7 +545,8 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
}
@Override
- public ConfigurationSnapshot<RemoteProcessGroupPortDTO> updateRemoteProcessGroupInputPort(final Revision revision, final String groupId, final String remoteProcessGroupId, final RemoteProcessGroupPortDTO remoteProcessGroupPortDTO) {
+ public ConfigurationSnapshot<RemoteProcessGroupPortDTO> updateRemoteProcessGroupInputPort(
+ final Revision revision, final String groupId, final String remoteProcessGroupId, final RemoteProcessGroupPortDTO remoteProcessGroupPortDTO) {
return optimisticLockingManager.configureFlow(revision, new ConfigurationRequest<RemoteProcessGroupPortDTO>() {
@Override
public RemoteProcessGroupPortDTO execute() {
@@ -561,7 +562,8 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
}
@Override
- public ConfigurationSnapshot<RemoteProcessGroupPortDTO> updateRemoteProcessGroupOutputPort(final Revision revision, final String groupId, final String remoteProcessGroupId, final RemoteProcessGroupPortDTO remoteProcessGroupPortDTO) {
+ public ConfigurationSnapshot<RemoteProcessGroupPortDTO> updateRemoteProcessGroupOutputPort(
+ final Revision revision, final String groupId, final String remoteProcessGroupId, final RemoteProcessGroupPortDTO remoteProcessGroupPortDTO) {
return optimisticLockingManager.configureFlow(revision, new ConfigurationRequest<RemoteProcessGroupPortDTO>() {
@Override
public RemoteProcessGroupPortDTO execute() {
@@ -1237,7 +1239,11 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
}
@Override
- public ConfigurationSnapshot<Set<ControllerServiceReferencingComponentDTO>> updateControllerServiceReferencingComponents(final Revision revision, final String controllerServiceId, final org.apache.nifi.controller.ScheduledState scheduledState, final org.apache.nifi.controller.service.ControllerServiceState controllerServiceState) {
+ public ConfigurationSnapshot<Set<ControllerServiceReferencingComponentDTO>> updateControllerServiceReferencingComponents(
+ final Revision revision,
+ final String controllerServiceId,
+ final org.apache.nifi.controller.ScheduledState scheduledState,
+ final org.apache.nifi.controller.service.ControllerServiceState controllerServiceState) {
return optimisticLockingManager.configureFlow(revision, new ConfigurationRequest<Set<ControllerServiceReferencingComponentDTO>>() {
@Override
public Set<ControllerServiceReferencingComponentDTO> execute() {
@@ -1368,7 +1374,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
try {
userService.invalidateUserAccount(userId);
} catch (final AccountNotFoundException anfe) {
- // ignore
+ // ignore
}
}
@@ -1774,7 +1780,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
final List<Bulletin> results = bulletinRepository.findBulletins(queryBuilder.build());
// perform the query and generate the results - iterating in reverse order since we are
- // getting the most recent results by ordering by timestamp desc above. this gets the
+ // getting the most recent results by ordering by timestamp desc above. this gets the
// exact results we want but in reverse order
final List<BulletinDTO> bulletins = new ArrayList<>();
for (final ListIterator<Bulletin> bulletinIter = results.listIterator(results.size()); bulletinIter.hasPrevious();) {
@@ -1806,10 +1812,6 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
/**
* Ensures the specified user has permission to access the specified port.
- *
- * @param user
- * @param port
- * @return
*/
private boolean isUserAuthorized(final NiFiUser user, final RootGroupPort port) {
final boolean isSiteToSiteSecure = Boolean.TRUE.equals(properties.isSiteToSiteSecure());
@@ -1840,7 +1842,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
throw new WebApplicationException(new Throwable("Unable to access details for current user."));
}
- // at this point we know that the user must have ROLE_NIFI because it's required
+ // at this point we know that the user must have ROLE_NIFI because it's required
// get to the endpoint that calls this method but we'll check again anyways
final Set<Authority> authorities = user.getAuthorities();
if (!authorities.contains(Authority.ROLE_NIFI)) {
@@ -2976,10 +2978,6 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
/**
* Utility method to get the oldest of the two specified dates.
- *
- * @param date1
- * @param date2
- * @return
*/
private Date getOldestDate(final Date date1, final Date date2) {
if (date1 == null && date2 == null) {
@@ -3001,10 +2999,6 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
/**
* Utility method to get the newest of the two specified dates.
- *
- * @param date1
- * @param date2
- * @return
*/
private Date getNewestDate(final Date date1, final Date date2) {
if (date1 == null && date2 == null) {
@@ -3025,11 +3019,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
}
/**
- * Utility method for extracting component counts from the specified group
- * status.
- *
- * @param groupStatus
- * @return
+ * Utility method for extracting component counts from the specified group status.
*/
private ProcessGroupCounts extractProcessGroupCounts(ProcessGroupStatus groupStatus) {
int running = 0;
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/StandardNiFiWebConfigurationContext.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/StandardNiFiWebConfigurationContext.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java
index a1cfcd5..870ba56 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebConfigurationContext.java
@@ -68,8 +68,7 @@ import org.apache.nifi.web.api.entity.ReportingTaskEntity;
import org.apache.nifi.web.util.ClientResponseUtils;
/**
- * Implements the NiFiWebConfigurationContext interface to support a context in
- * both standalone and clustered environments.
+ * Implements the NiFiWebConfigurationContext interface to support a context in both standalone and clustered environments.
*/
public class StandardNiFiWebConfigurationContext implements NiFiWebConfigurationContext {
@@ -95,7 +94,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
public void saveActions(final NiFiWebRequestContext requestContext, final Collection<ConfigurationAction> configurationActions) {
Objects.requireNonNull(configurationActions, "Actions cannot be null.");
- // ensure the path could be
+ // ensure the path could be
if (requestContext.getExtensionType() == null) {
throw new IllegalArgumentException("The UI extension type must be specified.");
}
@@ -188,7 +187,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
throw new ResourceNotFoundException(String.format("Configuration request context config did not have a component ID."));
}
- // ensure the path could be
+ // ensure the path could be
if (requestContext.getExtensionType() == null) {
throw new IllegalArgumentException("The UI extension type must be specified.");
}
@@ -225,7 +224,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
throw new ResourceNotFoundException(String.format("Configuration request context did not have a component ID."));
}
- // ensure the path could be
+ // ensure the path could be
if (requestContext.getExtensionType() == null) {
throw new IllegalArgumentException("The UI extension type must be specified.");
}
@@ -259,17 +258,17 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
/**
* Gets the component details using the specified request context.
*
- * @param requestContext
- * @return
+ * @param requestContext context
+ * @return the component details using the specified request context
*/
ComponentDetails getComponentDetails(NiFiWebRequestContext requestContext);
/**
* Sets the annotation data using the specified request context.
*
- * @param requestContext
- * @param annotationData
- * @return
+ * @param requestContext context
+ * @param annotationData data
+ * @return details
*/
ComponentDetails setAnnotationData(NiFiWebConfigurationRequestContext requestContext, String annotationData);
}
@@ -392,8 +391,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
}
/**
- * Interprets the request/response with the underlying ControllerService
- * model.
+ * Interprets the request/response with the underlying ControllerService model.
*/
private class ControllerServiceFacade implements ComponentFacade {
@@ -528,8 +526,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
}
/**
- * Interprets the request/response with the underlying ControllerService
- * model.
+ * Interprets the request/response with the underlying ControllerService model.
*/
private class ReportingTaskFacade implements ComponentFacade {
@@ -664,11 +661,7 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
}
/**
- * Gets the headers for the request to replicate to each node while
- * clustered.
- *
- * @param config
- * @return
+ * Gets the headers for the request to replicate to each node while clustered.
*/
private Map<String, String> getHeaders(final NiFiWebRequestContext config) {
final Map<String, String> headers = new HashMap<>();
@@ -694,10 +687,6 @@ public class StandardNiFiWebConfigurationContext implements NiFiWebConfiguration
/**
* Checks the specified response and drains the stream appropriately.
- *
- * @param nodeResponse
- * @param revision
- * @param id
*/
private void checkResponse(final NodeResponse nodeResponse, final String id) {
if (nodeResponse.hasThrowable()) {
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/StandardNiFiWebContext.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/StandardNiFiWebContext.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebContext.java
index 07b982f..37ad804 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebContext.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiWebContext.java
@@ -63,8 +63,7 @@ import org.apache.nifi.controller.ControllerServiceLookup;
import org.apache.nifi.web.util.ClientResponseUtils;
/**
- * Implements the NiFiWebContext interface to support a context in both
- * standalone and clustered environments.
+ * Implements the NiFiWebContext interface to support a context in both standalone and clustered environments.
*/
@Deprecated
public class StandardNiFiWebContext implements NiFiWebContext {
@@ -285,10 +284,9 @@ public class StandardNiFiWebContext implements NiFiWebContext {
}
/**
- * Gets the headers for the request to replicate to each node while
- * clustered.
+ * Gets the headers for the request to replicate to each node while clustered.
*
- * @param config config
+ * @param config config
* @return headers
*/
private Map<String, String> getHeaders(final NiFiWebContextConfig config) {
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/api/ApplicationResource.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/api/ApplicationResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
index 66b237e..aa51925 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
@@ -90,8 +90,8 @@ public abstract class ApplicationResource {
/**
* Generate a resource uri based off of the specified parameters.
*
- * @param path
- * @return
+ * @param path path
+ * @return resource uri
*/
protected String generateResourceUri(String... path) {
UriBuilder uriBuilder = uriInfo.getBaseUriBuilder();
@@ -150,8 +150,8 @@ public abstract class ApplicationResource {
/**
* Edit the response headers to indicating no caching.
*
- * @param response
- * @return
+ * @param response response
+ * @return builder
*/
protected ResponseBuilder noCache(ResponseBuilder response) {
CacheControl cacheControl = new CacheControl();
@@ -162,12 +162,10 @@ public abstract class ApplicationResource {
}
/**
- * If the application is operating as a node, then this method adds the
- * cluster context information to the response using the response header
- * 'X-CLUSTER_CONTEXT'.
+ * If the application is operating as a node, then this method adds the cluster context information to the response using the response header 'X-CLUSTER_CONTEXT'.
*
- * @param response
- * @return
+ * @param response response
+ * @return builder
*/
protected ResponseBuilder clusterContext(ResponseBuilder response) {
@@ -208,7 +206,7 @@ public abstract class ApplicationResource {
Action batchAction = new Action();
batchAction.setOperation(Operation.Batch);
- // copy values from prototype action
+ // copy values from prototype action
batchAction.setTimestamp(prototypeAction.getTimestamp());
batchAction.setUserDn(prototypeAction.getUserDn());
batchAction.setUserName(prototypeAction.getUserName());
@@ -231,8 +229,7 @@ public abstract class ApplicationResource {
}
/**
- * @return the cluster context if found in the request header
- * 'X-CLUSTER_CONTEXT'.
+ * @return the cluster context if found in the request header 'X-CLUSTER_CONTEXT'.
*/
protected ClusterContext getClusterContextFromRequest() {
String clusterContextHeaderValue = httpServletRequest.getHeader(WebClusterManager.CLUSTER_CONTEXT_HTTP_HEADER);
@@ -253,7 +250,7 @@ public abstract class ApplicationResource {
/**
* Generates an Ok response with no content.
*
- * @return
+ * @return an Ok response with no content
*/
protected ResponseBuilder generateOkResponse() {
return noCache(Response.ok());
@@ -274,7 +271,7 @@ public abstract class ApplicationResource {
* Generates a 201 Created response with the specified content.
*
* @param uri The URI
- * @param jsonResponse The content
+ * @param entity entity
* @return The response to be built
*/
protected ResponseBuilder generateCreatedResponse(URI uri, Object entity) {
@@ -283,10 +280,9 @@ public abstract class ApplicationResource {
}
/**
- * Generates a 150 Node Continue response to be used within the cluster
- * request handshake.
+ * Generates a 150 Node Continue response to be used within the cluster request handshake.
*
- * @return
+ * @return a 150 Node Continue response to be used within the cluster request handshake
*/
protected ResponseBuilder generateContinueResponse() {
return Response.status(WebClusterManager.NODE_CONTINUE_STATUS_CODE);
@@ -341,8 +337,8 @@ public abstract class ApplicationResource {
protected Map<String, String> getHeaders(final Map<String, String> overriddenHeaders) {
- final Map<String, String> result = new HashMap<String, String>();
- final Map<String, String> overriddenHeadersIgnoreCaseMap = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
+ final Map<String, String> result = new HashMap<>();
+ final Map<String, String> overriddenHeadersIgnoreCaseMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
overriddenHeadersIgnoreCaseMap.putAll(overriddenHeaders);
final Enumeration<String> headerNames = httpServletRequest.getHeaderNames();
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/api/BulletinBoardResource.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/api/BulletinBoardResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java
index 32dafb9..7c59cea 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/BulletinBoardResource.java
@@ -49,11 +49,8 @@ public class BulletinBoardResource extends ApplicationResource {
/**
* Retrieves all the of templates in this NiFi.
*
- * @param clientId Optional client id. If the client id is not specified, a
- * new one will be generated. This value (whether specified or generated) is
- * included in the response.
- * @param after Supporting querying for bulletins after a particular
- * bulletin id.
+ * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response.
+ * @param after Supporting querying for bulletins after a particular bulletin id.
* @param limit The max number of bulletins to return.
* @param sourceName Source name filter. Supports a regular expression.
* @param message Message filter. Supports a regular expression.
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/api/ClusterResource.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/api/ClusterResource.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ClusterResource.java
index a99d7df..b080fc6 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ClusterResource.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ClusterResource.java
@@ -87,7 +87,7 @@ public class ClusterResource extends ApplicationResource {
/**
* Locates the ClusterConnection sub-resource.
*
- * @return
+ * @return node resource
*/
@Path("/nodes")
public NodeResource getNodeResource() {
@@ -261,7 +261,7 @@ public class ClusterResource extends ApplicationResource {
/**
* Updates the processors annotation data.
*
- * @param httpServletRequest
+ * @param httpServletRequest request
* @param version The revision is used to verify the client is working with the latest version of the flow.
* @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response.
* @param processorId The id of the processor.
@@ -314,7 +314,7 @@ public class ClusterResource extends ApplicationResource {
/**
* Updates the processors annotation data.
*
- * @param httpServletRequest
+ * @param httpServletRequest request
* @param processorId The id of the processor.
* @param processorEntity A processorEntity.
* @return A processorEntity.