nifi/nifi-commons
Alessandro D'Armiento bb9758be2c
NIFI-6500 (Original commit messages left to preserve authorship credit for multiple contributors)
Expression Language now supports padding functions:
- padLeft:
  -  attr:padLeft(Int n, Char c) will prepend to the `attr` attributes the `c` character until the size `n` is reached
  -  attr:padLeft(Int n) will prepend to the `attr` attributes the `'_'` character until the size `n` is reached
- padRight:
  -  attr:padRight(Int n, Char c) will append to the `attr` attributes the `c` character until the size `n` is reached
  -  attr:padRight(Int n) will append to the `attr` attributes the `'_'` character until the size `n` is reached

- In both cases, the padding function returns the `attr` `String` as is if its length is already equal of higher than the desired size `n`
- Returns null if `attr` does not exist or in case desiredLenght is higher than Integer.MAX_INT

Further test cases:
- Returns null if the input string is null
- Returns a string full of padding if the input string is empty
Supports PaddingString instead of PaddingCharacter
Apply suggestions from code review
Applying style suggestions
Co-Authored-By: Marco Gaido <marcogaido91@gmail.com>
style fixes
style fixes
Padding returns input string instead of null in case desired length is missing, is negative, or is overflowing
Better tests
doc update
less verbose parser notation
Doc and style fixes
Fixed `StringEvaluator.evaluate()` after rebase
Applying nitpicking suggestion
Co-Authored-By: Marco Gaido <marcogaido91@gmail.com>
Fixed `PaddingEvaluator` constructor issue
Removed unused import

This closes #3615

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
2019-08-23 22:34:39 -04:00
..
nifi-data-provenance-utils NIFI-6182: Updated dependency on Lucene to Lucene 8.0.0. Updated code necessary to use the new API. Updated WriteAheadProvenanceRepository so that upon startup if provenance indexes are written using the old Lucene format, , they are considered 'defunct' and the events are re-indexed in a background thread into a new index that uses the Lucene 8 format and the old index is then removed. Added Provenance Repository that consists of about 30 events and added integration test to ensure that the repo can be started up/initialized when pointing to a prov repo that was written using the old lucene format. 2019-06-11 09:45:46 -04:00
nifi-expression-language NIFI-6500 (Original commit messages left to preserve authorship credit for multiple contributors) 2019-08-23 22:34:39 -04:00
nifi-flowfile-packager NIFI-6323 Changed URLs for repositories, project description, and mailing lists to use HTTPS. 2019-05-29 14:36:40 -04:00
nifi-hl7-query-language NIFI-5254 Upgraded Groovy to version 2.5.4 2019-07-11 14:17:35 -04:00
nifi-json-utils NIFI-5254 Upgraded Groovy to version 2.5.4 2019-07-11 14:17:35 -04:00
nifi-logging-utils NIFI-6323 Changed URLs for repositories, project description, and mailing lists to use HTTPS. 2019-05-29 14:36:40 -04:00
nifi-metrics NIFI-5373 Created new module nifi-metrics 2019-06-19 15:50:42 -04:00
nifi-parameter NIFI-6380: Introduced the notion of Parameters and Parameter Contexts to the code base. 2019-08-02 10:45:39 -04:00
nifi-properties NIFI-6502 RecordPath padding functions: 2019-08-19 17:26:19 -04:00
nifi-record NIFI-6442: ExecuteSQL/ExecuteSQLRecord convert to Avro date type incorrectly when set 'Use Avro Logical Types' to true 2019-07-19 14:47:07 +09:00
nifi-record-path NIFI-6502 RecordPath padding functions: 2019-08-19 17:26:19 -04:00
nifi-rocksdb-utils NIFI-4775: Updating documentation and updating rocksdb version 2019-08-15 15:28:48 +00:00
nifi-schema-utils NIFI-6323 Changed URLs for repositories, project description, and mailing lists to use HTTPS. 2019-05-29 14:36:40 -04:00
nifi-security-utils NIFI-5176 NiFI builds on Java 11 2019-08-13 18:41:39 -04:00
nifi-site-to-site-client NIFI-5176 NiFI builds on Java 11 2019-08-13 18:41:39 -04:00
nifi-socket-utils NIFI-6323 Changed URLs for repositories, project description, and mailing lists to use HTTPS. 2019-05-29 14:36:40 -04:00
nifi-utils NIFI-5176 NiFI builds on Java 11 2019-08-13 18:41:39 -04:00
nifi-web-utils NIFI-5254 Upgraded Groovy to version 2.5.4 2019-07-11 14:17:35 -04:00
nifi-write-ahead-log NIFI-6410: Addressed race condition in LengthDelimitedJournal in which a Thread could throw an Exception, then another Thread could update the Journal before the first thread closes it. Added unit test to replicate. 2019-07-02 10:15:52 -04:00
pom.xml NIFI-4775: FlowFile Repository implementation based on RocksDB 2019-08-12 19:03:38 +00:00