nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcgil...@apache.org
Subject [2/2] incubator-nifi git commit: NIFI-250: - Adding support for showing property history for controller services.
Date Wed, 28 Jan 2015 20:55:18 GMT
NIFI-250:
- Adding support for showing property history for controller services.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/bb628b07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/bb628b07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/bb628b07

Branch: refs/heads/NIFI-250
Commit: bb628b07a905ddb7b6dbf0c7c216d00627f82668
Parents: 0d1f80f
Author: Matt Gilman <matt.c.gilman@gmail.com>
Authored: Wed Jan 28 15:55:00 2015 -0500
Committer: Matt Gilman <matt.c.gilman@gmail.com>
Committed: Wed Jan 28 15:55:00 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/nifi/admin/dao/ActionDAO.java    |  6 +++---
 .../org/apache/nifi/admin/dao/impl/StandardActionDAO.java | 10 +++++-----
 .../java/org/apache/nifi/admin/service/AuditService.java  |  6 +++---
 .../nifi/admin/service/action/GetPreviousValues.java      |  8 ++++----
 .../nifi/admin/service/impl/StandardAuditService.java     |  4 ++--
 5 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bb628b07/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.

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bb628b07/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
index 9e1ede9..7114d42 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardActionDAO.java
@@ -931,7 +931,7 @@ public class StandardActionDAO implements ActionDAO {
     }
 
     @Override
-    public Map<String, List<PreviousValue>> getPreviousValues(String processorId)
{
+    public Map<String, List<PreviousValue>> getPreviousValues(String componentId)
{
         Map<String, List<PreviousValue>> previousValues = new LinkedHashMap<>();
 
         PreparedStatement statement = null;
@@ -939,7 +939,7 @@ public class StandardActionDAO implements ActionDAO {
         try {
             // create the statement
             statement = connection.prepareStatement(SELECT_PREVIOUSLY_CONFIGURED_FIELDS);
-            statement.setString(1, processorId);
+            statement.setString(1, componentId);
 
             // execute the query
             rs = statement.executeQuery();
@@ -947,7 +947,7 @@ public class StandardActionDAO implements ActionDAO {
             // ensure results
             while (rs.next()) {
                 final String property = rs.getString("NAME");
-                previousValues.put(property, getPreviousValuesForProperty(processorId, property));
+                previousValues.put(property, getPreviousValuesForProperty(componentId, property));
             }
         } catch (SQLException sqle) {
             throw new DataAccessException(sqle);
@@ -959,7 +959,7 @@ public class StandardActionDAO implements ActionDAO {
         return previousValues;
     }
 
-    private List<PreviousValue> getPreviousValuesForProperty(final String processorId,
final String property) {
+    private List<PreviousValue> getPreviousValuesForProperty(final String componentId,
final String property) {
         List<PreviousValue> previousValues = new ArrayList<>();
 
         PreparedStatement statement = null;
@@ -967,7 +967,7 @@ public class StandardActionDAO implements ActionDAO {
         try {
             // create the statement
             statement = connection.prepareStatement(SELECT_PREVIOUS_VALUES);
-            statement.setString(1, processorId);
+            statement.setString(1, componentId);
             statement.setString(2, property);
 
             // execute the query

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bb628b07/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/AuditService.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/AuditService.java
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/AuditService.java
index 0843bd8..7ca4e06 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/AuditService.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/AuditService.java
@@ -40,12 +40,12 @@ public interface AuditService {
 
     /**
      * Finds the previous values for the specified property in the specified
-     * processor. Returns null if there are none.
+     * component. Returns null if there are none.
      *
-     * @param processorId
+     * @param componentId
      * @return
      */
-    Map<String, List<PreviousValue>> getPreviousValues(String processorId);
+    Map<String, List<PreviousValue>> getPreviousValues(String componentId);
 
     /**
      * Get the actions within the given date range.

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bb628b07/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/action/GetPreviousValues.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/action/GetPreviousValues.java
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/action/GetPreviousValues.java
index 5ce663e..569439b 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/action/GetPreviousValues.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/action/GetPreviousValues.java
@@ -28,16 +28,16 @@ import org.apache.nifi.history.PreviousValue;
  */
 public class GetPreviousValues implements AdministrationAction<Map<String, List<PreviousValue>>>
{
 
-    private final String processorId;
+    private final String componentId;
 
-    public GetPreviousValues(String processorId) {
-        this.processorId = processorId;
+    public GetPreviousValues(String componentId) {
+        this.componentId = componentId;
     }
 
     @Override
     public Map<String, List<PreviousValue>> execute(DAOFactory daoFactory, AuthorityProvider
authorityProvider) {
         ActionDAO actionDao = daoFactory.getActionDAO();
-        return actionDao.getPreviousValues(processorId);
+        return actionDao.getPreviousValues(componentId);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bb628b07/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/impl/StandardAuditService.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/impl/StandardAuditService.java
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/impl/StandardAuditService.java
index 127f1df..721e6b2 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/impl/StandardAuditService.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/impl/StandardAuditService.java
@@ -81,7 +81,7 @@ public class StandardAuditService implements AuditService {
     }
 
     @Override
-    public Map<String, List<PreviousValue>> getPreviousValues(String processorId)
{
+    public Map<String, List<PreviousValue>> getPreviousValues(String componentId)
{
         Transaction transaction = null;
         Map<String, List<PreviousValue>> previousValues = null;
 
@@ -91,7 +91,7 @@ public class StandardAuditService implements AuditService {
             transaction = transactionBuilder.start();
 
             // seed the accounts
-            GetPreviousValues getActions = new GetPreviousValues(processorId);
+            GetPreviousValues getActions = new GetPreviousValues(componentId);
             previousValues = transaction.execute(getActions);
 
             // commit the transaction


Mime
View raw message