NIFI-271 more cleanup
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/a53cc3d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/a53cc3d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/a53cc3d7 Branch: refs/heads/develop Commit: a53cc3d707c735a42f025c883065b848490ea4db Parents: 7f9dff5 Author: joewitt <[email protected]> Authored: Wed Apr 22 23:42:19 2015 -0400 Committer: joewitt <[email protected]> Committed: Wed Apr 22 23:42:19 2015 -0400 ---------------------------------------------------------------------- nifi-parent/pom.xml | 3 + .../org/apache/nifi/web/server/JettyServer.java | 127 ++--- .../apache/nifi/ui/extension/UiExtension.java | 8 +- .../nifi/ui/extension/UiExtensionMapping.java | 17 +- .../nifi/audit/ControllerServiceAuditor.java | 25 +- .../org/apache/nifi/audit/FunnelAuditor.java | 4 +- .../java/org/apache/nifi/audit/NiFiAuditor.java | 2 +- .../java/org/apache/nifi/audit/PortAuditor.java | 4 +- .../apache/nifi/audit/ProcessGroupAuditor.java | 2 +- .../org/apache/nifi/audit/ProcessorAuditor.java | 2 +- .../apache/nifi/audit/RelationshipAuditor.java | 2 +- .../nifi/audit/RemoteProcessGroupAuditor.java | 8 +- .../apache/nifi/audit/ReportingTaskAuditor.java | 3 +- .../org/apache/nifi/audit/SnippetAuditor.java | 2 +- .../org/apache/nifi/web/NiFiServiceFacade.java | 496 +++++++++---------- .../nifi/web/StandardNiFiContentAccess.java | 18 +- .../nifi/web/StandardNiFiServiceFacade.java | 119 +++-- .../StandardNiFiWebConfigurationContext.java | 104 ++-- .../apache/nifi/web/StandardNiFiWebContext.java | 4 +- .../nifi/web/api/ApplicationResource.java | 2 +- .../apache/nifi/web/api/ControllerResource.java | 8 +- .../nifi/web/api/ControllerServiceResource.java | 174 ++++--- .../org/apache/nifi/web/api/FunnelResource.java | 3 +- .../apache/nifi/web/api/HistoryResource.java | 6 +- .../apache/nifi/web/api/InputPortResource.java | 3 +- .../org/apache/nifi/web/api/LabelResource.java | 3 +- .../apache/nifi/web/api/OutputPortResource.java | 3 +- .../apache/nifi/web/api/ProcessorResource.java | 20 +- .../web/api/RemoteProcessGroupResource.java | 4 +- .../nifi/web/api/ReportingTaskResource.java | 131 ++--- .../apache/nifi/web/api/TemplateResource.java | 3 +- .../org/apache/nifi/web/api/dto/DtoFactory.java | 70 ++- .../ApplicationStartupContextListener.java | 17 +- .../nifi/web/controller/ControllerFacade.java | 47 +- .../org/apache/nifi/web/dao/ConnectionDAO.java | 37 +- .../nifi/web/dao/ControllerServiceDAO.java | 40 +- .../java/org/apache/nifi/web/dao/FunnelDAO.java | 25 +- .../java/org/apache/nifi/web/dao/LabelDAO.java | 21 +- .../java/org/apache/nifi/web/dao/PortDAO.java | 29 +- .../org/apache/nifi/web/dao/ProcessorDAO.java | 33 +- .../nifi/web/dao/RemoteProcessGroupDAO.java | 51 +- .../apache/nifi/web/dao/ReportingTaskDAO.java | 2 +- .../org/apache/nifi/web/dao/SnippetDAO.java | 25 +- .../org/apache/nifi/web/dao/TemplateDAO.java | 2 +- .../dao/impl/StandardControllerServiceDAO.java | 49 +- .../nifi/web/dao/impl/StandardProcessorDAO.java | 2 +- .../dao/impl/StandardRemoteProcessGroupDAO.java | 1 - .../web/dao/impl/StandardReportingTaskDAO.java | 4 +- .../nifi/web/dao/impl/StandardSnippetDAO.java | 8 +- .../ReportingTaskProviderFactoryBean.java | 1 - .../org/apache/nifi/web/util/Availability.java | 1 - .../org/apache/nifi/web/util/SnippetUtils.java | 137 +++-- .../nifi/integration/util/NiFiTestServer.java | 58 +-- .../nifi/web/ContentViewerController.java | 55 +- .../distributed/cache/client/Deserializer.java | 8 +- .../cache/client/DistributedMapCacheClient.java | 64 +-- .../cache/client/DistributedSetCacheClient.java | 27 +- .../distributed/cache/client/Serializer.java | 9 +- 58 files changed, 1015 insertions(+), 1118 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/nifi-parent/pom.xml ---------------------------------------------------------------------- diff --git a/nifi-parent/pom.xml b/nifi-parent/pom.xml index 3cb90d1..2e888c5 100644 --- a/nifi-parent/pom.xml +++ b/nifi-parent/pom.xml @@ -372,6 +372,9 @@ <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> <build> <plugins> <plugin> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java index 1134c77..99c11a8 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java @@ -102,11 +102,11 @@ public class JettyServer implements NiFiServer { private final Server server; private final NiFiProperties props; - + private ExtensionMapping extensionMapping; private WebAppContext webApiContext; private WebAppContext webDocsContext; - + // content viewer and mime type specific extensions private WebAppContext webContentViewerContext; private Collection<WebAppContext> contentViewerWebContexts; @@ -114,10 +114,10 @@ public class JettyServer implements NiFiServer { // component (processor, controller service, reporting task) ui extensions private UiExtensionMapping componentUiExtensions; private Collection<WebAppContext> componentUiExtensionWebContexts; - + @Deprecated private Collection<WebAppContext> customUiWebContexts; - + /** * Creates and configures a new Jetty instance. * @@ -138,11 +138,6 @@ public class JettyServer implements NiFiServer { loadWars(locateNarWorkingDirectories()); } - /** - * Locates the working directory for each NAR. - * - * @return - */ private Set<File> locateNarWorkingDirectories() { final File frameworkWorkingDir = props.getFrameworkWorkingDirectory(); final File extensionsWorkingDir = props.getExtensionsWorkingDirectory(); @@ -168,7 +163,7 @@ public class JettyServer implements NiFiServer { * Loads the WARs in the specified NAR working directories. A WAR file must * have a ".war" extension. * - * @param warDir a directory containing WARs to load + * @param narWorkingDirectories dirs */ private void loadWars(final Set<File> narWorkingDirectories) { @@ -219,14 +214,14 @@ public class JettyServer implements NiFiServer { @Deprecated final Map<String, String> customUiMappings = new HashMap<>(); - + // deploy the other wars if (CollectionUtils.isNotEmpty(otherWars)) { // hold onto to the web contexts for all ui extensions customUiWebContexts = new ArrayList<>(); componentUiExtensionWebContexts = new ArrayList<>(); contentViewerWebContexts = new ArrayList<>(); - + // ui extension organized by component type final Map<String, List<UiExtension>> componentUiExtensionsByType = new HashMap<>(); for (File war : otherWars) { @@ -237,7 +232,7 @@ public class JettyServer implements NiFiServer { // identify all known extension types in the war final Map<UiExtensionType, List<String>> uiExtensionInWar = new HashMap<>(); identifyUiExtensionsForComponents(uiExtensionInWar, war); - + // only include wars that are for custom processor ui's if (!customUiProcessorTypes.isEmpty() || !uiExtensionInWar.isEmpty()) { // get the context path @@ -258,7 +253,7 @@ public class JettyServer implements NiFiServer { // also store it by type so we can populate the appropriate initialization parameters if (!customUiProcessorTypes.isEmpty()) { customUiWebContexts.add(extensionUiContext); - + // @Deprecated - supported custom uis as init params to the web api for (String customUiProcessorType : customUiProcessorTypes) { // map the processor type to the custom ui path @@ -307,9 +302,9 @@ public class JettyServer implements NiFiServer { // include custom ui web context in the handlers handlers.addHandler(extensionUiContext); } - + } - + // record all ui extensions to give to the web api componentUiExtensions = new UiExtensionMapping(componentUiExtensionsByType); } else { @@ -328,7 +323,7 @@ public class JettyServer implements NiFiServer { webContentViewerContext = loadWar(webContentViewerWar, "/nifi-content-viewer", frameworkClassLoader); webContentViewerContext.getInitParams().putAll(mimeMappings); handlers.addHandler(webContentViewerContext); - + // create a web app for the docs final String docsContextPath = "/nifi-docs"; @@ -348,12 +343,6 @@ public class JettyServer implements NiFiServer { server.setHandler(handlers); } - /** - * Finds WAR files in the specified NAR working directories. - * - * @param narWorkingDirectories - * @return - */ private Map<File, File> findWars(final Set<File> narWorkingDirectories) { final Map<File, File> wars = new HashMap<>(); @@ -381,7 +370,7 @@ public class JettyServer implements NiFiServer { if (jarEntry == null) { return; } - + // get an input stream for the nifi-processor configuration file BufferedReader in = new BufferedReader(new InputStreamReader(jarFile.getInputStream(jarEntry))); @@ -392,24 +381,24 @@ public class JettyServer implements NiFiServer { final String componentType = extractComponentType(rawComponentType); if (componentType != null) { List<String> extensions = uiExtensions.get(uiExtensionType); - + // if there are currently no extensions for this type create it if (extensions == null) { extensions = new ArrayList<>(); uiExtensions.put(uiExtensionType, extensions); } - + // add the specified type extensions.add(componentType); } } } - + /** * Identifies all known UI extensions and stores them in the specified map. - * - * @param uiExtensions - * @param warFile + * + * @param uiExtensions extensions + * @param warFile war */ private void identifyUiExtensionsForComponents(final Map<UiExtensionType, List<String>> uiExtensions, final File warFile) { try (final JarFile jarFile = new JarFile(warFile)) { @@ -422,12 +411,13 @@ public class JettyServer implements NiFiServer { logger.warn(String.format("Unable to inspect %s for a UI extensions.", warFile)); } } - + /** - * Extracts the component type. Trims the line and considers comments. Returns null if no type was found. - * - * @param line - * @return + * Extracts the component type. Trims the line and considers comments. + * Returns null if no type was found. + * + * @param line line + * @return type */ private String extractComponentType(final String line) { final String trimmedLine = line.trim(); @@ -437,12 +427,13 @@ public class JettyServer implements NiFiServer { } return null; } - + /** * Returns the extension in the specified WAR using the specified path. * - * @param war - * @return + * @param war war + * @param path path + * @return extensions */ private List<String> getWarExtensions(final File war, final String path) { List<String> processorTypes = new ArrayList<>(); @@ -529,10 +520,10 @@ public class JettyServer implements NiFiServer { final ResourceHandler resourceHandler = new ResourceHandler(); resourceHandler.setDirectoriesListed(false); - // load the docs directory + // load the docs directory final File docsDir = Paths.get("docs").toRealPath().toFile(); final Resource docsResource = Resource.newResource(docsDir); - + // load the component documentation working directory final String componentDocsDirPath = props.getProperty(NiFiProperties.COMPONENT_DOCS_DIRECTORY, "work/docs/components"); final File workingDocsDirectory = Paths.get(componentDocsDirPath).toRealPath().getParent().toFile(); @@ -547,7 +538,7 @@ public class JettyServer implements NiFiServer { } } final Resource webApiDocsResource = Resource.newResource(webApiDocsDir); - + // create resources for both docs locations final ResourceCollection resources = new ResourceCollection(docsResource, workingDocsResource, webApiDocsResource); resourceHandler.setBaseResource(resources); @@ -660,9 +651,6 @@ public class JettyServer implements NiFiServer { return contextFactory; } - /** - * Starts the web server. - */ @Override public void start() { try { @@ -682,21 +670,21 @@ public class JettyServer implements NiFiServer { } } } - - // ensure the appropriate wars deployed successfully before injecting the NiFi context and security filters - + + // ensure the appropriate wars deployed successfully before injecting the NiFi context and security filters // this must be done after starting the server (and ensuring there were no start up failures) if (webApiContext != null) { // give the web api the component ui extensions final ServletContext webApiServletContext = webApiContext.getServletHandler().getServletContext(); webApiServletContext.setAttribute("nifi-ui-extensions", componentUiExtensions); - + // get the application context final WebApplicationContext webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(webApiServletContext); // @Deprecated if (CollectionUtils.isNotEmpty(customUiWebContexts)) { final NiFiWebContext niFiWebContext = webApplicationContext.getBean("nifiWebContext", NiFiWebContext.class); - + for (final WebAppContext customUiContext : customUiWebContexts) { // set the NiFi context in each custom ui servlet context final ServletContext customUiServletContext = customUiContext.getServletHandler().getServletContext(); @@ -709,7 +697,7 @@ public class JettyServer implements NiFiServer { } } } - + // component ui extensions if (CollectionUtils.isNotEmpty(componentUiExtensionWebContexts)) { final NiFiWebConfigurationContext configurationContext = webApplicationContext.getBean("nifiWebConfigurationContext", NiFiWebConfigurationContext.class); @@ -726,7 +714,7 @@ public class JettyServer implements NiFiServer { } } } - + // content viewer extensions if (CollectionUtils.isNotEmpty(contentViewerWebContexts)) { for (final WebAppContext contentViewerContext : contentViewerWebContexts) { @@ -737,35 +725,35 @@ public class JettyServer implements NiFiServer { } } } - + // content viewer controller if (webContentViewerContext != null) { final ContentAccess contentAccess = webApplicationContext.getBean("contentAccess", ContentAccess.class); - + // add the content access final ServletContext webContentViewerServletContext = webContentViewerContext.getServletHandler().getServletContext(); webContentViewerServletContext.setAttribute("nifi-content-access", contentAccess); - + final FilterHolder securityFilter = webApiContext.getServletHandler().getFilter("springSecurityFilterChain"); if (securityFilter != null) { webContentViewerContext.addFilter(securityFilter, "/*", EnumSet.allOf(DispatcherType.class)); } } } - + // ensure the web document war was loaded and provide the extension mapping if (webDocsContext != null) { final ServletContext webDocsServletContext = webDocsContext.getServletHandler().getServletContext(); webDocsServletContext.setAttribute("nifi-extension-mapping", extensionMapping); } - - // if this nifi is a node in a cluster, start the flow service and load the flow - the - // flow service is loaded here for clustered nodes because the loading of the flow will - // initialize the connection between the node and the NCM. if the node connects (starts - // heartbeating, etc), the NCM may issue web requests before the application (wars) have - // finished loading. this results in the node being disconnected since its unable to - // successfully respond to the requests. to resolve this, flow loading was moved to here - // (after the wars have been successfully deployed) when this nifi instance is a node + + // if this nifi is a node in a cluster, start the flow service and load the flow - the + // flow service is loaded here for clustered nodes because the loading of the flow will + // initialize the connection between the node and the NCM. if the node connects (starts + // heartbeating, etc), the NCM may issue web requests before the application (wars) have + // finished loading. this results in the node being disconnected since its unable to + // successfully respond to the requests. to resolve this, flow loading was moved to here + // (after the wars have been successfully deployed) when this nifi instance is a node // in a cluster if (props.isNode()) { @@ -799,11 +787,6 @@ public class JettyServer implements NiFiServer { } } - /** - * Dump each applicable url. - * - * @throws SocketException - */ private void dumpUrls() throws SocketException { final List<String> urls = new ArrayList<>(); @@ -853,11 +836,6 @@ public class JettyServer implements NiFiServer { } } - /** - * Handles when a start up failure occurs. - * - * @param t - */ private void startUpFailure(Throwable t) { System.err.println("Failed to start web server: " + t.getMessage()); System.err.println("Shutting down..."); @@ -870,9 +848,6 @@ public class JettyServer implements NiFiServer { this.extensionMapping = extensionMapping; } - /** - * Stops the web server. - */ @Override public void stop() { try { @@ -881,4 +856,4 @@ public class JettyServer implements NiFiServer { logger.warn("Failed to stop web server", ex); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtension.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtension.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtension.java index e5b9b3e..da921b4 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtension.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtension.java @@ -32,18 +32,14 @@ public class UiExtension { } /** - * The type of this UI extension. - * - * @return + * @return type of this UI extension */ public UiExtensionType getExtensionType() { return extensionType; } /** - * The context path of this UI extenion. - * - * @return + * @return The context path of this UI extension */ public String getContextPath() { return contextPath; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtensionMapping.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtensionMapping.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtensionMapping.java index 16bffd0..73e39f8 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtensionMapping.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension/src/main/java/org/apache/nifi/ui/extension/UiExtensionMapping.java @@ -31,22 +31,21 @@ public class UiExtensionMapping { } /** - * Returns whether there are any UI extensions for the specified component type. - * - * @param type - * @return + * @param type type + * @return whether there are any UI extensions for the specified component + * type */ public boolean hasUiExtension(final String type) { return uiExtensions.containsKey(type); } - + /** - * Gets the listing of all discovered UI extensions for the specified component type. - * @param type - * @return + * @param type type + * @return the listing of all discovered UI extensions for the specified + * component type */ public List<UiExtension> getUiExtension(final String type) { return uiExtensions.get(type); } - + } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 ea3af14..a044b46 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 @@ -230,35 +230,35 @@ public class ControllerServiceAuditor extends NiFiAuditor { public Object updateControllerServiceReferenceAdvice(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { // update the controller service references final ControllerServiceReference controllerServiceReference = (ControllerServiceReference) proceedingJoinPoint.proceed(); - + // get the current user final NiFiUser user = NiFiUserUtils.getNiFiUser(); - + if (user != null) { final Collection<Action> actions = new ArrayList<>(); final Collection<String> visitedServices = new ArrayList<>(); visitedServices.add(controllerServiceReference.getReferencedComponent().getIdentifier()); - + // get all applicable actions getUpdateActionsForReferencingComponents(user, actions, visitedServices, controllerServiceReference.getReferencingComponents()); - + // ensure there are actions to record if (!actions.isEmpty()) { // save the actions saveActions(actions, logger); } } - + return controllerServiceReference; } - + /** * Gets the update actions for all specified referencing components. - * + * * @param user * @param actions * @param visitedServices - * @param referencingComponents + * @param referencingComponents */ private void getUpdateActionsForReferencingComponents(final NiFiUser user, final Collection<Action> actions, final Collection<String> visitedServices, final Set<ConfiguredComponent> referencingComponents) { // consider each component updates @@ -325,7 +325,7 @@ public class ControllerServiceAuditor extends NiFiAuditor { } } } - + /** * Audits the removal of a controller service via deleteControllerService(). * @@ -464,10 +464,11 @@ 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 + * @return */ 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/a53cc3d7/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 b079da8..e96604c 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 @@ -99,7 +99,7 @@ public class FunnelAuditor extends NiFiAuditor { * * @param funnel * @param operation - * @return + * @return */ public Action generateAuditRecord(Funnel funnel, Operation operation) { return generateAuditRecord(funnel, operation, null); @@ -111,7 +111,7 @@ public class FunnelAuditor extends NiFiAuditor { * @param funnel * @param operation * @param actionDetails - * @return + * @return */ public Action generateAuditRecord(Funnel funnel, Operation operation, ActionDetails actionDetails) { Action action = null; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 adff9d1..e61a4a6 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 @@ -58,7 +58,7 @@ public abstract class NiFiAuditor { */ protected void saveActions(Collection<Action> actions, Logger logger) { ClusterContext ctx = ClusterContextThreadLocal.getContext(); - + // if we're a connected node, then put audit actions on threadlocal to propagate back to manager if (ctx != null) { ctx.getActions().addAll(actions); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 af4b5bd..479842c 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 @@ -295,7 +295,7 @@ public class PortAuditor extends NiFiAuditor { * * @param port * @param operation - * @return + * @return */ public Action generateAuditRecord(Port port, Operation operation) { return generateAuditRecord(port, operation, null); @@ -307,7 +307,7 @@ public class PortAuditor extends NiFiAuditor { * @param port * @param operation * @param actionDetails - * @return + * @return */ public Action generateAuditRecord(Port port, Operation operation, ActionDetails actionDetails) { Action action = null; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 4391881..7acf4e2 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 @@ -55,7 +55,7 @@ public class ProcessGroupAuditor extends NiFiAuditor { * alleviate this issue. * * @param proceedingJoinPoint - * @return + * @return * @throws java.lang.Throwable */ @Around("within(org.apache.nifi.web.dao.ProcessGroupDAO+) && " http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 ff377a3..0a9f857 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 @@ -79,7 +79,7 @@ public class ProcessorAuditor extends NiFiAuditor { * alleviate this issue. * * @param proceedingJoinPoint - * @return + * @return * @throws java.lang.Throwable */ @Around("within(org.apache.nifi.web.dao.ProcessorDAO+) && " http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 ba78141..b651904 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 @@ -77,7 +77,7 @@ public class RelationshipAuditor extends NiFiAuditor { * alleviate this issue. * * @param proceedingJoinPoint - * @return + * @return * @throws java.lang.Throwable */ @Around("within(org.apache.nifi.web.dao.ConnectionDAO+) && " http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 d0836d4..ba9e629 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 @@ -61,8 +61,8 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor { * alleviate this issue. * * @param proceedingJoinPoint - * @return - * @throws java.lang.Throwable + * @return + * @throws java.lang.Throwable */ @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))") @@ -331,7 +331,7 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor { * * @param remoteProcessGroup * @param operation - * @return + * @return */ public Action generateAuditRecord(RemoteProcessGroup remoteProcessGroup, Operation operation) { return generateAuditRecord(remoteProcessGroup, operation, null); @@ -343,7 +343,7 @@ public class RemoteProcessGroupAuditor extends NiFiAuditor { * @param remoteProcessGroup * @param operation * @param actionDetails - * @return + * @return */ public Action generateAuditRecord(RemoteProcessGroup remoteProcessGroup, Operation operation, ActionDetails actionDetails) { Action action = null; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 ba2cdfb..38aaf1f 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 @@ -297,7 +297,8 @@ 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 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/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 1f8942b..38769bb 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 @@ -258,7 +258,7 @@ public class SnippetAuditor extends NiFiAuditor { * @param proceedingJoinPoint * @param snippetDTO * @param snippetDAO - * @return + * @return * @throws Throwable */ @Around("within(org.apache.nifi.web.dao.SnippetDAO+) && " http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.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/NiFiServiceFacade.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java index 8d9dade..6cf22c0 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java @@ -85,87 +85,87 @@ public interface NiFiServiceFacade { /** * Searches the controller for the specified query string. * - * @param query - * @return + * @param query query + * @return results */ SearchResultsDTO searchController(String query); /** * Submits a provenance request. * - * @param query - * @return + * @param query query + * @return results */ ProvenanceDTO submitProvenance(ProvenanceDTO query); /** * Submits a new replay request. * - * @param eventId - * @return + * @param eventId id + * @return event */ ProvenanceEventDTO submitReplay(Long eventId); /** * Gets the content for the specified claim. * - * @param eventId - * @param uri - * @param contentDirection - * @return + * @param eventId id + * @param uri uri + * @param contentDirection direction + * @return content */ DownloadableContent getContent(Long eventId, String uri, ContentDirection contentDirection); /** * Retrieves provenance. * - * @param queryId - * @return + * @param queryId identifier + * @return result */ ProvenanceDTO getProvenance(String queryId); /** * Deletes provenance. * - * @param queryId + * @param queryId identifier */ void deleteProvenance(String queryId); /** * Returns the available options for searching provenance. * - * @return + * @return options */ ProvenanceOptionsDTO getProvenanceSearchOptions(); /** * Submits a lineage request. * - * @param lineage - * @return + * @param lineage lineage + * @return lineage */ LineageDTO submitLineage(LineageDTO lineage); /** * Gets the lineage with the specified id. * - * @param lineageId - * @return + * @param lineageId id + * @return lineage */ LineageDTO getLineage(String lineageId); /** * Deletes the lineage with the specified id. * - * @param lineageId + * @param lineageId lineage */ void deleteLineage(String lineageId); /** * Gets the provenance event with the specified id. * - * @param id - * @return + * @param id id + * @return event */ ProvenanceEventDTO getProvenanceEvent(Long id); @@ -189,7 +189,7 @@ public interface NiFiServiceFacade { * Creates a new archive of the flow configuration. * * @param revision Revision to compare with current base revision - * @return + * @return snapshot */ ConfigurationSnapshot<Void> createArchive(Revision revision); @@ -200,14 +200,14 @@ public interface NiFiServiceFacade { * @param processorId the id of the processor to update * @param annotationData the annotation data * - * @return + * @return snapshot */ ConfigurationSnapshot<ProcessorDTO> setProcessorAnnotationData(Revision revision, String processorId, String annotationData); /** * Returns the process group status. * - * @param groupId + * @param groupId group * @return The process group status */ ProcessGroupStatusDTO getProcessGroupStatus(String groupId); @@ -215,23 +215,23 @@ public interface NiFiServiceFacade { /** * Gets the process group status history. * - * @param groupId - * @return + * @param groupId id + * @return history */ StatusHistoryDTO getProcessGroupStatusHistory(String groupId); /** * Returns the controller status. * - * @return + * @return status */ ControllerStatusDTO getControllerStatus(); /** * Updates the specified counter by setting its value to 0. * - * @param counterId - * @return + * @param counterId id + * @return counter */ CounterDTO updateCounter(String counterId); @@ -248,22 +248,22 @@ public interface NiFiServiceFacade { * @return The list of available processor types */ Set<DocumentedTypeDTO> getProcessorTypes(); - + /** * Returns the list of controller service types. - * + * * @param serviceType Filters only service types that implement this type * @return The list of available controller types */ Set<DocumentedTypeDTO> getControllerServiceTypes(String serviceType); - + /** * Returns the list of reporting task types. - * + * * @return The list of available reporting task types */ Set<DocumentedTypeDTO> getReportingTaskTypes(); - + /** * Returns the list of prioritizer types. * @@ -274,7 +274,7 @@ public interface NiFiServiceFacade { /** * Returns the current revision. * - * @return + * @return revision */ RevisionDTO getRevision(); @@ -284,10 +284,10 @@ public interface NiFiServiceFacade { /** * Creates a new Template based off the specified snippet. * - * @param name - * @param description - * @param snippetId - * @return + * @param name name + * @param description description + * @param snippetId id + * @return template */ TemplateDTO createTemplate(String name, String description, String snippetId); @@ -302,35 +302,35 @@ public interface NiFiServiceFacade { /** * Instantiate the corresponding template. * - * @param revision - * @param groupId - * @param templateId - * @param originX - * @param originY - * @return + * @param revision revision + * @param groupId group id + * @param templateId template id + * @param originX x + * @param originY y + * @return snapshot */ ConfigurationSnapshot<FlowSnippetDTO> createTemplateInstance(Revision revision, String groupId, Double originX, Double originY, String templateId); /** * Gets the template with the specified id. * - * @param id - * @return + * @param id id + * @return template */ TemplateDTO getTemplate(String id); /** * Gets the template, includes contents, with the specified id. * - * @param id - * @return + * @param id id + * @return template */ TemplateDTO exportTemplate(String id); /** * Gets all templates. * - * @return + * @return templates */ Set<TemplateDTO> getTemplates(); @@ -374,26 +374,26 @@ public interface NiFiServiceFacade { /** * Gets the processor status history. * - * @param groupId - * @param id - * @return + * @param groupId group + * @param id id + * @return history */ StatusHistoryDTO getProcessorStatusHistory(String groupId, String id); /** * Get the descriptor for the specified property of the specified processor. - * - * @param groupId - * @param id - * @param property - * @return + * + * @param groupId group + * @param id id + * @param property property + * @return descriptor */ PropertyDescriptorDTO getProcessorPropertyDescriptor(String groupId, String id, String property); - + /** * Gets all the Processor transfer objects for this controller. * - * @param groupId + * @param groupId group * @return List of all the Processor transfer object */ Set<ProcessorDTO> getProcessors(String groupId); @@ -401,15 +401,15 @@ public interface NiFiServiceFacade { /** * Verifies the specified processor can be updated. * - * @param processorDTO + * @param processorDTO processor */ void verifyUpdateProcessor(ProcessorDTO processorDTO); /** * Verifies the specified processor can be updated. * - * @param groupId - * @param processorDTO + * @param groupId group + * @param processorDTO processor */ void verifyUpdateProcessor(String groupId, ProcessorDTO processorDTO); @@ -417,7 +417,7 @@ public interface NiFiServiceFacade { * Updates the specified Processor. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param processorDTO The processorDTO * @return The updated processor */ @@ -426,8 +426,8 @@ public interface NiFiServiceFacade { /** * Verifies the specified processor can be removed. * - * @param groupId - * @param processorId + * @param groupId group + * @param processorId processor */ void verifyDeleteProcessor(String groupId, String processorId); @@ -435,9 +435,9 @@ public interface NiFiServiceFacade { * Deletes the specified processor. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param processorId The processor id to delete - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteProcessor(Revision revision, String groupId, String processorId); @@ -447,7 +447,7 @@ public interface NiFiServiceFacade { /** * Gets the Connection transfer objects for the specified source processor. * - * @param groupId + * @param groupId group * @return The Connection transfer objects */ Set<ConnectionDTO> getConnections(String groupId); @@ -455,7 +455,7 @@ public interface NiFiServiceFacade { /** * Gets the specified Connection transfer object. * - * @param groupId + * @param groupId group * @param connectionId The ID of the connection * @return The Connection transfer object */ @@ -464,9 +464,9 @@ public interface NiFiServiceFacade { /** * Gets the status history of the specified connection. * - * @param groupId - * @param connectionId - * @return + * @param groupId group + * @param connectionId connection + * @return history */ StatusHistoryDTO getConnectionStatusHistory(String groupId, String connectionId); @@ -474,7 +474,7 @@ public interface NiFiServiceFacade { * Creates a new Relationship target. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param connectionDTO The Connection DTO * @return The Connection DTO */ @@ -483,16 +483,16 @@ public interface NiFiServiceFacade { /** * Determines if this connection can be created. * - * @param groupId - * @param connectionDTO + * @param groupId group + * @param connectionDTO connection */ void verifyCreateConnection(String groupId, ConnectionDTO connectionDTO); /** * Determines if this connection can be updated. * - * @param groupId - * @param connectionDTO + * @param groupId group + * @param connectionDTO connection */ void verifyUpdateConnection(String groupId, ConnectionDTO connectionDTO); @@ -500,7 +500,7 @@ public interface NiFiServiceFacade { * Updates the specified Relationship target. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param connectionDTO The Connection DTO * @return The Connection DTO */ @@ -509,8 +509,8 @@ public interface NiFiServiceFacade { /** * Determines if this connection can be removed. * - * @param groupId - * @param connectionId + * @param groupId group + * @param connectionId connection */ void verifyDeleteConnection(String groupId, String connectionId); @@ -518,9 +518,9 @@ public interface NiFiServiceFacade { * Deletes the specified relationship target. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param connectionId The ID of the connection - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteConnection(Revision revision, String groupId, String connectionId); @@ -533,7 +533,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the group this port should be create in * @param inputPortDTO The input PortDTO - * @return + * @return snapshot */ ConfigurationSnapshot<PortDTO> createInputPort(Revision revision, String groupId, PortDTO inputPortDTO); @@ -542,7 +542,7 @@ public interface NiFiServiceFacade { * * @param groupId The id of the group this port is in * @param inputPortId The input port id - * @return + * @return port */ PortDTO getInputPort(String groupId, String inputPortId); @@ -550,7 +550,7 @@ public interface NiFiServiceFacade { * Gets all input ports in a given group. * * @param groupId The id of the group - * @return + * @return port */ Set<PortDTO> getInputPorts(String groupId); @@ -568,7 +568,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the group * @param inputPortDTO The input PortDTO - * @return + * @return snapshort */ ConfigurationSnapshot<PortDTO> updateInputPort(Revision revision, String groupId, PortDTO inputPortDTO); @@ -586,7 +586,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the group * @param inputPortId The id of the input port - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteInputPort(Revision revision, String groupId, String inputPortId); @@ -599,7 +599,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the group this port should be create in * @param outputPortDTO The output PortDTO - * @return + * @return snapshot */ ConfigurationSnapshot<PortDTO> createOutputPort(Revision revision, String groupId, PortDTO outputPortDTO); @@ -608,7 +608,7 @@ public interface NiFiServiceFacade { * * @param groupId The id of the group this port is in * @param outputPortId The output port id - * @return + * @return port */ PortDTO getOutputPort(String groupId, String outputPortId); @@ -616,7 +616,7 @@ public interface NiFiServiceFacade { * Gets all output ports in a given group. * * @param groupId The id of the group - * @return + * @return ports */ Set<PortDTO> getOutputPorts(String groupId); @@ -634,7 +634,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the group * @param outputPortDTO The output PortDTO - * @return + * @return snapshot */ ConfigurationSnapshot<PortDTO> updateOutputPort(Revision revision, String groupId, PortDTO outputPortDTO); @@ -649,10 +649,10 @@ public interface NiFiServiceFacade { /** * Determines if the output port could be deleted. * - * @param revision + * @param revision revision * @param groupId The id of the group * @param outputPortId The id of the output port - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteOutputPort(Revision revision, String groupId, String outputPortId); @@ -665,15 +665,15 @@ public interface NiFiServiceFacade { * @param parentGroupId The id of the parent group * @param revision Revision to compare with current base revision * @param processGroupDTO The ProcessGroupDTO - * @return + * @return snapshot */ ConfigurationSnapshot<ProcessGroupDTO> createProcessGroup(String parentGroupId, Revision revision, ProcessGroupDTO processGroupDTO); /** * Returns the process group. * - * @param groupId - * @param recurse + * @param groupId group + * @param recurse recurse * @return ProcessGroup transfer object */ ConfigurationSnapshot<ProcessGroupDTO> getProcessGroup(String groupId, boolean recurse); @@ -682,7 +682,7 @@ public interface NiFiServiceFacade { * Gets all process groups in the specified parent group. * * @param parentGroupId The id of the parent group - * @return + * @return process group */ Set<ProcessGroupDTO> getProcessGroups(String parentGroupId); @@ -699,7 +699,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param parentGroupId The id of the parent group * @param processGroupDTO The ProcessGroupDTO - * @return + * @return snapshot */ ConfigurationSnapshot<ProcessGroupDTO> updateProcessGroup(Revision revision, String parentGroupId, ProcessGroupDTO processGroupDTO); @@ -715,14 +715,14 @@ public interface NiFiServiceFacade { * * @param revision Revision to compare with current base revision * @param groupId The id of the process group - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteProcessGroup(Revision revision, String groupId); /** * The instance id of this NiFi. * - * @return + * @return identifier */ String getInstanceId(); @@ -735,7 +735,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the parent group * @param remoteProcessGroupDTO The RemoteProcessGroupDTO - * @return + * @return snapshot */ ConfigurationSnapshot<RemoteProcessGroupDTO> createRemoteProcessGroup(Revision revision, String groupId, RemoteProcessGroupDTO remoteProcessGroupDTO); @@ -744,7 +744,7 @@ public interface NiFiServiceFacade { * * @param groupId The id of the parent group * @param remoteProcessGroupId The id of the remote process group - * @return + * @return group */ RemoteProcessGroupDTO getRemoteProcessGroup(String groupId, String remoteProcessGroupId); @@ -752,7 +752,7 @@ public interface NiFiServiceFacade { * Gets all remote process groups in the a given parent group. * * @param groupId The id of the parent group - * @return + * @return group */ Set<RemoteProcessGroupDTO> getRemoteProcessGroups(String groupId); @@ -761,7 +761,7 @@ public interface NiFiServiceFacade { * * @param groupId The id of the parent group * @param id The id of the remote process group - * @return + * @return history */ StatusHistoryDTO getRemoteProcessGroupStatusHistory(String groupId, String id); @@ -799,7 +799,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the parent group * @param remoteProcessGroupDTO The RemoteProcessGroupDTO - * @return + * @return snapshot */ ConfigurationSnapshot<RemoteProcessGroupDTO> updateRemoteProcessGroup(Revision revision, String groupId, RemoteProcessGroupDTO remoteProcessGroupDTO); @@ -811,7 +811,7 @@ public interface NiFiServiceFacade { * @param groupId The id of the parent group * @param remoteProcessGroupId The id of the remote process group * @param remoteProcessGroupPortDTO The RemoteProcessGroupPortDTO - * @return + * @return snapshot */ ConfigurationSnapshot<RemoteProcessGroupPortDTO> updateRemoteProcessGroupInputPort(Revision revision, String groupId, String remoteProcessGroupId, RemoteProcessGroupPortDTO remoteProcessGroupPortDTO); @@ -823,7 +823,7 @@ public interface NiFiServiceFacade { * @param groupId The id of the parent group * @param remoteProcessGroupId The id of the remote process group * @param remoteProcessGroupPortDTO The RemoteProcessGroupPortDTO - * @return + * @return snapshot */ ConfigurationSnapshot<RemoteProcessGroupPortDTO> updateRemoteProcessGroupOutputPort(Revision revision, String groupId, String remoteProcessGroupId, RemoteProcessGroupPortDTO remoteProcessGroupPortDTO); @@ -842,7 +842,7 @@ public interface NiFiServiceFacade { * @param revision Revision to compare with current base revision * @param groupId The id of the parent group * @param remoteProcessGroupId The id of the remote process group - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteRemoteProcessGroup(Revision revision, String groupId, String remoteProcessGroupId); @@ -853,8 +853,8 @@ public interface NiFiServiceFacade { * Creates a funnel. * * @param revision Revision to compare with current base revision - * @param groupId - * @param funnelDTO + * @param groupId group + * @param funnelDTO funnel * @return The funnel DTO */ ConfigurationSnapshot<FunnelDTO> createFunnel(Revision revision, String groupId, FunnelDTO funnelDTO); @@ -862,7 +862,7 @@ public interface NiFiServiceFacade { /** * Gets the specified funnel. * - * @param groupId + * @param groupId group * @param funnelId The funnel id * @return The funnel transfer object */ @@ -871,7 +871,7 @@ public interface NiFiServiceFacade { /** * Gets all of the funnels. * - * @param groupId + * @param groupId group * @return The funnel transfer objects */ Set<FunnelDTO> getFunnels(String groupId); @@ -880,7 +880,7 @@ public interface NiFiServiceFacade { * Updates the specified label. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param funnelDTO The funnel DTO * @return The funnel DTO */ @@ -889,8 +889,8 @@ public interface NiFiServiceFacade { /** * Verifies the specified funnel can be deleted. * - * @param groupId - * @param funnelId + * @param groupId group + * @param funnelId funnel */ void verifyDeleteFunnel(String groupId, String funnelId); @@ -898,9 +898,9 @@ public interface NiFiServiceFacade { * Deletes the specified label. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param funnelId The funnel id - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteFunnel(Revision revision, String groupId, String funnelId); @@ -911,7 +911,7 @@ public interface NiFiServiceFacade { * Creates a label. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param labelDTO The label DTO * @return The label DTO */ @@ -920,7 +920,7 @@ public interface NiFiServiceFacade { /** * Gets the specified label. * - * @param groupId + * @param groupId group * @param labelId The label id * @return The label transfer object */ @@ -929,7 +929,7 @@ public interface NiFiServiceFacade { /** * Gets all of the labels. * - * @param groupId + * @param groupId group * @return The label transfer objects */ Set<LabelDTO> getLabels(String groupId); @@ -938,7 +938,7 @@ public interface NiFiServiceFacade { * Updates the specified label. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param labelDTO The label DTO * @return The label DTO */ @@ -948,16 +948,15 @@ public interface NiFiServiceFacade { * Deletes the specified label. * * @param revision Revision to compare with current base revision - * @param groupId + * @param groupId group * @param labelId The label id - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteLabel(Revision revision, String groupId, String labelId); // ---------------------------------------- // Controller Services methods // ---------------------------------------- - /** * Creates a controller service. * @@ -966,50 +965,52 @@ public interface NiFiServiceFacade { * @return The controller service DTO */ ConfigurationSnapshot<ControllerServiceDTO> createControllerService(Revision revision, ControllerServiceDTO controllerServiceDTO); - + /** * Gets all controller services. - * - * @return + * + * @return services */ Set<ControllerServiceDTO> getControllerServices(); - + /** * Gets the specified controller service. - * - * @param controllerServiceId - * @return + * + * @param controllerServiceId id + * @return service */ ControllerServiceDTO getControllerService(String controllerServiceId); - + /** - * Get the descriptor for the specified property of the specified controller service. - * - * @param id - * @param property - * @return + * Get the descriptor for the specified property of the specified controller + * service. + * + * @param id id + * @param property property + * @return property */ PropertyDescriptorDTO getControllerServicePropertyDescriptor(String id, String property); - + /** * Gets the references for specified controller service. - * - * @param controllerServiceId - * @return + * + * @param controllerServiceId id + * @return service reference */ Set<ControllerServiceReferencingComponentDTO> getControllerServiceReferencingComponents(String controllerServiceId); - + /** * Updates the referencing components for the specified controller service. - * - * @param revision - * @param controllerServiceId - * @param scheduledState - * @param controllerServiceState the value of state + * + * @param revision revision + * @param controllerServiceId id + * @param scheduledState state + * @param controllerServiceState the value of state * @return The referencing component dtos */ - ConfigurationSnapshot<Set<ControllerServiceReferencingComponentDTO>> updateControllerServiceReferencingComponents(Revision revision, String controllerServiceId, ScheduledState scheduledState, ControllerServiceState controllerServiceState); - + ConfigurationSnapshot<Set<ControllerServiceReferencingComponentDTO>> updateControllerServiceReferencingComponents( + Revision revision, String controllerServiceId, ScheduledState scheduledState, ControllerServiceState controllerServiceState); + /** * Updates the specified label. * @@ -1024,37 +1025,37 @@ public interface NiFiServiceFacade { * * @param revision Revision to compare with current base revision * @param controllerServiceId The controller service id - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteControllerService(Revision revision, String controllerServiceId); - + /** * Verifies the specified controller service can be updated. * - * @param controllerServiceDTO + * @param controllerServiceDTO service */ void verifyUpdateControllerService(ControllerServiceDTO controllerServiceDTO); - + /** - * Verifies the referencing components of the specified controller service can be updated. - * - * @param controllerServiceId - * @param scheduledState - * @param controllerServiceState + * Verifies the referencing components of the specified controller service + * can be updated. + * + * @param controllerServiceId id + * @param scheduledState schedule state + * @param controllerServiceState service state */ void verifyUpdateControllerServiceReferencingComponents(String controllerServiceId, ScheduledState scheduledState, ControllerServiceState controllerServiceState); - + /** * Verifies the specified controller service can be removed. * - * @param controllerServiceId + * @param controllerServiceId id */ void verifyDeleteControllerService(String controllerServiceId); - + // ---------------------------------------- // Reporting Task methods // ---------------------------------------- - /** * Creates a reporting task. * @@ -1063,31 +1064,32 @@ public interface NiFiServiceFacade { * @return The reporting task DTO */ ConfigurationSnapshot<ReportingTaskDTO> createReportingTask(Revision revision, ReportingTaskDTO reportingTaskDTO); - + /** * Gets all reporting tasks. - * - * @return + * + * @return tasks */ Set<ReportingTaskDTO> getReportingTasks(); - + /** * Gets the specified reporting task. - * - * @param reportingTaskId - * @return + * + * @param reportingTaskId id + * @return task */ ReportingTaskDTO getReportingTask(String reportingTaskId); - + /** - * Get the descriptor for the specified property of the specified reporting task. - * - * @param id - * @param property - * @return + * Get the descriptor for the specified property of the specified reporting + * task. + * + * @param id id + * @param property property + * @return descriptor */ PropertyDescriptorDTO getReportingTaskPropertyDescriptor(String id, String property); - + /** * Updates the specified reporting task. * @@ -1102,40 +1104,40 @@ public interface NiFiServiceFacade { * * @param revision Revision to compare with current base revision * @param reportingTaskId The reporting task id - * @return + * @return snapshot */ ConfigurationSnapshot<Void> deleteReportingTask(Revision revision, String reportingTaskId); - + /** * Verifies the specified reporting task can be updated. * - * @param reportingTaskDTO + * @param reportingTaskDTO task */ void verifyUpdateReportingTask(ReportingTaskDTO reportingTaskDTO); /** * Verifies the specified reporting task can be removed. * - * @param reportingTaskId + * @param reportingTaskId id */ void verifyDeleteReportingTask(String reportingTaskId); - + // ---------------------------------------- // History methods // ---------------------------------------- /** * Returns actions that meet the specified criteria. * - * @param historyQuery - * @return + * @param historyQuery query + * @return history */ HistoryDTO getActions(HistoryQueryDTO historyQuery); /** * Returns the details for the specified action id. * - * @param actionId - * @return + * @param actionId id + * @return action */ ActionDTO getAction(Integer actionId); @@ -1149,8 +1151,8 @@ public interface NiFiServiceFacade { /** * Gets the history for the specified property for the specified component. * - * @param componentId - * @return + * @param componentId id + * @return history */ ComponentHistoryDTO getComponentHistory(String componentId); @@ -1160,36 +1162,36 @@ public interface NiFiServiceFacade { /** * Creates a new snippet based off the existing snippet. * - * @param revision - * @param groupId - * @param snippetId - * @param originX - * @param originY - * @return + * @param revision revision + * @param groupId group id + * @param snippetId snippet id + * @param originX x + * @param originY y + * @return snapshot */ ConfigurationSnapshot<FlowSnippetDTO> copySnippet(Revision revision, String groupId, String snippetId, Double originX, Double originY); /** * Creates a new snippet. * - * @param revision - * @param snippet - * @return + * @param revision revision + * @param snippet snippet + * @return snapshot */ ConfigurationSnapshot<SnippetDTO> createSnippet(Revision revision, SnippetDTO snippet); /** * Gets the specified snippet. * - * @param snippetId - * @return + * @param snippetId id + * @return snippet */ SnippetDTO getSnippet(String snippetId); /** * Determines if this snippet can be updated. * - * @param snippetDto + * @param snippetDto snippet */ void verifyUpdateSnippet(SnippetDTO snippetDto); @@ -1197,25 +1199,25 @@ public interface NiFiServiceFacade { * If group id is specified, moves the specified snippet to the specified * group. * - * @param revision - * @param snippetDto - * @return + * @param revision revision + * @param snippetDto snippet + * @return snapshot */ ConfigurationSnapshot<SnippetDTO> updateSnippet(Revision revision, SnippetDTO snippetDto); /** * Determines if this snippet can be removed. * - * @param id + * @param id id */ void verifyDeleteSnippet(String id); /** * Removes the specified snippet. * - * @param revision - * @param snippetId - * @return + * @param revision revision + * @param snippetId snippet + * @return snapshot */ ConfigurationSnapshot<Void> deleteSnippet(Revision revision, String snippetId); @@ -1226,15 +1228,15 @@ public interface NiFiServiceFacade { * Gets the user with the specified id. * * @param userId The user id - * @return + * @return user */ UserDTO getUser(String userId); /** * Gets all of the users registered with this controller. * - * @param grouped - * @return + * @param grouped grouped + * @return user */ Collection<UserDTO> getUsers(Boolean grouped); @@ -1242,14 +1244,14 @@ public interface NiFiServiceFacade { * Updates the specified user accordingly. * * @param user The user to update - * @return + * @return user */ UserDTO updateUser(UserDTO user); /** * Invalidates the specified user. * - * @param userId + * @param userId user */ void invalidateUser(String userId); @@ -1257,15 +1259,15 @@ public interface NiFiServiceFacade { * Invalidates the specified user accounts and all accounts associated with * this group. * - * @param userGroup - * @param userIds + * @param userGroup group + * @param userIds id */ void invalidateUserGroup(String userGroup, Set<String> userIds); /** * Deletes the specified user. * - * @param userId + * @param userId user id */ void deleteUser(String userId); @@ -1273,20 +1275,22 @@ public interface NiFiServiceFacade { * Updates a user group with the specified group and comprised of the * specified users. * - * @param userGroup - * @return + * @param userGroup group + * @return group */ UserGroupDTO updateUserGroup(UserGroupDTO userGroup); /** * Ungroups the specified user. - * @param userId + * + * @param userId id */ void removeUserFromGroup(String userId); /** * Deletes the specified user group. - * @param userGroup + * + * @param userGroup group */ void removeUserGroup(String userGroup); @@ -1300,15 +1304,11 @@ public interface NiFiServiceFacade { boolean isClustered(); /** - * Gets the id of this node, if clustered. If not clustered, returns null. - * - * @return + * @return the id of this node, if clustered. If not clustered, returns null */ String getNodeId(); /** - * Returns the contents of cluster. - * * @return the contents of cluster */ ClusterDTO getCluster(); @@ -1325,7 +1325,7 @@ public interface NiFiServiceFacade { * Updates the contents of the node. * * @param nodeDTO a node transfer object - * @return + * @return node */ NodeDTO updateNode(NodeDTO nodeDTO); @@ -1368,11 +1368,9 @@ public interface NiFiServiceFacade { ClusterProcessorStatusDTO getClusterProcessorStatus(String processorId); /** - * Returns the processor status history for each node connected to the - * cluster. - * - * @param processorId - * @return + * @param processorId id + * @return the processor status history for each node connected to the + * cluster */ ClusterStatusHistoryDTO getClusterProcessorStatusHistory(String processorId); @@ -1385,29 +1383,23 @@ public interface NiFiServiceFacade { ClusterConnectionStatusDTO getClusterConnectionStatus(String connectionId); /** - * Returns the connection status history for each node connected to the - * cluster. - * - * @param connectionId - * @return + * @param connectionId id + * @return the connection status history for each node connected to the + * cluster */ ClusterStatusHistoryDTO getClusterConnectionStatusHistory(String connectionId); /** - * Returns the process group status history for each node connected to the - * cluster. - * - * @param processGroupId - * @return + * @param processGroupId id + * @return the process group status history for each node connected to the + * cluster */ ClusterStatusHistoryDTO getClusterProcessGroupStatusHistory(String processGroupId); /** - * Returns the remote process group status history for each node connected - * to the cluster. - * - * @param remoteProcessGroupId - * @return + * @param remoteProcessGroupId id + * @return the remote process group status history for each node connected + * to the cluster */ ClusterStatusHistoryDTO getClusterRemoteProcessGroupStatusHistory(String remoteProcessGroupId); @@ -1438,22 +1430,18 @@ public interface NiFiServiceFacade { // ---------------------------------------- // BulletinBoard methods - // ---------------------------------------- + // ---------------------------------------- /** - * Returns the bulletin board for this NiFi. - * - * @param query - * @return + * @param query query + * @return the bulletin board for this NiFi */ BulletinBoardDTO getBulletinBoard(BulletinQueryDTO query); // ---------------------------------------- // System diagnostics methods - // ---------------------------------------- + // ---------------------------------------- /** - * Returns the system diagnostics. - * - * @return + * @return the system diagnostics */ SystemDiagnosticsDTO getSystemDiagnostics(); } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a53cc3d7/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.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/StandardNiFiContentAccess.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java index ed58143..18c888e 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java @@ -50,11 +50,11 @@ public class StandardNiFiContentAccess implements ContentAccess { private static final Logger logger = LoggerFactory.getLogger(StandardNiFiContentAccess.class); public static final String CLIENT_ID_PARAM = "clientId"; - + private NiFiProperties properties; private NiFiServiceFacade serviceFacade; private WebClusterManager clusterManager; - + @Override @PreAuthorize("hasRole('ROLE_PROVENANCE')") public DownloadableContent getContent(final ContentRequestContext request) { @@ -67,11 +67,11 @@ public class StandardNiFiContentAccess implements ContentAccess { } catch (final URISyntaxException use) { throw new ClusterRequestException(use); } - + // set the request parameters final MultivaluedMap<String, String> parameters = new MultivaluedMapImpl(); parameters.add(CLIENT_ID_PARAM, request.getClientId()); - + // set the headers final Map<String, String> headers = new HashMap<>(); if (StringUtils.isNotBlank(request.getProxiedEntitiesChain())) { @@ -90,7 +90,7 @@ public class StandardNiFiContentAccess implements ContentAccess { headers.put("X-ProxiedEntityUserDetails", hexEncodedUserDetails); } } - + // get the target node and ensure it exists final Node targetNode = clusterManager.getNode(request.getClusterNodeId()); if (targetNode == null) { @@ -104,14 +104,14 @@ public class StandardNiFiContentAccess implements ContentAccess { final NodeResponse nodeResponse = clusterManager.applyRequest(HttpMethod.GET, dataUri, parameters, headers, targetNodes); final ClientResponse clientResponse = nodeResponse.getClientResponse(); final MultivaluedMap<String, String> responseHeaders = clientResponse.getHeaders(); - + // get the file name final String contentDisposition = responseHeaders.getFirst("Content-Disposition"); final String filename = StringUtils.substringAfterLast(contentDisposition, "filename="); - + // get the content type final String contentType = responseHeaders.getFirst("Content-Type"); - + // create the downloadable content return new DownloadableContent(filename, contentType, clientResponse.getEntityInputStream()); } else { @@ -119,7 +119,7 @@ public class StandardNiFiContentAccess implements ContentAccess { final String eventDetails = StringUtils.substringAfterLast(request.getDataUri(), "events/"); final String rawEventId = StringUtils.substringBefore(eventDetails, "/content/"); final String rawDirection = StringUtils.substringAfterLast(eventDetails, "/content/"); - + // get the content type final Long eventId; final ContentDirection direction;
