szaszm commented on code in PR #1712:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1712#discussion_r1463510235
##########
extensions/python/ExecutePythonProcessor.h:
##########
@@ -118,7 +126,30 @@ class ExecutePythonProcessor : public core::Processor {
return description_;
}
+ void setPythonClassName(const std::string& python_class_name) {
+ python_class_name_ = python_class_name;
+ }
+
+ void setPythonPaths(const std::vector<std::filesystem::path>& python_paths) {
+ python_paths_ = python_paths;
+ }
+
+ protected:
+ core::Property* findProperty(const std::string& name) const override;
+
private:
+ enum class PropertyTypeCode : int64_t {
+ INTEGER_TYPE = 0,
+ LONG_TYPE = 1,
+ BOOLEAN_TYPE = 2,
+ DATA_SIZE_TYPE = 3,
+ TIME_PERIOD_TYPE = 4,
+ NON_BLANK_TYPE = 5,
+ PORT_TYPE = 6
+ };
Review Comment:
Is the naming directly coming from NiFi? If not, I'd drop the `_TYPE` suffix
of the alternatives. I also think we should consider moving this type and the
translate function near `core::PropertyType`, since it's related, general, and
not dependent on anything.
A reference to NiFi code or docs where these codes are defined would also be
nice, as a code comment.
##########
libminifi/include/core/ConfigurableComponent.h:
##########
@@ -212,6 +212,8 @@ class ConfigurableComponent {
// Dynamic properties
std::map<std::string, Property> dynamic_properties_;
+ virtual Property* findProperty(const std::string& name) const;
+
Review Comment:
I was under the impression that `getProperty` was already `virtual`, but
apparently that's not the case, so this new customization point makes sense
knowing this. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]