Stefan,
Thanks for reaching out. I believe that in order to keep it simple I may have missed showing the real issue.
Here is the command:
@Descriptor("...")
public void createTenantAndUserOnKCBA(
@Parameter(names={"-t", "--tenant"}, absentValue="") @Descriptor(TENANT_DESCR + REQ) String tenantName,
@Parameter(names="-ps", absentValue= "") @Descriptor(PS_DESCR) String psName,
@Parameter(names="-email", absentValue="") @Descriptor(EMAIL_DESCR + REQ) String email,
@Parameter(names="-fname", absentValue="") @Descriptor(FNAME_DESCR + REQ) String firstName,
@Parameter(names="-lname", absentValue="") @Descriptor(LNAME_DESCR + REQ) String lastName,
@Parameter(names="-full", absentValue="") @Descriptor(FULL_NAME_DESCR) String fullName,
@Parameter(names="-pwd", absentValue="") @Descriptor(PASS_DESCR + REQ) String password,
@Parameter(names="-ent", absentValue="") @Descriptor(ENT_DESCR) String enterpriseName) {
//perform command
}
For arguments that are truly required you can see the use of the REQ constant to show that.
I can understand your approach if maybe dealing with a single argument, but here we cleary need the ability to specify absentValue=null or equivalent for some of the parameters, which is where we're struggling to match the specification.
Thanks
Alain