You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2018/09/20 18:59:11 UTC

nifi-minifi-cpp git commit: MINIFICPP-610: Add description to types

Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 2b0a55e4a -> 06d248008


MINIFICPP-610: Add description to types

This closes #399.

Signed-off-by: Aldrin Piri <al...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/06d24800
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/06d24800
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/06d24800

Branch: refs/heads/master
Commit: 06d248008ffd7df992409637de282932b64eb360
Parents: 2b0a55e
Author: Marc Parisi <ph...@apache.org>
Authored: Mon Sep 17 16:42:57 2018 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Thu Sep 20 14:58:40 2018 -0400

----------------------------------------------------------------------
 C2.md                                           | 17 +++-
 CMakeLists.txt                                  | 15 ++-
 extensions/bootstrap/CMakeLists.txt             | 41 +++++++++
 extensions/bootstrap/bootstrap.cpp              | 59 ++++++++++++
 extensions/bootstrap/docs/generatec2docs.h      | 95 +++++++++++++++++++
 libminifi/CMakeLists.txt                        |  1 -
 libminifi/include/agent/agent_docs.h            | 60 ++++++++++++
 .../include/core/state/nodes/AgentInformation.h | 97 ++++----------------
 libminifi/include/utils/StringUtils.h           | 18 +++-
 9 files changed, 317 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/C2.md
----------------------------------------------------------------------
diff --git a/C2.md b/C2.md
index d6ebf1c..4a3daa4 100644
--- a/C2.md
+++ b/C2.md
@@ -307,4 +307,19 @@ C2UpdatePolicy. The service supports several configuration options. They are def
 	    Disallowed Properties:
 	    		 Property_3:true
 	             Property_4:true
-	
\ No newline at end of file
+	
+### Update Type Descriptions
+
+Type descriptions ( class descriptions entered in PROCESSORS.md ) can be automatically placed within C2 by building cmake with
+the following flag:
+
+	cmake -DBOOTSTRAP=ON .. 
+	
+	You can then run ./extensions/bootstrap/bstrp --inputc2docs <PROCESSORS.md> --outputc2docs ../libminifi/include/agent/agent_docs.h
+	
+ When cmake is instantiated with this, a build will re-generate the type descriptions from PROCESSORS.md. Once this is finished
+ you may re-build the project with the following command from the build directory, running the build as you normally would: 
+
+	cmake -DBOOTSTRAP= ..  
+ 	
+ 	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e70d9f8..1325fbc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -325,7 +325,20 @@ else()
     createExtension(EXPRESSION-LANGUAGE-EXTENSIONS "EXPRESSION LANGUAGE EXTENSIONS" "This enables NiFi expression language" "extensions/expression-language" "${TEST_DIR}/expression-language-tests")
 endif()
 
