nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Gilman <matt.c.gil...@gmail.com>
Subject Re: get ControllerService inside Advanced custom UI
Date Sun, 02 Jul 2017 13:40:38 GMT
Ben,

Yes, configuring the Processor with a Controller Service is what I meant.
If you define a Property that identifies a Controller Service (for instance
here [1]) the value of that property when accessed through
getComponentDetails will be the serviceIdentifier.

Matt

[1]
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java#L205

On Sun, Jul 2, 2017 at 12:15 AM, 尹文才 <batman713@gmail.com> wrote:

> Thanks Matt, how should I get the service identifier with the method
> getComponentDetails, do you mean I should add a service identifier property
> in my processor to let user to specify it for the controller service? In
> that case how could the service identifier configured associate with the
> configured controller service?
>
> Regards,
> Ben
>
> 2017-07-01 21:35 GMT+08:00 Matt Gilman <matt.c.gilman@gmail.com>:
>
> > Ben,
> >
> > That is the correct method to invoke. The serviceIdentifier will be the
> > value of the Property that identifies the service in question. The
> > componentId will be the identifier of Processor. You'll need to invoke
> >
> > ComponentDetails getComponentDetails(NiFiWebRequestContext
> requestContext)
> >
> > in order to get the service identifier from the configured properties.
> >
> > Thanks
> >
> > Matt
> >
> > On Sat, Jul 1, 2017 at 4:17 AM, 尹文才 <batman713@gmail.com> wrote:
> >
> > > Hi guys, I' m currently creating a custom UI for my processor and I
> need
> > to
> > > get the DBCP Connection ControllerService in the backend code for the
> UI,
> > > the ControllerService is a property defined in the processor
> properties.
> > I
> > > saw there's one method in class NiFiWebConfigurationContext as below:
> > >
> > > ontrollerService getControllerService(String serviceIdentifier, String
> > > componentId);
> > >
> > >
> > > However this method requires the serviceIdentifier which I don't know
> > >
> > > how to obtain. How exactly should I get the ControllerService?
> > >
> > > Thanks.
> > >
> > >
> > > Regards,
> > >
> > > Ben
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message