Skip to content

Commit 59d5683

Browse files
committed
Item 6174: Including batch object in response
SVN r64459 |2019-09-09 02:05:52 +0000
1 parent 9f9ae20 commit 59d5683

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

java/src/org/labkey/remoteapi/assay/LoadAssayBatchCommand.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,10 @@ public LoadAssayBatchCommand copy()
7373
{
7474
return new LoadAssayBatchCommand(this);
7575
}
76+
77+
@Override
78+
protected LoadAssayBatchResponse createResponse(String text, int status, String contentType, JSONObject json)
79+
{
80+
return new LoadAssayBatchResponse(text, status, contentType, json, this);
81+
}
7682
}

java/src/org/labkey/remoteapi/assay/LoadAssayBatchResponse.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
public class LoadAssayBatchResponse extends CommandResponse
88
{
9+
10+
private Batch _batch;
911
/**
1012
* Constructs a new CommandResponse, initialized with the provided
1113
* response text and status code.
@@ -19,5 +21,16 @@ public class LoadAssayBatchResponse extends CommandResponse
1921
public LoadAssayBatchResponse(String text, int statusCode, String contentType, JSONObject json, Command sourceCommand)
2022
{
2123
super(text, statusCode, contentType, json, sourceCommand);
24+
_batch = new Batch((JSONObject) json.get("batch"));
25+
}
26+
27+
public Batch getBatch()
28+
{
29+
return _batch;
30+
}
31+
32+
public void setBatch(Batch batch)
33+
{
34+
_batch = batch;
2235
}
2336
}

0 commit comments

Comments
 (0)