nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marka...@apache.org
Subject [24/62] [abbrv] incubator-nifi git commit: Squashed commit of the following:
Date Fri, 10 Apr 2015 13:43:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java
index acb7a4d..a1286ea 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java
@@ -24,16 +24,25 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
+ * <p>
  * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, 
  * {@link org.apache.nifi.controller.ControllerService ControllerService}, or
  * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} 
  * implementation can use to indicate a method
  * should be called whenever the component is added to the flow. This method
  * will be called once for the entire life of a component instance.
- *
+ * </p>
+ * 
+ * <p>
+ * Methods with this annotation are called without any arguments, as all settings
+ * and properties can be assumed to be the defaults.
+ * </p>
+ * 
+ * <p>
  * If any method annotated with this annotation throws a Throwable, the component
  * will not be added to the flow.
- *
+ * </p>
+ * 
  * @author none
  */
 @Documented

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java
index 0f78010..b227968 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java
@@ -23,19 +23,32 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.nifi.controller.ConfigurationContext;
+
 /**
- * Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
- * {@link org.apache.nifi.controller.ControllerService ControllerService} or 
- * {@link org.apache.nifi.reporting.ReportingTask ReportingTask}  
- * can use to indicate a method should be called whenever the component is disabled. 
+ * <p>
+ * Marker annotation a {@link org.apache.nifi.controller.ControllerService ControllerService} 
+ * can use to indicate a method should be called whenever the service is disabled. 
+ *</p>
  *
  * <p>
- * Methods using this annotation must take no arguments. If a method with this annotation
- * throws a Throwable, a log message and bulletin will be issued for the component, but
- * the component will still be disabled.
+ * Methods using this annotation are permitted to take zero arguments or to take a single
+ * argument of type {@link ConfigurationContext}. If a method with this annotation
+ * throws a Throwable, a log message and bulletin will be issued for the service, and the
+ * service will remain in a 'DISABLING' state. When this occurs, the method with this annotation
+ * will be called again after some period of time. This will continue until the method returns
+ * without throwing any Throwable. Until that time, the service will remain in a 'DISABLING' state
+ * and cannot be enabled again.
+ * </p>
+ * 
+ * <p>
+ * Note that this annotation will be ignored if applied to a ReportingTask or Processor. For a Controller
+ * Service, enabling and disabling are considered lifecycle events, as the action makes them usable or
+ * unusable by other components. However, for a Processor and a Reporting
+ * Task, these are not lifecycle events but rather a mechanism to allow a component to be excluded when
+ * starting or stopping a group of components.
  * </p>
  *
- * @author none
  */
 @Documented
 @Target({ElementType.METHOD})

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
index 1536dec..32aeec6 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
@@ -25,35 +25,35 @@ import java.lang.annotation.Target;
 
 /**
  * <p>
- * Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
- * {@link org.apache.nifi.controller.ControllerService ControllerService} or 
- * {@link org.apache.nifi.reporting.ReportingTask ReportingTask}  
- * can use to indicate a method should be called whenever the component is enabled.
- * Any method that has this annotation will be called every time a user enables the component.
+ * Marker annotation a {@link org.apache.nifi.controller.ControllerService ControllerService}
+ * can use to indicate a method should be called whenever the service is enabled.
+ * Any method that has this annotation will be called every time a user enables the service.
  * Additionally, each time that NiFi is restarted, if NiFi is configured to "auto-resume state"
- * and the component is enabled (whether stopped or running), the method will be invoked.
+ * and the service is enabled, the method will be invoked.
  * </p>
  *
  * <p>
- * Methods using this annotation must take either 0 arguments or a single argument.
+ * Methods using this annotation must take either 0 arguments or a single argument of type 
+ * {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
  * </p>
  * 
  * <p>
- * If using 1 argument and the component using the annotation is a Processor, that argument must
- * be of type {@link org.apache.nifi.processor.ProcessContext ProcessContext}.
- * </p>
- * 
- * <p>
- * If using 1 argument and the component using the annotation is a Reporting Task or Controller Service, 
- * that argument must be of type {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
+ * If a method with this annotation throws a Throwable, a log message and bulletin will be issued 
+ * for the component. In this event, the service will remain in an 'ENABLING' state and will not be
+ * usable. All methods with this annotation will then be called again after a delay. The service will
+ * not be made available for use until all methods with this annotation have returned without throwing
+ * anything.
  * </p>
  * 
  * <p>
- * If a method with this annotation throws a Throwable, a log message and bulletin will be issued 
- * for the component, but the component will still be enabled.
+ * Note that this annotation will be ignored if applied to a ReportingTask or Processor. For a Controller
+ * Service, enabling and disabling are considered lifecycle events, as the action makes them usable or
+ * unusable by other components. However, for a Processor and a Reporting
+ * Task, these are not lifecycle events but rather a mechanism to allow a component to be excluded when
+ * starting or stopping a group of components.
  * </p>
  *
- * @author none
+ * 
  */
 @Documented
 @Target({ElementType.METHOD})

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java
index 696159f..71202b4 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java
@@ -23,7 +23,11 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.processor.ProcessContext;
+
 /**
+ * <p>
  * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, 
  * {@link org.apache.nifi.controller.ControllerService ControllerService}, or
  * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation 
@@ -32,7 +36,15 @@ import java.lang.annotation.Target;
  * component instance. If the method throw any Throwable, that Throwable will be
  * caught and logged but will not prevent subsequent methods with this annotation
  * or removal of the component from the flow.
- *
+ * </p>
+ * 
+ * <p>
+ * Methods with this annotation are permitted to take no arguments or to take a single
+ * argument. If using a single argument, that argument must be of type {@link ConfigurationContext}
+ * if the component is a ReportingTask or a ControllerService. If the component is a Processor,
+ * then the argument must be of type {@link ProcessContext}.
+ * </p>
+ * 
  * @author none
  */
 @Documented

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java
index a4129e1..3d1ce6c 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java
@@ -23,7 +23,11 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.processor.ProcessContext;
+
 /**
+ * <p>
  * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, 
  * {@link org.apache.nifi.controller.ControllerService ControllerService}, or
  * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation 
@@ -31,7 +35,14 @@ import java.lang.annotation.Target;
  * This will be called at most once for each component in a JVM lifetime.
  * It is not, however, guaranteed that this method will be called on shutdown, as 
  * the service may be killed suddenly.
- *
+ * </p>
+ * 
+ * <p>
+ * Methods with this annotation are permitted to take either 0 or 1 argument. If an argument
+ * is used, it must be of type {@link ConfigurationContext} if the component is a ReportingTask
+ * or Controller Service, or of type {@link ProcessContext} if the component is a Processor.
+ * </p>
+ *  
  * @author none
  */
 @Documented

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java
index 4715253..fdc4fd8 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java
@@ -23,6 +23,9 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.processor.ProcessContext;
+
 /**
  * <p>
  * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
@@ -47,6 +50,12 @@ import java.lang.annotation.Target;
  * longer scheduled to run (as opposed to after all threads have returned from the
  * <code>onTrigger</code> method), see the {@link OnUnscheduled} annotation.
  * </p>
+ * 
+ * <p>
+ * Methods with this annotation are permitted to take either 0 or 1 argument. If an argument
+ * is used, it must be of type {@link ConfigurationContext} if the component is a ReportingTask
+ * or of type {@link ProcessContext} if the component is a Processor.
+ * </p>
  *
  * @author none
  */

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java
index b1dbde1..5c7e13d 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java
@@ -47,8 +47,6 @@ import java.lang.annotation.Target;
  * If using 1 argument and the component using the annotation is a Reporting Task, that argument must
  * be of type {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}.
  * </p>
