Russell,
   I agree the syntax for multiple DynamicProperties is a little awkward,
and that our documentation could be improved in this situation(I didn't see
reference to @DynamicProperty in the developer doc).

   Also Java8 supports the concept of repeatable annotations[1], which
would erase the need for the @DynamicProperties by allowing you to specify
multiple @DynamicProperty annotations on a single class.  Since NiFi
appears to be running on Java8, I think we should create a ticket to update
the documentation generation code to handle repeated annotations, and
update our processors/controller services/reporting tasks to use them.  We
should also create a ticket to update the developer documentation to
describe the annotations usage.

[1] http://docs.oracle.com/javase/tutorial/java/annotations/repeating.html

Dan

On Tue, Apr 19, 2016 at 7:23 AM Russell Bateman <
[email protected]> wrote:

> Thanks, Joe. This worked.
>
> You know, I'm just the sort of guy that would add stuff like that to the
> documentation if the way were smoothed to it. The problem as I see it
> with NiFi doc is that it's really good the way it is and if we add
> more--and we should--it's going to get longer and harder to read.
> Someone should slightly redesign it with links to subordinate documents
> to avoid making it too complicated yet give folk a place to go for
> deeper help. I would be happy to help out once such a thing as that is
> decided.
>
> Russ
>
> On 04/15/2016 06:39 PM, Joe Percivall wrote:
> > Hello Russell,
> >
> > The annotation you are looking for is @DynamicProperties[1] an example
> of it in use is in the PutFTP processor[2].
> >
> > [1]
> https://github.com/apache/nifi/blob/e4b7e47836edf47042973e604005058c28eed23b/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperties.java
> > [2]
> https://github.com/apache/nifi/blob/e4b7e47836edf47042973e604005058c28eed23b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFTP.java#L50
> >
> >
> > Hope that helps,
> > Joe
> >
> > - - - - - -
> > Joseph Percivall
> > linkedin.com/in/Percivall
> > e: [email protected]
> >
> >
> >
> > On Friday, April 15, 2016 7:46 PM, Russell Bateman <
> [email protected]> wrote:
> >
> >
> >
> > What's the syntax for defining more than one dynamic property for a
> > processor? I need to specify up to three distinctly different ones and
> > attempting to do it all in
> >
> > @DynamicProperty(
> >       name = "{blah,blah2,blah3}",
> >       value = "{\"blah-value\",\"blah2-value\",\"blah3-value\"}",
> > supportsExpressionLanguage = false,
> >       description = "Big blah, blah, blah..."
> > )
> >
> > is under-powered.
> >
> > Many thanks.
>
>

Reply via email to