Parameters for custom java indicators?

One Star

Parameters for custom java indicators?

Ok, with Sebastio's help I've got a java indicator to run, but the next step is to add parameters to it.
I notice that all of the standard indicators have different options that can be set, but what about custom ones?
The indicator I have in mind will have a couple of different options that will affect the output (but have no effect on the process). It is conceivable to code a new indicator for each option, but not exactly nice...
I have had a look at the class file for UserDefIndicatorImpl but with almost no knowledge about Java I don't know whether there is no way to do it, or there is and I can't see it.
What are my options? Do I have any options? ;-)
Employee

Re: Parameters for custom java indicators?

Hi Stuart,
We do not offer an easy way to set parameters on java custom indicators yet. If you have suggestions to do so, you may request this feature in our bugtracker.
In your case, I would implement a default indicator with no option. Then for each option, I would create a subclass of this default indicator. These subclasses would work a bit differently according to the option they implement.
I don't know if this solution can reply to your needs. How many options will you have?
One Star

Re: Parameters for custom java indicators?

Hi Sebastiao,
I've got about half a dozen options at the moment, with a small chance that it could multiply in future.
Functionally all of the options are the same, but each "option" validates against a difference set of reference values.
So the option is to tell it which reference set to use.
True, I hadn't thought about using inheritance to sort it out.
I could derive and implement the function, then derive X children from that that each specify the particular reference set.
Not ideal, but better than what I was envisioning. It's been a while since I was a serious coder.
Thanks for that.