-
+if(BOOTSTRAP)
+    add_subdirectory(thirdparty/cxxopts)
+    createExtension(BOOTSTRAP "BOOTSTRAP" "Bootstraps documentation and other features" "extensions/bootstrap")
+	execute_process(COMMAND ${CMAKE_BINARY_DIR}/extensions/bootstrap/bstrp --inputc2docs "${CMAKE_SOURCE_DIR}/PROCESSORS.md" --outputc2docs "${CMAKE_SOURCE_DIR}/libminifi/include/agent/agent_docs.h")
+    return()
+endif()
+
+execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
+                        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+                        -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
+                        -DBOOTSTRAP=ON
+                        ${CMAKE_SOURCE_DIR}
+               WORKING_DIRECTORY "${workdir}")
+               
 add_subdirectory(libminifi)
 
 #### EXTENSIONS

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/extensions/bootstrap/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/bootstrap/CMakeLists.txt b/extensions/bootstrap/CMakeLists.txt
new file mode 100644
index 0000000..40d6b99
--- /dev/null
+++ b/extensions/bootstrap/CMakeLists.txt
@@ -0,0 +1,41 @@
+#
+# 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.
+#
+
+cmake_minimum_required(VERSION 2.6)
+
+include_directories(../../libminifi/include ../thirdparty/cxxopts/include)
+
+set(BOOTSTRAP_SOURCES  bootstrap.cpp)
+add_executable(bstrp ${BOOTSTRAP_SOURCES})
+
+target_link_libraries(bstrp cxxopts)
+
+set_target_properties(bstrp
+        PROPERTIES OUTPUT_NAME bstrp)
+
+
+add_custom_target(bootstrap-docs
+  COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bstrp --inputc2docs "${CMAKE_SOURCE_DIR}/PROCESSORS.md" --outputc2docs "${CMAKE_SOURCE_DIR}/libminifi/include/agent/agent_docs.h"
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+  COMMENT "Generates documentation ${CMAKE_CURRENT_SOURCE_DIR}"
+  SOURCES ${BOOTSTRAP_SOURCES}
+)
+
+execute_process(COMMAND bootstrap-docs)
+

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/extensions/bootstrap/bootstrap.cpp
----------------------------------------------------------------------
diff --git a/extensions/bootstrap/bootstrap.cpp b/extensions/bootstrap/bootstrap.cpp
new file mode 100644
index 0000000..46966ee
--- /dev/null
+++ b/extensions/bootstrap/bootstrap.cpp
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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.
+ */
+#include <stdio.h>
+#include <signal.h>
+#include <vector>
+#include <queue>
+#include <map>
+#include <unistd.h>
+
+#include "cxxopts.hpp"
+#include "docs/generatec2docs.h"
+
+int main(int argc, char **argv) {
+  cxxopts::Options options("Bootstrap", "Build bootstrap");
+  options.positional_help("[optional args]").show_positional_help();
+
+  options.add_options()  //NOLINT
+  ("h,help", "Shows Help")  //NOLINT
+  ("inputc2docs", "Input C2 documentation readme", cxxopts::value<std::string>()) //NOLINT
+  ("outputc2docs", "Specifies output directory for generated C2 documentation", cxxopts::value<std::string>());
+
+  try {
+    auto result = options.parse(argc, argv);
+
+    if (result.count("help")) {
+      std::cout << options.help( { "", "Group" }) << std::endl;
+      exit(0);
+    }
+
+    if (result.count("inputc2docs") && result.count("outputc2docs")) {
+      generateC2Docs(result["inputc2docs"].as<std::string>(),result["outputc2docs"].as<std::string>());
+      std::cout << "Generated docs at " << result["outputc2docs"].as<std::string>() << std::endl;
+    }
+
+  }catch (const std::exception &exc)
+  {
+      // catch anything thrown within try block that derives from std::exception
+      std::cerr << exc.what() << std::endl;
+  } catch (...) {
+    std::cout << options.help( { "", "Group" }) << std::endl;
+    exit(0);
+  }
+  return 0;
+}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/extensions/bootstrap/docs/generatec2docs.h
----------------------------------------------------------------------
diff --git a/extensions/bootstrap/docs/generatec2docs.h b/extensions/bootstrap/docs/generatec2docs.h
new file mode 100644
index 0000000..bcb3a3e
--- /dev/null
+++ b/extensions/bootstrap/docs/generatec2docs.h
@@ -0,0 +1,95 @@
+/**
+ *
+ * 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.
+ */
+
+#include <string>
+#include <fstream>
+#include <streambuf>
+#include <iostream>
+#include <regex>
+#include <iomanip>
+#include "utils/StringUtils.h"
+
+std::string toHex(const std::string& s) {
+  std::ostringstream ret;
+
+  for (std::string::size_type i = 0; i < s.length(); ++i)
+    ret << std::hex << std::setfill('0') << std::setw(2) << (int) s[i];
+
+  return ret.str();
+}
+
+int generateC2Docs(const std::string &inputfile, const std::string &output) {
+  std::ifstream inf(inputfile);
+  std::string input((std::istreambuf_iterator<char>(inf)), std::istreambuf_iterator<char>());
+  std::smatch m;
+  std::smatch n;
+  std::regex e("## ([A-Za-z]+)\\s+### Description\\s");
+
+  std::ofstream outputFile(output);
+  outputFile << "/*" \
+ "*" \
+ "* Licensed to the Apache Software Foundation (ASF) under one or more\n" \
+ "* contributor license agreements.  See the NOTICE file distributed with\n" \
+ "* this work for additional information regarding copyright ownership.\n" \
+ "* The ASF licenses this file to You under the Apache License, Version 2.0\n" \
+ "* (the \"License\"); you may not use this file except in compliance with\n" \
+ "* the License.  You may obtain a copy of the License at\n" \
+     "*\n" \
+     "*     http://www.apache.org/licenses/LICENSE-2.0\n" \
+     "*\n" \
+     "* Unless required by applicable law or agreed to in writing, software\n" \
+     "* distributed under the License is distributed on an \"AS IS\" BASIS,\n" \
+     "* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" \
+     "* See the License for the specific language governing permissions and\n" \
+     "* limitations under the License.\n" \
+     "*/\n" \
+      "#ifndef AGENT_DOCS_H" << '\n';
+  outputFile << "#define AGENT_DOCS_H" << '\n';
+  outputFile << "#include <string>\n#include <stdlib.h>\n#include <utils/StringUtils.h>\n";
+  outputFile << "namespace org {\n "
+             "namespace apache { \n"
+             "namespace nifi { \n"
+             "namespace minifi { \n"
+             "class AgentDocs{ \n"
+             " public: \n"
+             "     static std::string getDescription(const std::string &feature){ \n"
+             "      static std::map<std::string,std::string>  extensions; \n"
+             "       if (extensions.empty()){ \n";
+
+  while (std::regex_search(input, m, e)) {
+    auto processor = m[1].str();
+
+    input = m.suffix().str();
+
+    auto nextBlock = input.find("###");
+
+    auto description = input.substr(0, nextBlock);
+
+    auto desc = org::apache::nifi::minifi::utils::StringUtils::trim(description);
+    outputFile << "     extensions.insert(std::make_pair(\"" << processor << "\",utils::StringUtils::hex_ascii(\"" << toHex(desc) << "\")));\n";
+  }
+
+  outputFile << "}\n    return extensions[feature]; \n"
+             " \n} \n}; \n} \n} \n} \n} \n"
+             "#endif";
+
+  outputFile.close();
+
+  return 0;
+}
+

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/libminifi/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/libminifi/CMakeLists.txt b/libminifi/CMakeLists.txt
index 46f276e..20119ba 100644
--- a/libminifi/CMakeLists.txt
+++ b/libminifi/CMakeLists.txt
@@ -140,5 +140,4 @@ set_target_properties(minifi PROPERTIES LINK_FLAGS "${LINK_FLAGS} /WHOLEARCHIVE:
 endif()
 
 
-
 SET (LIBMINIFI core-minifi PARENT_SCOPE)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/libminifi/include/agent/agent_docs.h
----------------------------------------------------------------------
diff --git a/libminifi/include/agent/agent_docs.h b/libminifi/include/agent/agent_docs.h
new file mode 100644
index 0000000..4b68d08
--- /dev/null
+++ b/libminifi/include/agent/agent_docs.h
@@ -0,0 +1,60 @@
+/*** 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.
+*/
+#ifndef AGENT_DOCS_H
+#define AGENT_DOCS_H
+#include <string>
+#include <stdlib.h>
+#include <utils/StringUtils.h>
+namespace org {
+ namespace apache { 
+namespace nifi { 
+namespace minifi { 
+
+class AgentDocs{ 
+ public: 
+     static std::string getDescription(const std::string &feature){ 
+      static std::map<std::string,std::string>  extensions; 
+       if (extensions.empty()){ 
+     extensions.insert(std::make_pair("AppendHostInfo",utils::StringUtils::hex_ascii("417070656e647320686f737420696e666f726d6174696f6e2073756368206173204950206164647265737320616e6420686f73746e616d652020617320616e2061747472696275746520746f0a696e636f6d696e6720666c6f7766696c65732e")));
+     extensions.insert(std::make_pair("ApplyTemplate",utils::StringUtils::hex_ascii("4170706c69657320746865206d757374616368652074656d706c6174652073706563696669656420627920746865202254656d706c617465222070726f706572747920616e64207772697465730a746865206f757470757420746f2074686520666c6f772066696c6520636f6e74656e742e20466c6f7746696c6520617474726962757465732061726520757365642061732074656d706c6174650a706172616d65746572732e")));
+     extensions.insert(std::make_pair("CapturePacket",utils::StringUtils::hex_ascii("436170747572655061636b657420636170747572657320616e6420777269746573206f6e65206f72206d6f7265207061636b65747320696e746f206120504341502066696c6520746861742077696c6c20626520757365642061732074686520636f6e74656e740a6f66206120666c6f772066696c652e20436f6e66696775726174696f6e206f7074696f6e7320657869737420746f2061646a75737420746865206261746368696e67206f6620504341502066696c65732e2050434150206261746368696e672077696c6c200a706c61636520612073696e676c65205043415020696e746f206120666c6f772066696c652e204120726567756c61722065787072657373696f6e2073656c65637473206e6574776f726b20696e74657266616365732e20426c7565746f6f7468200a6e6574776f726b20696e74657266616365732063616e2062652073656c6563746564207468726f7567682061207365706172617465206f7074696f6e2e")));
+     extensions.insert(std::make_pair("ExecuteProcess",utils::StringUtils::hex_ascii("52756e7320616e206f7065726174696e672073797374656d20636f6d6d616e642073706563696669656420627920746865207573657220616e642077726974657320746865206f7574707574206f660a7468617420636f6d6d616e6420746f206120466c6f7746696c652e2049662074686520636f6d6d616e6420697320657870656374656420746f206265206c6f6e672d72756e6e696e672c207468650a50726f636573736f722063616e206f757470757420746865207061727469616c2064617461206f6e20612073706563696669656420696e74657276616c2e205768656e2074686973206f7074696f6e0a697320757365642c20746865206f757470757420697320657870656374656420746f20626520696e207465787475616c20666f726d61742c206173206974207479706963616c6c7920646f65730a6e6f74206d616b652073656e736520746f2073706c69742062696e6172792064617461206f6e206172626974726172792074696d652d626173656420696e74657276616c732e")));
+     extensions.insert(std::make_pair("ExecuteScript",utils::StringUtils::hex_ascii("457865637574657320612073637269707420676976656e2074686520666c6f772066696c6520616e6420612070726f636573732073657373696f6e2e20546865207363726970742069730a726573706f6e7369626c6520666f722068616e646c696e672074686520696e636f6d696e6720666c6f772066696c6520287472616e7366657220746f2053554343455353206f722072656d6f76652c0a652e672e292061732077656c6c20617320616e7920666c6f772066696c6573206372656174656420627920746865207363726970742e204966207468652068616e646c696e672069730a696e636f6d706c657465206f7220696e636f72726563742c207468652073657373696f6e2077696c6c20626520726f6c6c6564206261636b2e0a0a53637269707473206d75737420646566696e6520616e206f6e547269676765722066756e6374696f6e2077686963682061636365707473204e69466920436f6e7465787420616e640a50726f7065727479206f626a656374732e20466f7220656666696369656e63792c207363726970747320617265206578656375746564206f6e6365207768656e207468652070726f636573736f720a69732072756e2c207468656e20746865
 206f6e54726967676572206d6574686f642069732063616c6c656420666f72206561636820696e636f6d696e6720666c6f7766696c652e20546869730a656e61626c6573207363726970747320746f206b656570207374617465206966207468657920776973682c20616c74686f7567682074686572652077696c6c2062652061207363726970740a636f6e746578742070657220636f6e63757272656e74207461736b206f66207468652070726f636573736f722e20496e206f7264657220746f2c20652e672e2c20636f6d7075746520616e0a61726974686d657469632073756d206261736564206f6e20696e636f6d696e6720666c6f772066696c6520696e666f726d6174696f6e2c207365742074686520636f6e63757272656e740a7461736b7320746f20312e0a0a4d756c7469706c65207661726961626c6573206172652070726f7669646564206175746f6d61746963616c6c7920746f2073637269707420636f6e74657874733a0a0a7c204e616d65207c20507572706f7365207c0a7c202d207c202d207c0a7c20606c6f6760207c20746865206c6f6767696e67206f626a656374207573656420666f72206c6f6767696e672064656275672c20696e666f2c207761726e2c20616e64206572726f72207c0a7c206052454c5f5355434345535360207c207468652022737
 56363657373222072656c6174696f6e73686970207c0a7c206052454c5f4641494c55524560207c2074686520226661696c757265222072656c6174696f6e73686970207c")));
+     extensions.insert(std::make_pair("ExecuteSQL",utils::StringUtils::hex_ascii("457865637574652070726f76696465642053514c2071756572792e20517565727920726573756c7420726f77732077696c6c206265206f7574707574746564206173206e657720666c6f770a66696c6573207769746820617474726962757465206b65797320657175616c20746f20726573756c7420636f6c756d6e206e616d657320616e642076616c75657320657175616c20746f0a726573756c742076616c7565732e2054686572652077696c6c206265206f6e65206f757470757420466c6f7746696c652070657220726573756c7420726f772e20546869732070726f636573736f720a63616e206265207363686564756c656420746f2072756e207573696e6720746865207374616e646172642074696d65722d6261736564207363686564756c696e67206d6574686f64732c206f720a69742063616e2062652074726967676572656420627920616e20696e636f6d696e6720466c6f7746696c652e2049662069742069732074726967676572656420627920616e20696e636f6d696e670a466c6f7746696c652c207468656e2061747472696275746573206f66207468617420466c6f7746696c652077696c6c20626520617661696c61626c65207768656e206576616
 c756174696e670a7468652071756572792e")));
+     extensions.insert(std::make_pair("GetFile",utils::StringUtils::hex_ascii("4372656174657320466c6f7746696c65732066726f6d2066696c657320696e2061206469726563746f72792e204e6946692077696c6c2069676e6f72652066696c657320697420646f65736e27740a68617665206174206c656173742072656164207065726d697373696f6e7320666f722e")));
+     extensions.insert(std::make_pair("GetUSBCamera",utils::StringUtils::hex_ascii("4765747320696d616765732066726f6d2055534220566964656f20436c6173732028555643292d636f6d70617469626c6520646576696365732e204f757470757473206f6e6520666c6f770a66696c6520706572206672616d6520617420746865207261746520737065636966696564206279207468652060465053602070726f706572747920696e2074686520666f726d61740a737065636966696564206279207468652060466f726d6174602070726f70657274792e0a0a43616d657261206672616d65732061726520636170747572656420696e2061207365706172617465206261636b67726f756e642074687265616420616e642061726520656d69747465642061730a666c6f772066696c65732075706f6e20636170747572652e20546865206f6e54726967676572206f6620746869732070726f636573736f722069732061204e4f4f5020616e642077696c6c0a7265706f727420616e206572726f7220696620696e707574732061726520666c6f77656420696e746f207468652070726f636573736f722e2042656361757365206f6620746869732c207468650a7374616e64617264206576656e742f74696d65722064726976656e207363686564756c696e672
 06f7074696f6e732068617665206e6f206566666563742e0a0a4966207468652057696474682f4865696768742070726f7065727469657320617265207365742c2074686520636c6f7365737420737570706f7274656420696d616765206672616d650a64696d656e73696f6e7320746f2074686520676976656e2057696474682f4865696768742070726f706572746965732061726520757365642e0a0a4966206e6f2057696474682f4865696768742070726f7065727469657320617265207365742c20616e64207468652063616d65726120737570706f727473206d756c7469706c6520696d6167650a73697a652f7175616c6974792073657474696e67732c207468652068696768657374207175616c6974792069732063686f73656e20666f722074686520676976656e204650532e20466f720a6578616d706c653a0a0a2d204966207468652046505320697320313020616e64207468652063616d65726120737570706f7274732061206d6178696d756d206f66203139323078313038302061742074686973204650532c0a20206f757470757420696d616765732077696c6c2062652031393230783738300a2d204966207468652046505320697320363020616e64207468652063616d65726120737570706f7274732061206d6178696d756d206f66203332307832343020
 61742074686973204650532c0a20206f757470757420696d616765732077696c6c2062652033323078323430")));
+     extensions.insert(std::make_pair("GenerateFlowFile",utils::StringUtils::hex_ascii("546869732070726f636573736f72206372656174657320466c6f7746696c657320776974682072616e646f6d2064617461206f7220637573746f6d20636f6e74656e742e0a47656e6572617465466c6f7746696c652069732075736566756c20666f72206c6f61642074657374696e672c20636f6e66696775726174696f6e2c20616e642073696d756c6174696f6e2e")));
+     extensions.insert(std::make_pair("InvokeHTTP",utils::StringUtils::hex_ascii("416e204854545020636c69656e742070726f636573736f722077686963682063616e20696e7465726163742077697468206120636f6e666967757261626c65204854545020456e64706f696e742e0a5468652064657374696e6174696f6e2055524c20616e642048545450204d6574686f642061726520636f6e666967757261626c652e20466c6f7746696c652061747472696275746573206172650a636f6e76657274656420746f2048545450206865616465727320616e642074686520466c6f7746696c6520636f6e74656e74732061726520696e636c756465642061732074686520626f6479206f660a746865207265717565737420286966207468652048545450204d6574686f64206973205055542c20504f5354206f72205041544348292e")));
+     extensions.insert(std::make_pair("LogAttribute",utils::StringUtils::hex_ascii("4c6f67732061747472696275746573206f6620666c6f772066696c657320696e20746865204d694e694669206170706c69636174696f6e206c6f672e")));
+     extensions.insert(std::make_pair("ListenHTTP",utils::StringUtils::hex_ascii("53746172747320616e20485454502053657276657220616e64206c697374656e73206f6e206120676976656e2062617365207061746820746f207472616e73666f726d20696e636f6d696e670a726571756573747320696e746f20466c6f7746696c65732e205468652064656661756c7420555249206f662074686520536572766963652077696c6c2062650a60687474703a2f2f7b686f73746e616d657d3a7b706f72747d2f636f6e74656e744c697374656e6572602e204f6e6c7920484541442c20504f53542c20616e6420474554207265717565737473206172650a737570706f727465642e205055542c20616e642044454c4554452077696c6c20726573756c7420696e20616e206572726f7220616e6420746865204854545020726573706f6e73650a73746174757320636f6465203430352e0a0a54686520726573706f6e736520626f6479207465787420666f7220616c6c2072657175657374732c2062792064656661756c742c20697320656d70747920286c656e677468206f662030292e20410a73746174696320726573706f6e736520626f64792063616e2062652073657420666f72206120676976656e205552492062792073656e64696e6720696e7075742
 066696c657320746f0a4c697374656e485454502077697468207468652060687474702e7479706560206174747269627574652073657420746f2060726573706f6e73655f626f6479602e2054686520726573706f6e73650a626f647920466c6f7746696c65206066696c656e616d65602061747472696275746520697320617070656e64656420746f207468652060426173652050617468602070726f70657274790a28736570617261746564206279206120602f6029207768656e206d617070656420746f20696e636f6d696e672072657175657374732e2054686520606d696d652e74797065600a617474726962757465206f662074686520726573706f6e736520626f647920466c6f7746696c65206973207573656420666f72207468652060436f6e74656e742d7479706560206865616465720a696e20726573706f6e7365732e20526573706f6e736520626f647920636f6e74656e742063616e20626520636c65617265642062792073656e64696e6720616e20656d707479202873697a652030290a466c6f7746696c6520666f72206120676976656e20555249206d617070696e672e")));
+     extensions.insert(std::make_pair("ListenSyslog",utils::StringUtils::hex_ascii("4c697374656e7320666f72205379736c6f67206d65737361676573206265696e672073656e7420746f206120676976656e20706f7274206f76657220544350206f72205544502e0a496e636f6d696e67206d657373616765732061726520636865636b656420616761696e737420726567756c61722065787072657373696f6e7320666f72205246433534323420616e640a5246433331363420666f726d6174746564206d657373616765732e2054686520666f726d6174206f662065616368206d6573736167652069733a0a285c3c5052494f524954595c3e292856455253494f4e20292854494d455354414d50292028484f53544e414d45292028424f4459292077686572652076657273696f6e2069730a6f7074696f6e616c2e205468652074696d657374616d702063616e20626520616e20524643353432342074696d657374616d702077697468206120666f726d6174206f660a22797979792d4d4d2d646427542748483a6d6d3a73732e535a22206f722022797979792d4d4d2d646427542748483a6d6d3a73732e532b68683a6d6d222c206f722069742063616e20626520616e0a524643333136342074696d657374616d702077697468206120666f726d6174206
 f6620224d4d4d20642048483a6d6d3a7373222e20496620616e20696e636f6d696e67206d657373616765730a6d617463686573206f6e65206f66207468657365207061747465726e732c20746865206d6573736167652077696c6c2062652070617273656420616e642074686520696e646976696475616c0a7069656365732077696c6c20626520706c6163656420696e20466c6f7746696c6520617474726962757465732c207769746820746865206f726967696e616c206d65737361676520696e207468650a636f6e74656e74206f662074686520466c6f7746696c652e20496620616e20696e636f6d696e67206d65737361676520646f6573206e6f74206d61746368206f6e65206f662074686573650a7061747465726e732069742077696c6c206e6f742062652070617273656420616e6420746865207379736c6f672e76616c6964206174747269627574652077696c6c2062652073657420746f0a66616c7365207769746820746865206f726967696e616c206d65737361676520696e2074686520636f6e74656e74206f662074686520466c6f7746696c652e2056616c6964206d657373616765730a77696c6c206265207472616e73666572726564206f6e2074686520737563636573732072656c6174696f6e736869702c20616e6420696e76616c6964206d65737361
 6765732077696c6c2062650a7472616e73666572726564206f6e2074686520696e76616c69642072656c6174696f6e736869702e")));
+     extensions.insert(std::make_pair("PutFile",utils::StringUtils::hex_ascii("5772697465732074686520636f6e74656e7473206f66206120466c6f7746696c6520746f20746865206c6f63616c2066696c652073797374656d")));
+     extensions.insert(std::make_pair("PutSQL",utils::StringUtils::hex_ascii("457865637574657320612053514c20555044415445206f7220494e5345525420636f6d6d616e642e2054686520636f6e74656e74206f6620616e20696e636f6d696e6720466c6f7746696c652069730a657870656374656420746f206265207468652053514c20636f6d6d616e6420746f20657865637574652e205468652053514c20636f6d6d616e64206d6179207573652074686520603f600a63686172616374657220746f2062696e6420706172616d65746572732e20496e207468697320636173652c2074686520706172616d657465727320746f20757365206d7573742065786973742061730a466c6f7746696c652061747472696275746573207769746820746865206e616d696e6720636f6e76656e74696f6e206073716c2e617267732e4e2e747970656020616e640a6073716c2e617267732e4e2e76616c7565602c20776865726520604e60206973206120706f73697469766520696e74656765722e2054686520636f6e74656e74206f66207468650a466c6f7746696c6520697320657870656374656420746f20626520696e205554462d3820666f726d61742e")));
+     extensions.insert(std::make_pair("RouteOnAttribute",utils::StringUtils::hex_ascii("526f7574657320466c6f7746696c6573206261736564206f6e2074686569722041747472696275746573207573696e6720746865204174747269627574652045787072657373696f6e204c616e67756167652e")));
+     extensions.insert(std::make_pair("TailFile",utils::StringUtils::hex_ascii("225461696c732220612066696c652c206f722061206c697374206f662066696c65732c20696e67657374696e6720646174612066726f6d207468652066696c652061732069742069730a7772697474656e20746f207468652066696c652e205468652066696c6520697320657870656374656420746f206265207465787475616c2e204461746120697320696e676573746564206f6e6c790a7768656e2061206e6577206c696e6520697320656e636f756e7465726564202863617272696167652072657475726e206f72206e65772d6c696e6520636861726163746572206f720a636f6d62696e6174696f6e292e204966207468652066696c6520746f207461696c20697320706572696f646963616c6c792022726f6c6c6564206f766572222c2061732069730a67656e6572616c6c792074686520636173652077697468206c6f672066696c65732c20616e206f7074696f6e616c20526f6c6c696e672046696c656e616d65205061747465726e2063616e2062650a7573656420746f20726574726965766520646174612066726f6d2066696c65732074686174206861766520726f6c6c6564206f7665722c206576656e2069662074686520726f6c6c6f7665720a6f636375727
 26564207768696c65204e69466920776173206e6f742072756e6e696e67202870726f76696465642074686174207468652064617461207374696c6c206578697374732075706f6e0a72657374617274206f66204e694669292e2049742069732067656e6572616c6c7920616476697361626c6520746f20736574207468652052756e205363686564756c6520746f2061206665770a7365636f6e64732c20726174686572207468616e2072756e6e696e672077697468207468652064656661756c742076616c7565206f66203020736563732c20617320746869730a50726f636573736f722077696c6c20636f6e73756d652061206c6f74206f66207265736f7572636573206966207363686564756c6564207665727920616767726573736976656c792e2041740a746869732074696d652c20746869732050726f636573736f7220646f6573206e6f7420737570706f727420696e67657374696e672066696c657320746861742068617665206265656e0a636f6d70726573736564207768656e2027726f6c6c6564206f766572272e")));
+     extensions.insert(std::make_pair("TFApplyGraph",utils::StringUtils::hex_ascii("4170706c69657320612054656e736f72466c6f7720677261706820746f207468652074656e736f722070726f746f62756620737570706c69656420617320696e7075742e205468652074656e736f720a69732066656420696e746f20746865206e6f646520737065636966696564206279207468652060496e707574204e6f6465602070726f70657274792e20546865206f75747075740a466c6f7746696c6520697320612074656e736f722070726f746f627566206578747261637465642066726f6d20746865206e6f6465207370656369666965642062792074686520604f75747075740a4e6f6465602070726f70657274792e0a0a54656e736f72466c6f77206772617068732061726520726561642064796e616d6963616c6c792062792066656564696e6720612067726170682070726f746f62756620746f207468650a70726f636573736f72207769746820746865206074662e74797065602070726f70657274792073657420746f20606772617068602e")));
+     extensions.insert(std::make_pair("TFConvertImageToTensor",utils::StringUtils::hex_ascii("436f6e76657274732074686520696e70757420696d6167652066696c6520696e746f20612074656e736f722070726f746f6275662e2054686520696d6167652077696c6c20626520726573697a65640a746f2074686520676976656e206f75747075742074656e736f722064696d656e73696f6e732e")));
+     extensions.insert(std::make_pair("TFExtractTopLabels",utils::StringUtils::hex_ascii("45787472616374732074686520746f702035206c6162656c7320666f722063617465676f726963616c20696e666572656e6365206d6f64656c732e0a0a4c6162656c732061726520666564206173206e65776c696e652028605c6e6029202d64656c696d697465642066696c65732077686572652065616368206c696e652069732061206c6162656c0a666f72207468652074656e736f7220696e646578206571756976616c656e7420746f20746865206c696e65206e756d6265722e204c6162656c2066696c6573206d7573742062652066656420696e0a7769746820746865206074662e74797065602070726f70657274792073657420746f20606c6162656c73602e0a0a54686520746f702035206c6162656c7320617265207772697474656e20746f2074686520666f6c6c6f77696e6720617474726962757465733a0a0a2d2060746f705f6c6162656c5f30600a2d2060746f705f6c6162656c5f31600a2d2060746f705f6c6162656c5f32600a2d2060746f705f6c6162656c5f33600a2d2060746f705f6c6162656c5f3460")));
+}
+    return extensions[feature]; 
+ 
+} 
+}; 
+} 
+} 
+} 
+} 
+#endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/libminifi/include/core/state/nodes/AgentInformation.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/AgentInformation.h b/libminifi/include/core/state/nodes/AgentInformation.h
index 0a93149..7093250 100644
--- a/libminifi/include/core/state/nodes/AgentInformation.h
+++ b/libminifi/include/core/state/nodes/AgentInformation.h
@@ -50,6 +50,7 @@
 #include "Connection.h"
 #include "io/ClientSocket.h"
 #include "agent/agent_version.h"
+#include "agent/agent_docs.h"
 #include "agent/build_description.h"
 #include "core/ClassLoader.h"
 #include "core/state/nodes/StateMonitor.h"
@@ -236,6 +237,23 @@ class ComponentManifest : public DeviceInformation {
           }
           desc.children.push_back(relationships);
         }
+
+        auto lastOfIdx = group.class_name_.find_last_of(".");
+        std::string processorName = group.class_name_;
+        if (lastOfIdx != std::string::npos) {
+          lastOfIdx++;  // if a value is found, increment to move beyond the .
+          int nameLength = group.class_name_.length() - lastOfIdx;
+          processorName = group.class_name_.substr(lastOfIdx, nameLength);
+        }
+        auto description = AgentDocs::getDescription(processorName);
+
+        if (!description.empty()) {
+          SerializedResponseNode proc_desc;
+          proc_desc.name = "typeDescription";
+          proc_desc.value = description;
+          desc.children.push_back(proc_desc);
+        }
+
         desc.children.push_back(dyn_relat);
         desc.children.push_back(dyn_prop);
         desc.children.push_back(className);
@@ -266,7 +284,6 @@ class Bundles : public DeviceInformation {
 
   std::vector<SerializedResponseNode> serialize() {
     std::vector<SerializedResponseNode> serialized;
-
     for (auto group : AgentBuild::getExtensions()) {
       SerializedResponseNode bundle;
       bundle.name = "bundles";
@@ -572,84 +589,6 @@ class AgentInformation : public DeviceInformation, public AgentMonitor, public A
     return serialized;
   }
 
- protected:
-
-  void serializeClass(const std::vector<ClassDescription> &processors, const std::vector<ClassDescription> &controller_services, const std::vector<ClassDescription> &other_components,
-                      std::vector<SerializedResponseNode> &response) {
-    SerializedResponseNode resp;
-    resp.name = "componentManifest";
-    if (!processors.empty()) {
-      SerializedResponseNode type;
-      type.name = "Processors";
-
-      for (auto group : processors) {
-        SerializedResponseNode desc;
-
-        desc.name = group.class_name_;
-
-        if (!group.class_properties_.empty()) {
-          SerializedResponseNode props;
-          props.name = "properties";
-          for (auto && prop : group.class_properties_) {
-            SerializedResponseNode child;
-            child.name = prop.first;
-            child.value = prop.second.getDescription();
-            props.children.push_back(child);
-          }
-
-          desc.children.push_back(props);
-        }
-
-        SerializedResponseNode dyn_prop;
-        dyn_prop.name = "supportsDynamicProperties";
-        dyn_prop.value = group.dynamic_properties_;
-
-        desc.children.push_back(dyn_prop);
-
-        type.children.push_back(desc);
-      }
-
-      resp.children.push_back(type);
-
-    }
-
-    if (!controller_services.empty()) {
-      SerializedResponseNode type;
-      type.name = "ControllerServices";
-
-      for (auto group : controller_services) {
-        SerializedResponseNode desc;
-
-        desc.name = group.class_name_;
-
-        if (!group.class_properties_.empty()) {
-          SerializedResponseNode props;
-          props.name = "properties";
-          for (auto && prop : group.class_properties_) {
-            SerializedResponseNode child;
-            child.name = prop.first;
-            child.value = prop.second.getDescription();
-            props.children.push_back(child);
-          }
-
-          desc.children.push_back(props);
-        }
-
-        SerializedResponseNode dyn_prop;
-        dyn_prop.name = "supportsDynamicProperties";
-        dyn_prop.value = group.dynamic_properties_;
-
-        desc.children.push_back(dyn_prop);
-
-        type.children.push_back(desc);
-      }
-
-      resp.children.push_back(type);
-
-    }
-    response.push_back(resp);
-
-  }
 };
 
 REGISTER_RESOURCE(AgentInformation);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/06d24800/libminifi/include/utils/StringUtils.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/StringUtils.h b/libminifi/include/utils/StringUtils.h
index 24adae1..1e0c108 100644
--- a/libminifi/include/utils/StringUtils.h
+++ b/libminifi/include/utils/StringUtils.h
@@ -213,7 +213,18 @@ class StringUtils {
       return false;
     return std::equal(endString.rbegin(), endString.rend(), value.rbegin());
   }
-  
+
+  inline static std::string hex_ascii(const std::string& in) {
+    int len = in.length();
+    std::string newString;
+    for (int i = 0; i < len; i += 2) {
+      std::string sstr = in.substr(i, 2);
+      char chr = (char) (int) strtol(sstr.c_str(), 0x00, 16);
+      newString.push_back(chr);
+    }
+    return newString;
+  }
+
   static std::string replaceMap(std::string source_string, const std::map<std::string, std::string> &replace_map) {
     auto result_string = source_string;
 
@@ -221,14 +232,13 @@ class StringUtils {
     for (const auto &replace_pair : replace_map) {
       size_t replace_pos = 0;
       while ((replace_pos = source_string.find(replace_pair.first, replace_pos)) != std::string::npos) {
-        replacements.emplace_back(std::make_pair(replace_pos,
-                                                 std::make_pair(replace_pair.first.length(), replace_pair.second)));
+        replacements.emplace_back(std::make_pair(replace_pos, std::make_pair(replace_pair.first.length(), replace_pair.second)));
         replace_pos += replace_pair.first.length();
       }
     }
 
     std::sort(replacements.begin(), replacements.end(), [](const std::pair<size_t, std::pair<size_t, std::string>> a,
-                                                           const std::pair<size_t, std::pair<size_t, std::string>> &b) {
+        const std::pair<size_t, std::pair<size_t, std::string>> &b) {
       return a.first > b.first;
     });