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
6 changes: 6 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpData.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,10 @@ static String normalizeDataFileURI(URI uri)
}
return s;
}

@Override
default String getExpType()
{
return DEFAULT_CPAS_TYPE;
}
}
6 changes: 6 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpExperiment.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ public interface ExpExperiment extends ExpObject
/** Override to signal that we never throw BatchValidationExceptions */
@Override
void save(User user);

@Override
default String getExpType()
{
return DEFAULT_CPAS_TYPE;
}
}
2 changes: 2 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpLineageOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ public enum LineageExpType

public ExpLineageOptions()
{
super();
}

public ExpLineageOptions(boolean parents, boolean children, int depth)
{
super();
_parents = parents;
_children = children;
_depth = depth;
Expand Down
6 changes: 6 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpMaterial.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,10 @@ public interface ExpMaterial extends ExpRunItem
Date getMaterialExpDate();

ActionURL detailsURL(Container container, boolean checkForOverride);

@Override
default String getExpType()
{
return DEFAULT_CPAS_TYPE;
}
}
5 changes: 5 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,9 @@ default ExpObject getExpObject()
{
return this;
}

default String getExpType()
{
return DEFAULT_CPAS_TYPE;
}
}
6 changes: 6 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpProtocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,10 @@ default String getDocumentId()
}

Map<String, Object> getAuditRecordMap(AssayProvider provider);

@Override
default String getExpType()
{
return DEFAULT_CPAS_TYPE;
}
}
5 changes: 5 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpProtocolApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,9 @@ public interface ExpProtocolApplication extends ExpObject
@Override
void save(User user);

@Override
default String getExpType()
{
return DEFAULT_CPAS_TYPE;
}
}
6 changes: 6 additions & 0 deletions api/src/org/labkey/api/exp/api/ExpRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,10 @@ default FileLike getFilePathFileLike()
@Nullable Long getWorkflowTaskId();

boolean canDelete(User user);

@Override
default String getExpType()
{
return DEFAULT_CPAS_TYPE;
}
}
18 changes: 9 additions & 9 deletions api/src/org/labkey/api/exp/api/ExperimentJSONConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static class Settings
private final boolean includeInputsAndOutputs;
private final boolean includeRunSteps;

public Settings()
private Settings()
{
this(true, true, false);
}
Expand All @@ -153,6 +153,11 @@ public Settings(boolean includeProperties, boolean includeInputsAndOutputs, bool
this.includeRunSteps = includeRunSteps;
}

public Settings(ResolveLsidsForm form)
{
this(form.isIncludeProperties(), form.isIncludeInputsAndOutputs(), form.isIncludeRunSteps());
}