- *
- * @author none
  */
 @Documented
 @Target({ElementType.METHOD})

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
index 82372af..e62ff79 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java
@@ -142,9 +142,19 @@ public final class PropertyDescriptor implements Comparable<PropertyDescriptor>
             final Set<String> validIdentifiers = context.getControllerServiceLookup().getControllerServiceIdentifiers(controllerServiceDefinition);
             if (validIdentifiers != null && validIdentifiers.contains(input)) {
                 final ControllerService controllerService = context.getControllerServiceLookup().getControllerService(input);
-                if (!context.getControllerServiceLookup().isControllerServiceEnabled(controllerService)) {
+                if ( !context.isValidationRequired(controllerService) ) {
                     return new ValidationResult.Builder()
-                            .input(input)
+                        .input(input)
+                        .subject(getName())
+                        .valid(true)
+                        .build();
+                }
+                
+                final String serviceId = controllerService.getIdentifier();
+                if (!context.getControllerServiceLookup().isControllerServiceEnabled(serviceId) && 
+                    !context.getControllerServiceLookup().isControllerServiceEnabling(serviceId)) {
+                    return new ValidationResult.Builder()
+                            .input(context.getControllerServiceLookup().getControllerServiceName(serviceId))
                             .subject(getName())
                             .valid(false)
                             .explanation("Controller Service " + controllerService + " is disabled")

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java
index b7b72c5..61b68a2 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java
@@ -81,6 +81,15 @@ public interface ValidationContext {
     String getAnnotationData();
     
     /**
+     * There are times when the framework needs to consider a component valid, even if it
+     * references an invalid ControllerService. This method will return <code>false</code>
+     * if the component is to be considered valid even if the given Controller Service is referenced
+     * and is invalid.
+     * @param service
+     */
+    boolean isValidationRequired(ControllerService service);
+    
+    /**
      * Returns <code>true</code> if the given value contains a NiFi Expression Language expression,
      * <code>false</code> if it does not
      * 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java
index c12f2f8..71cdd23 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java
@@ -22,6 +22,7 @@ import org.apache.nifi.components.AbstractConfigurableComponent;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.components.PropertyValue;
 import org.apache.nifi.controller.annotation.OnConfigured;
+import org.apache.nifi.logging.ComponentLog;
 import org.apache.nifi.processor.ProcessorInitializationContext;
 import org.apache.nifi.reporting.InitializationException;
 
@@ -30,11 +31,13 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp
     private String identifier;
     private ControllerServiceLookup serviceLookup;
     private volatile ConfigurationContext configContext;
-
+    private ComponentLog logger;
+    
     @Override
     public final void initialize(final ControllerServiceInitializationContext context) throws InitializationException {
         this.identifier = context.getIdentifier();
         serviceLookup = context.getControllerServiceLookup();
+        logger = context.getLogger();
         init(context);
     }
 
@@ -88,4 +91,12 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp
      */
     protected void init(final ControllerServiceInitializationContext config) throws InitializationException {
     }
+    
+    /**
+     * Returns the logger that has been provided to the component by the framework in its initialize method.
+     * @return
+     */
+    protected ComponentLog getLogger() {
+        return logger;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java
index b5b0412..d34c635 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java
@@ -16,6 +16,8 @@
  */
 package org.apache.nifi.controller;
 
+import org.apache.nifi.logging.ComponentLog;
+
 public interface ControllerServiceInitializationContext {
 
     /**
@@ -33,4 +35,12 @@ public interface ControllerServiceInitializationContext {
      * @return
      */
     ControllerServiceLookup getControllerServiceLookup();
+    
+    /**
+     * Returns a logger that can be used to log important events in a standard way and generate
+     * bulletins when appropriate
+     * 
+     * @return
+     */
+    ComponentLog getLogger();
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java
index 77b8e62..4b96f62 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java
@@ -42,6 +42,18 @@ public interface ControllerServiceLookup {
     boolean isControllerServiceEnabled(String serviceIdentifier);
 
     /**
+     * Returns <code>true</code> if the Controller Service with the given
+     * identifier has been enabled but is still in the transitioning state,
+     * otherwise returns <code>false</code>.
+     * If the given identifier is not known by this ControllerServiceLookup,
+     * returns <code>false</code>.
+     * 
+     * @param serviceIdentifier
+     * @return
+     */
+    boolean isControllerServiceEnabling(String serviceIdentifier);
+    
+    /**
      * Returns <code>true</code> if the given Controller Service is enabled,
      * <code>false</code> otherwise. If the given Controller Service is not
      * known by this ControllerServiceLookup, returns <code>false</code>
@@ -63,4 +75,11 @@ public interface ControllerServiceLookup {
      */
     Set<String> getControllerServiceIdentifiers(Class<? extends ControllerService> serviceType) throws IllegalArgumentException;
 
+    /**
+     * Returns the name of the Controller service with the given identifier. If no service can be
+     * found with this identifier, returns {@code null}.
+     * @param serviceIdentifier
+     * @return
+     */
+    String getControllerServiceName(String serviceIdentifier);
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java
new file mode 100644
index 0000000..c070e23
--- /dev/null
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.logging;
+
+
+/**
+ * <p>
+ * The ComponentLog provides a mechanism to ensure that all NiFi components are logging and reporting
+ * information in a consistent way. When messages are logged to the ComponentLog, each message has the
+ * following characteristics:
+ * </p>
+ * 
+ * <ul>
+ *  <li>
+ *      The <code>toString()</code> of the component is automatically prepended to the message so that it is clear
+ *      which component is providing the information. This is important, since a single component may have many
+ *      different instances within the same NiFi instance.
+ *  </li>
+ *  <li>
+ *      If the last value in an Object[] argument that is passed to the logger is a Throwable, then the logged message
+ *      will include a <code>toString()</code> of the Throwable; in addition, if the component's logger is set to
+ *      DEBUG level via the logback configuration, the Stacktrace will also be logged. This provides a mechanism to easily
+ *      enable stacktraces in the logs when they are desired without filling the logs with unneeded stack traces for messages
+ *      that end up occurring often.
+ *  </li>
+ *  <li>
+ *      Any message that is logged with a Severity level that meets or exceeds the configured Bulletin Level for that component
+ *      will also cause a Bulletin to be generated, so that the message is visible in the UI, allowing Dataflow Managers
+ *      to understand that a problem exists and what the issue is.
+ *  </li>
+ * </ul>
+ * 
+ */
+public interface ComponentLog {
+    void warn(String msg, Throwable t);
+
+    void warn(String msg, Object[] os);
+
+    void warn(String msg, Object[] os, Throwable t);
+
+    void warn(String msg);
+
+    void trace(String msg, Throwable t);
+
+    void trace(String msg, Object[] os);
+
+    void trace(String msg);
+
+    void trace(String msg, Object[] os, Throwable t);
+
+    boolean isWarnEnabled();
+
+    boolean isTraceEnabled();
+
+    boolean isInfoEnabled();
+
+    boolean isErrorEnabled();
+
+    boolean isDebugEnabled();
+
+    void info(String msg, Throwable t);
+
+    void info(String msg, Object[] os);
+
+    void info(String msg);
+
+    void info(String msg, Object[] os, Throwable t);
+
+    String getName();
+
+    void error(String msg, Throwable t);
+
+    void error(String msg, Object[] os);
+
+    void error(String msg);
+
+    void error(String msg, Object[] os, Throwable t);
+
+    void debug(String msg, Throwable t);
+
+    void debug(String msg, Object[] os);
+
+    void debug(String msg, Object[] os, Throwable t);
+
+    void debug(String msg);
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java
index c5fa7b1..0d66d85 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java
@@ -16,58 +16,15 @@
  */
 package org.apache.nifi.logging;
 
-public interface ProcessorLog {
 
-    void warn(String msg, Throwable t);
-
-    void warn(String msg, Object[] os);
-
-    void warn(String msg, Object[] os, Throwable t);
-
-    void warn(String msg);
-
-    void trace(String msg, Throwable t);
-
-    void trace(String msg, Object[] os);
-
-    void trace(String msg);
-
-    void trace(String msg, Object[] os, Throwable t);
-
-    boolean isWarnEnabled();
-
-    boolean isTraceEnabled();
-
-    boolean isInfoEnabled();
-
-    boolean isErrorEnabled();
-
-    boolean isDebugEnabled();
-
-    void info(String msg, Throwable t);
-
-    void info(String msg, Object[] os);
-
-    void info(String msg);
-
-    void info(String msg, Object[] os, Throwable t);
-
-    String getName();
-
-    void error(String msg, Throwable t);
-
-    void error(String msg, Object[] os);
-
-    void error(String msg);
-
-    void error(String msg, Object[] os, Throwable t);
-
-    void debug(String msg, Throwable t);
-
-    void debug(String msg, Object[] os);
-
-    void debug(String msg, Object[] os, Throwable t);
-
-    void debug(String msg);
+/**
+ * The ProcessorLog is an extension of ComponentLog but provides no additional functionality.
+ * It exists because ProcessorLog was created first,
+ * but when Controller Services and Reporting Tasks began to be used more heavily loggers
+ * were needed for them as well. We did not want to return a ProcessorLog to a ControllerService
+ * or a ReportingTask, so all of the methods were moved to a higher interface named ComponentLog.
+ * However, we kept the ProcessorLog interface around in order to maintain backward compatibility.
+ */
+public interface ProcessorLog extends ComponentLog {
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
index 5ed8f24..efcf2a3 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
@@ -20,6 +20,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.nifi.components.AbstractConfigurableComponent;
 import org.apache.nifi.controller.ControllerServiceLookup;
+import org.apache.nifi.logging.ComponentLog;
 import org.apache.nifi.processor.ProcessorInitializationContext;
 
 public abstract class AbstractReportingTask extends AbstractConfigurableComponent implements ReportingTask {
@@ -28,10 +29,12 @@ public abstract class AbstractReportingTask extends AbstractConfigurableComponen
     private String name;
     private long schedulingNanos;
     private ControllerServiceLookup serviceLookup;
+    private ComponentLog logger;
 
     @Override
     public final void initialize(final ReportingInitializationContext config) throws InitializationException {
         identifier = config.getIdentifier();
+        logger = config.getLogger();
         name = config.getName();
         schedulingNanos = config.getSchedulingPeriod(TimeUnit.NANOSECONDS);
         serviceLookup = config.getControllerServiceLookup();
@@ -91,4 +94,11 @@ public abstract class AbstractReportingTask extends AbstractConfigurableComponen
     protected void init(final ReportingInitializationContext config) throws InitializationException {
     }
 
+    /**
+     * Returns the logger that has been provided to the component by the framework in its initialize method.
+     * @return
+     */
+    protected ComponentLog getLogger() {
+        return logger;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
index a0ae88e..6b84589 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
@@ -19,6 +19,7 @@ package org.apache.nifi.reporting;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.nifi.controller.ControllerServiceLookup;
+import org.apache.nifi.logging.ComponentLog;
 import org.apache.nifi.scheduling.SchedulingStrategy;
 
 /**
@@ -77,4 +78,13 @@ public interface ReportingInitializationContext {
      * @return
      */
     SchedulingStrategy getSchedulingStrategy();
+    
+    
+    /**
+     * Returns a logger that can be used to log important events in a standard way and generate
+     * bulletins when appropriate
+     * 
+     * @return
+     */
+    ComponentLog getLogger();
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/ClusterRequestException.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ClusterRequestException.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ClusterRequestException.java
index 0ecea3b..ee5f417 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ClusterRequestException.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ClusterRequestException.java
@@ -17,6 +17,7 @@
 package org.apache.nifi.web;
 
 /**
+ * An general error occurred when attempting to communicate with the cluster.
  */
 public class ClusterRequestException extends RuntimeException {
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java
new file mode 100644
index 0000000..0b68ed9
--- /dev/null
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * Details about a given component. Contains configuration and current validation errors.
+ */
+public class ComponentDetails {
+
+    private final String id;
+    private final String name;
+    private final String type;
+    private final String state;
+    private final String annotationData;
+    private final Map<String, String> properties;
+    private final Collection<String> validationErrors;
+
+    private ComponentDetails(final Builder builder) {
+        this.id = builder.id;
+        this.name = builder.name;
+        this.type = builder.type;
+        this.state = builder.state;
+        this.annotationData = builder.annotationData;
+        this.properties = builder.properties;
+        this.validationErrors = builder.validationErrors;
+    }
+
+    /**
+     * The component id.
+     * 
+     * @return 
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * The component name.
+     * 
+     * @return 
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * The component type.
+     * 
+     * @return 
+     */
+    public String getType() {
+        return type;
+    }
+    
+    /**
+     * The component state.
+     * 
+     * @return 
+     */
+    public String getState() {
+        return state;
+    }
+
+    /**
+     * The component's annotation data.
+     * 
+     * @return 
+     */
+    public String getAnnotationData() {
+        return annotationData;
+    }
+
+    /**
+     * Mapping of component properties.
+     * 
+     * @return 
+     */
+    public Map<String, String> getProperties() {
+        return properties;
+    }
+
+    /**
+     * Current validation errors for the component.
+     * 
+     * @return 
+     */
+    public Collection<String> getValidationErrors() {
+        return validationErrors;
+    }
+
+    public static final class Builder {
+
+        private String id;
+        private String name;
+        private String type;
+        private String state;
+        private String annotationData;
+        private Map<String, String> properties;
+        private Collection<String> validationErrors;
+
+        public Builder id(final String id) {
+            this.id = id;
+            return this;
+        }
+
+        public Builder name(final String name) {
+            this.name = name;
+            return this;
+        }
+        
+        public Builder type(final String type) {
+            this.type = type;
+            return this;
+        }
+
+        public Builder state(final String state) {
+            this.state = state;
+            return this;
+        }
+
+        public Builder annotationData(final String annotationData) {
+            this.annotationData = annotationData;
+            return this;
+        }
+
+        public Builder properties(final Map<String, String> properties) {
+            this.properties = properties;
+            return this;
+        }
+
+        public Builder validateErrors(final Collection<String> validationErrors) {
+            this.validationErrors = validationErrors;
+            return this;
+        }
+
+        public ComponentDetails build() {
+            return new ComponentDetails(this);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java
new file mode 100644
index 0000000..066e772
--- /dev/null
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+/**
+ * An action that represents the configuration of a component.
+ */
+public class ConfigurationAction {
+
+    private final String id;
+    private final String name;
+    private final String type;
+    private final String field;
+    private final String previousValue;
+    private final String value;
+
+    private ConfigurationAction(final Builder builder) {
+        this.id = builder.id;
+        this.name = builder.name;
+        this.type = builder.type;
+        this.field = builder.field;
+        this.previousValue = builder.previousValue;
+        this.value = builder.value;
+    }
+
+    /**
+     * The id of the component being modified.
+     * 
+     * @return 
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * The name of the component being modified.
+     * 
+     * @return 
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * The type of the component being modified.
+     * 
+     * @return 
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Gets the name of the field, property, etc that has been modified.
+     *
+     * @return
+     */
+    public String getField() {
+        return field;
+    }
+
+    /**
+     * Gets the previous value.
+     *
+     * @return
+     */
+    public String getPreviousValue() {
+        return previousValue;
+    }
+
+    /**
+     * Gets the new value.
+     *
+     * @return
+     */
+    public String getValue() {
+        return value;
+    }
+
+    public static class Builder {
+
+        private String id;
+        private String name;
+        private String type;
+        private String field;
+        private String previousValue;
+        private String value;
+
+        public Builder id(final String id) {
+            this.id = id;
+            return this;
+        }
+        
+        public Builder name(final String name) {
+            this.name = name;
+            return this;
+        }
+        
+        public Builder type(final String type) {
+            this.type = type;
+            return this;
+        }
+        
+        public Builder field(final String field) {
+            this.field = field;
+            return this;
+        }
+
+        public Builder previousValue(final String previousValue) {
+            this.previousValue = previousValue;
+            return this;
+        }
+
+        public Builder value(final String value) {
+            this.value = value;
+            return this;
+        }
+
+        public ConfigurationAction build() {
+            return new ConfigurationAction(this);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java
new file mode 100644
index 0000000..50f0ca3
--- /dev/null
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+import java.util.Collection;
+
+import org.apache.nifi.controller.ControllerService;
+
+/**
+ * NiFi web context providing limited access to dataflow configuration for
+ * component custom UIs.
+ */
+public interface NiFiWebConfigurationContext {
+    
+    /**
+     * Gets the ControllerService for the specified identifier. If a
+     * corresponding service cannot be found, null is returned. If this NiFi is
+     * clustered, the only services available will be those those
+     * availability is NCM only.
+     *
+     * @param serviceIdentifier
+     * @return
+     */
+    ControllerService getControllerService(String serviceIdentifier);
+
+    /**
+     * Provides a mechanism for custom UIs to save actions to appear in NiFi
+     * configuration history. Note all fields within each Action must be
+     * populated. Null values will result in a failure to insert the audit
+     * record. Since the saving to these actions is separate from the actual
+     * configuration change, a failure to insert here will just generate a
+     * warning log message. The recording of these actions typically happens
+     * after a configuration change is applied. Since those changes have already
+     * been applied to the flow, we cannot revert them because of a failure to
+     * insert an audit record.
+     *
+     * @param requestContext
+     * @param actions
+     * @throws IllegalArgumentException     When the requestContext isn't fully populated or 
+     * isn't appropriate for the given request
+     */
+    void saveActions(NiFiWebRequestContext requestContext, Collection<ConfigurationAction> actions);
+
+    /**
+     * Gets the current user dn. Returns null if no user is found.
+     *
+     * @return
+     */
+    String getCurrentUserDn();
+
+    /**
+     * Gets the current user name. Returns null if no user is found.
+     *
+     * @return
+     */
+    String getCurrentUserName();
+
+    /**
+     * Sets the annotation data for the underlying component.
+     * 
+     * @param configurationContext
+     * @param annotationData
+     * @return the configuration for the underlying component
+     * @throws ResourceNotFoundException if the underlying component does not exit
+     * @throws InvalidRevisionException if a revision other than the current
+     * revision is given
+     * @throws ClusterRequestException if the annotation data was unable to be
+     * set for the underlying component. This exception will only be thrown when operating
+     * in a cluster.
+     * @throws IllegalArgumentException     When the requestContext isn't fully populated or 
+     * isn't appropriate for the given request
+     */
+    ComponentDetails setAnnotationData(NiFiWebConfigurationRequestContext configurationContext, String annotationData) throws ResourceNotFoundException, InvalidRevisionException, ClusterRequestException;
+    
+    /**
+     * Gets the details for the underlying component (including configuration, validation errors, and annotation data).
+     * 
+     * @param requestContext
+     * @return the configuration for the underlying component
+     * @throws ResourceNotFoundException if the underlying component does not exit
+     * @throws ClusterRequestException if the underlying component was unable to be
+     * retrieved from the cluster. This exception will only be thrown when
+     * operating in a cluster.
+     * @throws IllegalArgumentException     When the requestContext isn't fully populated or 
+     * isn't appropriate for the given request
+     */
+    ComponentDetails getComponentDetails(NiFiWebRequestContext requestContext) throws ResourceNotFoundException, ClusterRequestException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java
new file mode 100644
index 0000000..7912241
--- /dev/null
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+/**
+ * Contextual details required to make a configuration request from a UI extension.
+ */
+public interface NiFiWebConfigurationRequestContext extends NiFiWebRequestContext {
+
+    /**
+     * The revision to include in the request.
+     * 
+     * @return the revision
+     */
+    Revision getRevision();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
index 4c4f25d..01702ad 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
@@ -24,6 +24,7 @@ import org.apache.nifi.controller.ControllerService;
  * NiFi web context providing limited access to dataflow configuration for
  * processor custom UIs.
  */
+@Deprecated
 public interface NiFiWebContext {
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContextConfig.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContextConfig.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContextConfig.java
index 808b9d6..2df94e4 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContextConfig.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContextConfig.java
@@ -19,6 +19,7 @@ package org.apache.nifi.web;
 /**
  * Context configuration for methods invoked from the NiFiWebContext.
  */
+@Deprecated
 public interface NiFiWebContextConfig {
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java
new file mode 100644
index 0000000..ac38221
--- /dev/null
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+/**
+ * Contextual details required to make a request from a UI extension.
+ */
+public interface NiFiWebRequestContext {
+
+    /**
+     * Returns the type of UI extension is making the request.
+     * 
+     * @return 
+     */
+    UiExtensionType getExtensionType();
+    
+    /**
+     * The request protocol scheme (http or https). When scheme is https, the
+     * X509Certificate can be used for subsequent remote requests.
+     *
+     * @return the protocol scheme
+     */
+    String getScheme();
+
+    /**
+     * The id of the component.
+     * 
+     * @return the ID
+     */
+    String getId();
+
+    /**
+     * Returns the proxied entities chain. The format of the chain is as
+     * follows:
+     *
+     * <code>
+     * &lt;CN=original-proxied-entity&gt;&lt;CN=first-proxy&gt;&lt;CN=second-proxy&gt;...
+     * </code>
+     *
+     * @return the proxied entities chain or null if no chain
+     */
+    String getProxiedEntitiesChain();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
index 8385e4a..ce5e069 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
@@ -19,6 +19,7 @@ package org.apache.nifi.web;
 /**
  *
  */
+@Deprecated
 public class ProcessorConfigurationAction {
 
     private final String processorId;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorInfo.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorInfo.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorInfo.java
index 0481098..e87e73e 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorInfo.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorInfo.java
@@ -22,6 +22,7 @@ import java.util.Map;
 /**
  *
  */
+@Deprecated
 public class ProcessorInfo {
 
     private final String id;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
index 1881c2f..8a6275e 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
@@ -37,12 +37,12 @@ public class Revision implements Serializable {
      * the client ID
      */
     private final String clientId;
-
+    
     public Revision(Long revision, String clientId) {
         this.version = revision;
         this.clientId = clientId;
     }
-
+    
     public String getClientId() {
         return clientId;
     }
@@ -51,34 +51,6 @@ public class Revision implements Serializable {
         return version;
     }
 
-    /**
-     * A factory method for creating a new Revision instance whose version is
-     * this instance's version plus 1.
-     *
-     * @return an updated revision
-     */
-    public Revision increment() {
-        final long incrementedVersion;
-        if (version == null) {
-            incrementedVersion = 0;
-        } else {
-            incrementedVersion = version + 1;
-        }
-        return new Revision(incrementedVersion, clientId);
-    }
-
-    /**
-     * A factory method for creating a new Revision instance whose version is
-     * this instance's version plus 1 and whose client ID is the given client
-     * ID.
-     *
-     * @param clientId the client ID
-     * @return an updated revision
-     */
-    public Revision increment(String clientId) {
-        return new Revision(increment().getVersion(), clientId);
-    }
-
     @Override
     public boolean equals(final Object obj) {
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java
new file mode 100644
index 0000000..0bbda16
--- /dev/null
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+/**
+ * Types of UI extensions. Since a UI extension could support multiple
+ * types of custom UIs it will need to include the type so the framework
+ * can appropriate understand and process the request (recording actions
+ * in the audit database, replicating a request throughout the cluster to
+ * the appropriate endpoints, etc).
+ */
+public enum UiExtensionType {
+    ContentViewer,
+    ProcessorConfiguration,
+    ControllerServiceConfiguration,
+    ReportingTaskConfiguration
+}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-assembly/pom.xml b/nifi/nifi-assembly/pom.xml
index cae0f00..a26f214 100644
--- a/nifi/nifi-assembly/pom.xml
+++ b/nifi/nifi-assembly/pom.xml
@@ -187,8 +187,6 @@
 
         <nifi.flow.configuration.file>./conf/flow.xml.gz</nifi.flow.configuration.file>
         <nifi.flow.configuration.archive.dir>./conf/archive/</nifi.flow.configuration.archive.dir>
-        <nifi.reporting.task.configuration.file>./conf/reporting-tasks.xml</nifi.reporting.task.configuration.file>
-        <nifi.controller.service.configuration.file>./conf/controller-services.xml</nifi.controller.service.configuration.file>
         <nifi.authority.provider.configuration.file>./conf/authority-providers.xml</nifi.authority.provider.configuration.file>
         <nifi.templates.directory>./conf/templates</nifi.templates.directory>
         <nifi.database.directory>./database_repository</nifi.database.directory>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-commons/nifi-processor-utilities/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-processor-utilities/src/main/java/org/apache/nifi/processor/util/StandardValidators.java b/nifi/nifi-commons/nifi-processor-utilities/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
index a22e7bb..d1621ed 100644
--- a/nifi/nifi-commons/nifi-processor-utilities/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
+++ b/nifi/nifi-commons/nifi-processor-utilities/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
@@ -236,7 +236,7 @@ public class StandardValidators {
         @Override
         public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
             if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
             }
 
             try {
@@ -254,7 +254,7 @@ public class StandardValidators {
         @Override
         public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
             if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
             }
 
             try {
@@ -271,7 +271,7 @@ public class StandardValidators {
         @Override
         public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
             if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
             }
 
             if (input == null) {
@@ -289,7 +289,7 @@ public class StandardValidators {
         @Override
         public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
             if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
             }
 
             if (input == null) {
@@ -319,7 +319,7 @@ public class StandardValidators {
             @Override
             public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
                 if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
                 }
 
                 try {
@@ -347,7 +347,7 @@ public class StandardValidators {
             @Override
             public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
                 if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
                 }
 
                 final ValidationResult vr = DATA_SIZE_VALIDATOR.validate(subject, input, context);
@@ -372,7 +372,7 @@ public class StandardValidators {
             @Override
             public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
                 if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
                 }
 
                 final boolean matches = pattern.matcher(input).matches();
@@ -457,7 +457,7 @@ public class StandardValidators {
             @Override
             public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
                 if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
                 }
 
                 String reason = null;
@@ -503,7 +503,7 @@ public class StandardValidators {
         @Override
         public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
             if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
             }
 
             if (input == null) {
@@ -628,7 +628,7 @@ public class StandardValidators {
             @Override
             public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
                 if ( context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input) ) {
-                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").build();
+                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Expression Language Present").valid(true).build();
                 }
 
                 final ControllerService svc = context.getControllerServiceLookup().getControllerService(input);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java b/nifi/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
index 87a82d4..3b427a7 100644
--- a/nifi/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
+++ b/nifi/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
@@ -42,8 +42,6 @@ public class NiFiProperties extends Properties {
     public static final String PROPERTIES_FILE_PATH = "nifi.properties.file.path";
     public static final String FLOW_CONFIGURATION_FILE = "nifi.flow.configuration.file";
     public static final String FLOW_CONFIGURATION_ARCHIVE_FILE = "nifi.flow.configuration.archive.file";
-    public static final String TASK_CONFIGURATION_FILE = "nifi.reporting.task.configuration.file";
-    public static final String SERVICE_CONFIGURATION_FILE = "nifi.controller.service.configuration.file";
     public static final String AUTHORITY_PROVIDER_CONFIGURATION_FILE = "nifi.authority.provider.configuration.file";
     public static final String REPOSITORY_DATABASE_DIRECTORY = "nifi.database.directory";
     public static final String RESTORE_DIRECTORY = "nifi.restore.directory";

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
index e80f328..daf52b4 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
@@ -700,7 +700,7 @@ public class EndpointConnectionPool {
             final int flowFileCount = nodeInfo.getTotalFlowFiles();
             // don't allow any node to get more than 80% of the data
             final double percentageOfFlowFiles = Math.min(0.8D, ((double) flowFileCount / (double) totalFlowFileCount));
-            final double relativeWeighting = (direction == TransferDirection.RECEIVE) ? (1 - percentageOfFlowFiles) : percentageOfFlowFiles;
+            final double relativeWeighting = (direction == TransferDirection.SEND) ? (1 - percentageOfFlowFiles) : percentageOfFlowFiles;
             final int entries = Math.max(1, (int) (numDestinations * relativeWeighting));
             
             entryCountMap.put(nodeInfo, Math.max(1, entries));

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestEndpointConnectionStatePool.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestEndpointConnectionStatePool.java b/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestEndpointConnectionStatePool.java
index cb7af08..c5cca78 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestEndpointConnectionStatePool.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestEndpointConnectionStatePool.java
@@ -39,7 +39,7 @@ public class TestEndpointConnectionStatePool {
         collection.add(new NodeInformation("ShouldGetMedium", 5, 5555, true, 4096));
 
         clusterNodeInfo.setNodeInformation(collection);
-        final List<PeerStatus> destinations = EndpointConnectionPool.formulateDestinationList(clusterNodeInfo, TransferDirection.SEND);
+        final List<PeerStatus> destinations = EndpointConnectionPool.formulateDestinationList(clusterNodeInfo, TransferDirection.RECEIVE);
         for ( final PeerStatus peerStatus : destinations ) {
             System.out.println(peerStatus.getPeerDescription());
         }
@@ -53,7 +53,7 @@ public class TestEndpointConnectionStatePool {
         collection.add(new NodeInformation("ShouldGetLots", 2, 2222, true, 50000));
 
         clusterNodeInfo.setNodeInformation(collection);
-        final List<PeerStatus> destinations = EndpointConnectionPool.formulateDestinationList(clusterNodeInfo, TransferDirection.SEND);
+        final List<PeerStatus> destinations = EndpointConnectionPool.formulateDestinationList(clusterNodeInfo, TransferDirection.RECEIVE);
         for ( final PeerStatus peerStatus : destinations ) {
             System.out.println(peerStatus.getPeerDescription());
         }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceInitializationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceInitializationContext.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceInitializationContext.java
index 86624ae..fd3c2de 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceInitializationContext.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceInitializationContext.java
@@ -19,13 +19,20 @@ package org.apache.nifi.util;
 import org.apache.nifi.controller.ControllerService;
 import org.apache.nifi.controller.ControllerServiceInitializationContext;
 import org.apache.nifi.controller.ControllerServiceLookup;
+import org.apache.nifi.logging.ComponentLog;
 
 public class MockControllerServiceInitializationContext extends MockControllerServiceLookup implements ControllerServiceInitializationContext, ControllerServiceLookup {
 
     private final String identifier;
+    private final ComponentLog logger;
 
     public MockControllerServiceInitializationContext(final ControllerService controllerService, final String identifier) {
+        this(controllerService, identifier, new MockProcessorLog(identifier, controllerService));
+    }
+    
+    public MockControllerServiceInitializationContext(final ControllerService controllerService, final String identifier, final ComponentLog logger) {
         this.identifier = identifier;
+        this.logger = logger;
         addControllerService(controllerService, identifier);
     }
 
@@ -33,9 +40,19 @@ public class MockControllerServiceInitializationContext extends MockControllerSe
     public String getIdentifier() {
         return identifier;
     }
+    
+    @Override
+    public String getControllerServiceName(final String serviceIdentifier) {
+    	return null;
+    }
 
     @Override
     public ControllerServiceLookup getControllerServiceLookup() {
         return this;
     }
+    
+    @Override
+    public ComponentLog getLogger() {
+        return logger;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
index 8298a39..2734440 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
@@ -77,6 +77,11 @@ public abstract class MockControllerServiceLookup implements ControllerServiceLo
     }
 
     @Override
+    public boolean isControllerServiceEnabling(final String serviceIdentifier) {
+        return false;
+    }
+    
+    @Override
     public Set<String> getControllerServiceIdentifiers(final Class<? extends ControllerService> serviceType) {
         final Set<String> ids = new HashSet<>();
         for (final Map.Entry<String, ControllerServiceConfiguration> entry : controllerServiceMap.entrySet()) {
@@ -86,4 +91,10 @@ public abstract class MockControllerServiceLookup implements ControllerServiceLo
         }
         return ids;
     }
+    
+    @Override
+    public String getControllerServiceName(String serviceIdentifier) {
+    	final ControllerServiceConfiguration status = controllerServiceMap.get(serviceIdentifier);
+    	return status == null ? null : serviceIdentifier;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorInitializationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorInitializationContext.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorInitializationContext.java
index f49a6c5..0aa2749 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorInitializationContext.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorInitializationContext.java
@@ -63,6 +63,11 @@ public class MockProcessorInitializationContext implements ProcessorInitializati
     }
 
     @Override
+    public String getControllerServiceName(String serviceIdentifier) {
+    	return context.getControllerServiceName(serviceIdentifier);
+    }
+    
+    @Override
     public boolean isControllerServiceEnabled(String serviceIdentifier) {
         return context.isControllerServiceEnabled(serviceIdentifier);
     }
@@ -71,4 +76,9 @@ public class MockProcessorInitializationContext implements ProcessorInitializati
     public boolean isControllerServiceEnabled(ControllerService service) {
         return context.isControllerServiceEnabled(service);
     }
+
+    @Override
+    public boolean isControllerServiceEnabling(String serviceIdentifier) {
+        return context.isControllerServiceEnabling(serviceIdentifier);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorLog.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorLog.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorLog.java
index f8489f8..5505e88 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorLog.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorLog.java
@@ -17,28 +17,26 @@
 package org.apache.nifi.util;
 
 import org.apache.nifi.logging.ProcessorLog;
-import org.apache.nifi.processor.Processor;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class MockProcessorLog implements ProcessorLog {
 
     private final Logger logger;
-    private final Processor processor;
+    private final Object component;
 
-    public MockProcessorLog(final String processorId, final Processor processor) {
-        this.logger = LoggerFactory.getLogger(processor.getClass());
-        this.processor = processor;
+    public MockProcessorLog(final String componentId, final Object component) {
+        this.logger = LoggerFactory.getLogger(component.getClass());
+        this.component = component;
     }
 
     private Object[] addProcessor(final Object[] originalArgs) {
-        return prependToArgs(originalArgs, processor);
+        return prependToArgs(originalArgs, component);
     }
 
     private Object[] addProcessorAndThrowable(final Object[] os, final Throwable t) {
         final Object[] modifiedArgs = new Object[os.length + 2];
-        modifiedArgs[0] = processor.toString();
+        modifiedArgs[0] = component.toString();
         for (int i = 0; i < os.length; i++) {
             modifiedArgs[i + 1] = os[i];
         }
@@ -75,7 +73,7 @@ public class MockProcessorLog implements ProcessorLog {
      */
     @Override
     public void warn(final String msg, final Throwable t) {
-        warn("{} " + msg, new Object[]{processor}, t);
+        warn("{} " + msg, new Object[]{component}, t);
     }
 
     /**
@@ -118,7 +116,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void warn(String msg) {
         msg = "{} " + msg;
-        logger.warn(msg, processor);
+        logger.warn(msg, component);
     }
 
     /**
@@ -129,7 +127,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void trace(String msg, Throwable t) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
         logger.trace(msg, os, t);
     }
 
@@ -152,7 +150,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void trace(String msg) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
         logger.trace(msg, os);
     }
 
@@ -224,7 +222,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void info(String msg, Throwable t) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
 
         logger.info(msg, os);
         if (logger.isDebugEnabled()) {
@@ -252,7 +250,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void info(String msg) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
 
         logger.info(msg, os);
     }
@@ -291,7 +289,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void error(String msg, Throwable t) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
 
         logger.error(msg, os, t);
         if (logger.isDebugEnabled()) {
@@ -322,7 +320,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void error(String msg) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
 
         logger.error(msg, os);
     }
@@ -352,7 +350,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void debug(String msg, Throwable t) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
 
         logger.debug(msg, os, t);
     }
@@ -394,7 +392,7 @@ public class MockProcessorLog implements ProcessorLog {
     @Override
     public void debug(String msg) {
         msg = "{} " + msg;
-        final Object[] os = {processor};
+        final Object[] os = {component};
 
         logger.debug(msg, os);
     }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockReportingInitializationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockReportingInitializationContext.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockReportingInitializationContext.java
index a874536..7cabef2 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockReportingInitializationContext.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockReportingInitializationContext.java
@@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.controller.ControllerServiceLookup;
+import org.apache.nifi.logging.ComponentLog;
 import org.apache.nifi.reporting.ReportingInitializationContext;
 import org.apache.nifi.scheduling.SchedulingStrategy;
 
@@ -30,10 +31,12 @@ public class MockReportingInitializationContext extends MockControllerServiceLoo
     private final String identifier;
     private final String name;
     private final Map<PropertyDescriptor, String> properties = new HashMap<>();
+    private final ComponentLog logger;
 
-    public MockReportingInitializationContext(final String identifier, final String name) {
+    public MockReportingInitializationContext(final String identifier, final String name, final ComponentLog logger) {
         this.identifier = identifier;
         this.name = name;
+        this.logger = logger;
     }
 
     @Override
@@ -78,4 +81,9 @@ public class MockReportingInitializationContext extends MockControllerServiceLoo
     public SchedulingStrategy getSchedulingStrategy() {
         return SchedulingStrategy.TIMER_DRIVEN;
     }
+    
+    @Override
+    public ComponentLog getLogger() {
+        return logger;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockValidationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockValidationContext.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockValidationContext.java
index c00386e..c9b1cda 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockValidationContext.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockValidationContext.java
@@ -103,6 +103,21 @@ public class MockValidationContext implements ValidationContext, ControllerServi
     }
     
     @Override
+    public String getControllerServiceName(final String serviceIdentifier) {
+    	final ControllerServiceConfiguration configuration = context.getConfiguration(serviceIdentifier);
+    	return configuration == null ? null : serviceIdentifier;
+    }
+    
+    @Override
+    public boolean isValidationRequired(final ControllerService service) {
+        return true;
+    }
+
+    @Override
+    public boolean isControllerServiceEnabling(String serviceIdentifier) {
+        return context.isControllerServiceEnabling(serviceIdentifier);
+    }
+    
     public boolean isExpressionLanguagePresent(final String value) {
         if ( value == null ) {
             return false;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
index 8d691dd..d66ed81 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
@@ -59,6 +59,7 @@ import org.apache.nifi.controller.ConfigurationContext;
 import org.apache.nifi.controller.ControllerService;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.logging.ComponentLog;
 import org.apache.nifi.processor.ProcessSessionFactory;
 import org.apache.nifi.processor.Processor;
 import org.apache.nifi.processor.QueueSize;
@@ -512,13 +513,15 @@ public class StandardProcessorTestRunner implements TestRunner {
 
     @Override
     public void addControllerService(final String identifier, final ControllerService service, final Map<String, String> properties) throws InitializationException {
+        // hold off on failing due to deprecated annotation for now... will introduce later.
 //        for ( final Method method : service.getClass().getMethods() ) {
 //            if ( method.isAnnotationPresent(org.apache.nifi.controller.annotation.OnConfigured.class) ) {
 //                Assert.fail("Controller Service " + service + " is using deprecated Annotation " + org.apache.nifi.controller.annotation.OnConfigured.class + " for method " + method);
 //            }
 //        }
         
-        final MockControllerServiceInitializationContext initContext = new MockControllerServiceInitializationContext(requireNonNull(service), requireNonNull(identifier));
+        final ComponentLog logger = new MockProcessorLog(identifier, service);
+        final MockControllerServiceInitializationContext initContext = new MockControllerServiceInitializationContext(requireNonNull(service), requireNonNull(identifier), logger);
         service.initialize(initContext);
 
         final Map<PropertyDescriptor, String> resolvedProps = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/e9647717/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/ActionDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/ActionDAO.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/ActionDAO.java
index 5d6d222..5d5d498 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/ActionDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/ActionDAO.java
@@ -48,12 +48,12 @@ public interface ActionDAO {
 
     /**
      * Finds the previous values for the specified property in the specified
-     * processor. Returns empty list if there are none.
+     * component. Returns empty list if there are none.
      *
-     * @param processorId
+     * @param componentId
      * @return
      */
-    Map<String, List<PreviousValue>> getPreviousValues(String processorId);
+    Map<String, List<PreviousValue>> getPreviousValues(String componentId);
 
     /**
      * Finds the specified action.


Mime
View raw message