[GitHub] nifi pull request #1953: NIFI-4130 Add lookup controller service in Transfor...

2018-11-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/nifi/pull/1953


---


[GitHub] nifi pull request #1953: NIFI-4130 Add lookup controller service in Transfor...

2018-11-13 Thread bdesert
Github user bdesert commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1953#discussion_r233016908
  
--- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java
 ---
@@ -82,12 +94,32 @@
 
 public static final PropertyDescriptor XSLT_FILE_NAME = new 
PropertyDescriptor.Builder()
 .name("XSLT file name")
-.description("Provides the name (including full path) of the 
XSLT file to apply to the flowfile XML content.")
-.required(true)
+.description("Provides the name (including full path) of the 
XSLT file to apply to the flowfile XML content."
++ "One of the XSLT file name and XSLT controller 
properties must be defined.")
+.required(false)
 
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
 .addValidator(StandardValidators.FILE_EXISTS_VALIDATOR)
 .build();
 
+public static final PropertyDescriptor XSLT_CONTROLLER = new 
PropertyDescriptor.Builder()
+.name("xslt-controller")
+.displayName("XSLT controller")
--- End diff --

"XSLT Lookup" Would be more readable. 
Description: "Lookup controller used to store..."
And: XSLT_CONTROLLER_KEY: "XSLT Lookup Key" (description looks fine)


---


[GitHub] nifi pull request #1953: NIFI-4130 Add lookup controller service in Transfor...

2018-11-13 Thread bdesert
Github user bdesert commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1953#discussion_r233019686
  
--- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java
 ---
@@ -82,12 +94,32 @@
 
 public static final PropertyDescriptor XSLT_FILE_NAME = new 
PropertyDescriptor.Builder()
 .name("XSLT file name")
-.description("Provides the name (including full path) of the 
XSLT file to apply to the flowfile XML content.")
-.required(true)
+.description("Provides the name (including full path) of the 
XSLT file to apply to the flowfile XML content."
++ "One of the XSLT file name and XSLT controller 
properties must be defined.")
+.required(false)
 
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
 .addValidator(StandardValidators.FILE_EXISTS_VALIDATOR)
 .build();
 
+public static final PropertyDescriptor XSLT_CONTROLLER = new 
PropertyDescriptor.Builder()
+.name("xslt-controller")
+.displayName("XSLT controller")
+.description("Controller used to store XSLT definitions. One 
of the XSLT file name and "
++ "XSLT controller properties must be defined.")
+.required(false)
+.identifiesControllerService(StringLookupService.class)
+.build();
+
+public static final PropertyDescriptor XSLT_CONTROLLER_KEY = new 
PropertyDescriptor.Builder()
+.name("xslt-controller-key")
+.displayName("XSLT controller key")
+.description("Key used to retrieve the XSLT definition from 
the XSLT controller. This property must be set when using "
++ "the XSLT controller property.")
+.required(false)
+
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
--- End diff --

since this property supports EL, shouldn't it be NON_EMPTY_**EL**_VALIDATOR?


---


[GitHub] nifi pull request #1953: NIFI-4130 Add lookup controller service in Transfor...

2017-06-27 Thread pvillard31
GitHub user pvillard31 opened a pull request:

https://github.com/apache/nifi/pull/1953

NIFI-4130 Add lookup controller service in TransformXML to define XSL…

…T from the UI

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [X] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [X] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.

- [X] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [X] Is your initial contribution a single, squashed commit?

### For code changes:
- [X] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [X] Have you written or updated unit tests to verify your changes?
- [X] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/pvillard31/nifi xslt-text-property

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/1953.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1953


commit dccf15527f64ad7629b90e490b2261321df8ee96
Author: Pierre Villard 
Date:   2017-06-26T15:48:06Z

NIFI-4130 Add lookup controller service in TransformXML to define XSLT from 
the UI




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---