This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 0abaebc  MINIFICPP-1321 Add documentation to MergeContent's attribute 
strategy
0abaebc is described below

commit 0abaebc98e770789f785eb41867a75435d45722d
Author: Gabor Gyimesi <[email protected]>
AuthorDate: Wed Aug 26 13:13:32 2020 +0200

    MINIFICPP-1321 Add documentation to MergeContent's attribute strategy
    
    Signed-off-by: Marton Szasz <[email protected]>
    
    This closes #880
---
 PROCESSORS.md                          | 3 ++-
 extensions/libarchive/MergeContent.cpp | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/PROCESSORS.md b/PROCESSORS.md
index 05786d5..3aa7222 100644
--- a/PROCESSORS.md
+++ b/PROCESSORS.md
@@ -757,7 +757,8 @@ Merges a Group of FlowFiles together based on a 
user-defined strategy and packag
 In the list below, the names of required properties appear in bold. Any other 
properties (not in bold) are considered optional. The table also indicates any 
default values, and whether a property supports the NiFi Expression Language.
 
 | Name | Default Value | Allowable Values | Description | 
-| - | - | - | - | 
+| - | - | - | - |
+|Attribute Strategy|Keep Only Common Attributes|Keep Only Common 
Attributes<Br>Keep All Unique Attributes<Br>|Determines which FlowFile 
attributes should be added to the bundle. If 'Keep All Unique Attributes' is 
selected, any attribute on any FlowFile that gets bundled will be kept unless 
its value conflicts with the value from another FlowFile (in which case 
neither, or none, of the conflicting attributes will be kept). If 'Keep Only 
Common Attributes' is selected, only the attributes  [...]
 |Correlation Attribute Name|||Correlation Attribute Name|
 |Delimiter Strategy|Filename||Determines if Header, Footer, and Demarcator 
should point to files|
 |Demarcator File|||Filename specifying the demarcator to use|
diff --git a/extensions/libarchive/MergeContent.cpp 
b/extensions/libarchive/MergeContent.cpp
index dbbe7e0..25a32d1 100644
--- a/extensions/libarchive/MergeContent.cpp
+++ b/extensions/libarchive/MergeContent.cpp
@@ -66,7 +66,10 @@ core::Property MergeContent::KeepPath(
   ->withDefaultValue(false)->build());
 core::Property MergeContent::AttributeStrategy(
   core::PropertyBuilder::createProperty("Attribute Strategy")
-  ->withDescription("Determines which FlowFile attributes should be added to 
the bundle. If 'Keep All Unique Attributes' is selected, any attribute on any 
FlowFile that gets bundled will be kept unless its value conflicts with the 
value from another FlowFile. If 'Keep Only Common Attributes' is selected, only 
the attributes that exist on all FlowFiles in the bundle, with the same value, 
will be preserved.")
+  ->withDescription("Determines which FlowFile attributes should be added to 
the bundle. If 'Keep All Unique Attributes' is selected, "
+                    "any attribute on any FlowFile that gets bundled will be 
kept unless its value conflicts with the value from another FlowFile "
+                    "(in which case neither, or none, of the conflicting 
attributes will be kept). If 'Keep Only Common Attributes' is selected, "
+                    "only the attributes that exist on all FlowFiles in the 
bundle, with the same value, will be preserved.")
   
->withAllowableValues<std::string>({merge_content_options::ATTRIBUTE_STRATEGY_KEEP_COMMON,
 merge_content_options::ATTRIBUTE_STRATEGY_KEEP_ALL_UNIQUE})
   
->withDefaultValue(merge_content_options::ATTRIBUTE_STRATEGY_KEEP_COMMON)->build());
 core::Relationship MergeContent::Merge("merged", "The FlowFile containing the 
merged content");

Reply via email to