public boolean isIncludeProperties()
{
return includeProperties;
Expand Down Expand Up @@ -204,7 +209,6 @@ else if (node instanceof ExpObject expObject)
public static JSONObject serializeRunGroup(ExpExperiment runGroup, Domain domain, @NotNull Settings settings, @Nullable User user)
{
JSONObject jsonObject = serializeExpObject(runGroup, domain == null ? null : domain.getProperties(), settings, user);
jsonObject.put(ExperimentJSONConverter.EXP_TYPE, ExpExperiment.DEFAULT_CPAS_TYPE);

ExpProtocol protocol = runGroup.getBatchProtocol();
if (protocol != null)
Expand All @@ -224,7 +228,6 @@ public static JSONObject serializeRunGroup(ExpExperiment runGroup, Domain domain
public static JSONObject serializeRun(ExpRun run, Domain domain, User user, @NotNull Settings settings)
{
JSONObject jsonObject = serializeExpObject(run, domain == null ? null : domain.getProperties(), settings, user);
jsonObject.put(ExperimentJSONConverter.EXP_TYPE, ExpRun.DEFAULT_CPAS_TYPE);

ExpProtocol protocol = run.getProtocol();
if (protocol != null)
Expand Down Expand Up @@ -294,9 +297,7 @@ public static JSONObject serializeRun(ExpRun run, Domain domain, User user, @Not

// Just include basic protocol properties for now.
// See GetProtocolAction and GWTProtocol for serializing an assay protocol with domain fields.
JSONObject jsonObject = serializeExpObject(protocol, null, DEFAULT_SETTINGS.withIncludeProperties(false), user);
jsonObject.put(ExperimentJSONConverter.EXP_TYPE, ExpProtocol.DEFAULT_CPAS_TYPE);
return jsonObject;
return serializeExpObject(protocol, null, DEFAULT_SETTINGS.withIncludeProperties(false), user);
}

public static JSONObject serializeRunOutputs(Collection<ExpData> data, Collection<ExpMaterial> materials, User user, @NotNull Settings settings)
Expand Down Expand Up @@ -388,10 +389,9 @@ else if (runInput instanceof ExpMaterialRunInput expMaterialRunInput)
protected static JSONObject serializeRunProtocolApplication(@NotNull ExpProtocolApplication protApp, User user, Settings settings)
{
JSONObject json = serializeExpObject(protApp, null, settings, user);
json.put(ExperimentJSONConverter.EXP_TYPE, ExpProtocolApplication.DEFAULT_CPAS_TYPE);

json.put(ACTION_SEQUENCE, protApp.getActionSequence());
json.put(APPLICATION_TYPE, protApp.getApplicationType().toString());

if (protApp.getComments() != null)
json.put(COMMENT, protApp.getComments());

Expand Down Expand Up @@ -570,7 +570,7 @@ public static JSONObject serializeExpObject(
// instead and use serializeOntologyProperties(ExpObject) so the object properties will be
// fetched using ExpObject.getProperty().
JSONObject jsonObject = serializeIdentifiableBean(object, user);
jsonObject.put(ExperimentJSONConverter.EXP_TYPE, ExpObject.DEFAULT_CPAS_TYPE);
jsonObject.put(ExperimentJSONConverter.EXP_TYPE, object.getExpType());

long rowId = object.getRowId();
if (rowId != 0)
Expand Down
20 changes: 15 additions & 5 deletions api/src/org/labkey/api/exp/api/ResolveLsidsForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@

public class ResolveLsidsForm
{
private boolean _singleSeedRequested = false;
private boolean _includeProperties;
private boolean _includeInputsAndOutputs;
private boolean _includeRunSteps;
private List<String> _lsids;
private boolean _singleSeedRequested = false;

public ResolveLsidsForm()
{
this(false, false, false);
}

// serialization options
private boolean _includeProperties = false;
private boolean _includeInputsAndOutputs = false;
private boolean _includeRunSteps = false;
public ResolveLsidsForm(boolean includeProperties, boolean includeInputsAndOutputs, boolean includeRunSteps)
{
_includeProperties = includeProperties;
_includeInputsAndOutputs = includeInputsAndOutputs;
_includeRunSteps = includeRunSteps;
}

public List<String> getLsids()
{
Expand Down
16 changes: 8 additions & 8 deletions assay/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"clean": "rimraf resources/web/assay/gen && rimraf resources/views/gen && rimraf resources/web/gen"
},
"dependencies": {
"@labkey/components": "7.11.0"
"@labkey/components": "7.12.0"
},
"devDependencies": {
"@labkey/build": "8.7.0",
Expand Down
16 changes: 8 additions & 8 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
},
"dependencies": {
"@labkey/components": "7.11.0",
"@labkey/components": "7.12.0",
"@labkey/themes": "1.5.0"
},
"devDependencies": {
Expand Down
5 changes: 5 additions & 0 deletions core/webapp/_images/lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions core/webapp/_images/lock_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions core/webapp/_images/lock_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions core/webapp/_images/lock_orange.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions experiment/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion experiment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test-integration": "cross-env NODE_ENV=test jest --ci --runInBand -c test/js/jest.config.integration.js"
},
"dependencies": {
"@labkey/components": "7.11.0"
"@labkey/components": "7.12.0"
},
"devDependencies": {
"@labkey/build": "8.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7299,7 +7299,7 @@ public static class ResolveAction extends BaseResolveLsidApiAction<ResolveLsidsF
@Override
public Object execute(ResolveLsidsForm form, BindException errors)
{
var settings = new ExperimentJSONConverter.Settings(form.isIncludeProperties(), form.isIncludeInputsAndOutputs(), form.isIncludeRunSteps());
var settings = new ExperimentJSONConverter.Settings(form);
var data = _seeds.stream().map(n -> ExperimentJSONConverter.serialize(n, getUser(), settings)).collect(toList());
return new ApiSimpleResponse("data", data);
}
Expand Down
Loading