I'm creating a Java primitive operator that that accepts 2 different parameters. Both are optional, however they are interrelated and therefore must be specified "together" or not at all because one is useless without the other. Is there any way to enforce this in the operator model so it can be checked at SPL compile time? I know I can have my Java code conduct the check that both were set during initialization, but would prefer to not have to wait until runtime for the developer to notice the mistake. Thanks for the feedback.
Pinned topic Specifying related operator parameters
Stan 120000HAGM76 Posts
Re: Specifying related operator parameters2013-06-27T03:29:44ZThis is the accepted answer. This is the accepted answer.
Try using @ContextCheck.
Java static method of the operator's class that is annotated with @ContextCheck can be used as a SPL compile time check. See the following for specifics:
The checkUserPassword() example on that page appears to be what you want to do