Skip to content

v5.0.0

Compare
Choose a tag to compare
@labkey-adam labkey-adam released this 25 Jan 01:00
· 31 commits to develop since this release
  • Refactor the Command class hierarchy:
    • Add GetCommand, new abstract base class for all commands that use get
    • Make Command and PostCommand abstract
    • Add SimpleGetCommand, new concrete class used (instead of Command) to invoke GET API actions without creating a subclass
    • Add SimplePostCommand, new concrete class used (instead of PostCommand) to invoke POST API actions without creating a subclass
  • Refactor parameter handling for consistency:
    • createParameterMap() is now used by subclasses to create and populate a mutable map of URL parameters
    • getParameters() now returns an immutable copy of the current URL parameter map for external use, typically logging or testing
    • Commands no longer stash and reuse the parameter map; createParameterMap() always creates a new map.
    • setParameters() is now available only on SimpleGetCommand and SimplePostCommand. Custom GetCommand and PostCommand
      subclasses that need to specify parameters are expected to override createParameterMap().
    • setJsonObject() is now available only on SimplePostCommand. Custom PostCommand subclasses that need to post JSON are
      expected to override getJsonObject().
  • Stop passing command subclasses when constructing every CommandResponse. The two response classes that need this now implement
    it without burdening all other commands.
  • Introduce HasRequiredVersion interface and use it when instantiating CommandResponse subclasses that need required version
  • Remove all Command copy constructors. Same rationale as the earlier removal of copy methods.
  • Switch SelectRowsCommand and NAbRunsCommand to post their parameters as JSON
  • Fix NAbReplicate to handle "NaN" values
  • Remove CommandException from getHttpRequest() throws list
  • Adjust the Demo.java and Test.java tests to match current sample data and Command hierarchy changes