Grabbing Command Arguments

In most cases, the command arguments will have been extracted and parsed by the framework; however, special circumstances can arise whereby extra arguments are sent with each command that, for whatever reason, the programmer doesn't want to include in the CommandDescriptor object.

An example is the EssbaseCommandListener; the EssbaseCommandListener.handleEventPrep() method calls a validateSession() method that looks for the standard parameters “servername”, “appname”, “dbname”, then attempts to validate an EssbaseSession against those parameters. If this fails, then the handleEventPrep() method returns a standard error status to the client. In most cases, any EssbaseCommandListener will need these arguments when handling commands. However, there are cases (such as in the outline editor) when those arguments aren't used. If, during implementation of a command listener method, a similar situation arises, the parameters can be retrieved by the following call:

  String aValue = theEvent.getRawParameter("SomeParameterName");

This should be a rare necessity and should raise caution alarms if an implementer finds themselves needing to do this.