Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions src/org/labkey/remoteapi/admin/SaveAuditSettingsCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package org.labkey.remoteapi.admin;

import org.json.JSONObject;
import org.labkey.remoteapi.CommandResponse;
import org.labkey.remoteapi.PostCommand;

public class SaveAuditSettingsCommand extends PostCommand<CommandResponse>
{
private static final String ACTION_NAME = "saveAuditSettings";
private static final String CONTROLLER_NAME = "audit";
private boolean _requireUserComments = false;

public SaveAuditSettingsCommand(boolean requireUserComments)
{
super(CONTROLLER_NAME, ACTION_NAME);
_requireUserComments = requireUserComments;
}

public boolean isRequireUserComments()
{
return _requireUserComments;
}

public void setRequireUserComments(boolean requireUserComments)
{
this._requireUserComments = requireUserComments;
}

@Override
public JSONObject getJsonObject()
{
JSONObject json = new JSONObject();
json.put("requireUserComments", isRequireUserComments());

return json;
}
}
11 changes: 9 additions & 2 deletions src/org/labkey/test/util/APIAssayHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,22 @@ public ImportRunResponse importAssay(int assayID, String runFilePath, String pro
return irc.execute(_test.createDefaultConnection(), projectPath);
}

@LogMethod(quiet = true)
public ImportRunResponse importAssay(int assayID, String runName, List<Map<String, Object>> dataRows, String projectPath,
Map<String, Object> runProperties, Map<String, Object> batchProperties, String errorMsg) throws CommandException, IOException
{
return importAssay(assayID, runName, dataRows, projectPath, runProperties, batchProperties, errorMsg, null);
}

@LogMethod(quiet = true)
public ImportRunResponse importAssay(int assayID, String runName, List<Map<String, Object>> dataRows, String projectPath,
Map<String, Object> runProperties, Map<String, Object> batchProperties, String errorMsg, @Nullable Integer workflowTaskId) throws CommandException, IOException
{
ImportRunCommand irc = new ImportRunCommand(assayID, dataRows);
irc.setName(runName);
irc.setProperties(runProperties);
irc.setBatchProperties(batchProperties);
irc.setTimeout(180000); // Wait 3 minutes for assay import
irc.setWorkflowTaskId(workflowTaskId);
if (errorMsg != null)
{
try
Expand Down Expand Up @@ -121,7 +128,7 @@ public ImportRunResponse importAssay(int assayID, String runName, List<Map<Strin
public ImportRunResponse importAssay(int assayID, String runName, List<Map<String, Object>> dataRows, String projectPath,
Map<String, Object> runProperties, Map<String, Object> batchProperties) throws CommandException, IOException
{
return importAssay(assayID, runName, dataRows, projectPath, runProperties, batchProperties, null);
return importAssay(assayID, runName, dataRows, projectPath, runProperties, batchProperties, null, null);
}

@LogMethod(quiet = true)
Expand Down