-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use java command wrappers and params to create plates #1864
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nit about some odd JSONObject
behavior.
JSONObject json = new JSONObject(); | ||
if (_name != null) | ||
json.put("name", _name); | ||
if (_description != null) | ||
json.put("description", _description); | ||
if (_type != null) | ||
json.put("type", _type); | ||
if (_id != null) | ||
json.put("rowId", _id); | ||
if (_parentPlateSetId != null) | ||
json.put("parentPlateSetId", _parentPlateSetId); | ||
return json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These null
checks actually aren't necessary. Much to our chagrin, JSONObject
doesn't allow null
values. A put
with a null
value actually removes any existing entry and does nothing if there is no existing entry.
JSONObject json = new JSONObject(); | |
if (_name != null) | |
json.put("name", _name); | |
if (_description != null) | |
json.put("description", _description); | |
if (_type != null) | |
json.put("type", _type); | |
if (_id != null) | |
json.put("rowId", _id); | |
if (_parentPlateSetId != null) | |
json.put("parentPlateSetId", _parentPlateSetId); | |
return json; | |
JSONObject json = new JSONObject(); | |
json.put("name", _name); | |
json.put("description", _description); | |
json.put("type", _type); | |
json.put("rowId", _id); | |
json.put("parentPlateSetId", _parentPlateSetId); | |
return json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! (I didn't know that, it feels good to learn something new)
This probably means we have a lot of other writing-of-json to update accordingly; in writing this I followed the pattern from NotebookParams
Rationale
This adds command/response wrappers to create plate sets used in biologics for now, (I'm not sure if this will be limited to lims modules or not, so creating here)
The reason to create via API at this point is that the UI doesn't yet support creating child or parent-type plate sets, this allows us to get automated regression coverage in place until it does
Related Pull Requests
https://github.com/LabKey/limsModules/pull/65
Changes
create command/response/params classes for use in testing plate automation