diff --git a/flow/src/org/labkey/flow/controllers/protocol/EditICSMetadataForm.java b/flow/src/org/labkey/flow/controllers/protocol/EditICSMetadataForm.java index d57de9569..69d44a9f4 100644 --- a/flow/src/org/labkey/flow/controllers/protocol/EditICSMetadataForm.java +++ b/flow/src/org/labkey/flow/controllers/protocol/EditICSMetadataForm.java @@ -228,7 +228,7 @@ public Map getKeywordAndSampleFieldMap(boolean includeStatisti } FieldKey sampleProperty = FieldKey.fromParts("FCSFile", "Sample"); - ExpSampleType sampleType = getProtocol().getSampleType(getUser()); + ExpSampleType sampleType = getProtocol().getSampleType(); if (sampleType != null) { if (sampleType.hasNameAsIdCol()) diff --git a/flow/src/org/labkey/flow/controllers/protocol/JoinSampleTypeForm.java b/flow/src/org/labkey/flow/controllers/protocol/JoinSampleTypeForm.java index 7471048e6..ee9a35850 100644 --- a/flow/src/org/labkey/flow/controllers/protocol/JoinSampleTypeForm.java +++ b/flow/src/org/labkey/flow/controllers/protocol/JoinSampleTypeForm.java @@ -69,7 +69,7 @@ public Map getAvailableSampleKeyFields() { LinkedHashMap ret = new LinkedHashMap<>(); ret.put("", ""); - ExpSampleType sampleType = getProtocol().getSampleType(getUser()); + ExpSampleType sampleType = getProtocol().getSampleType(); if (sampleType != null) { if (sampleType.hasNameAsIdCol()) diff --git a/flow/src/org/labkey/flow/controllers/protocol/joinSampleType.jsp b/flow/src/org/labkey/flow/controllers/protocol/joinSampleType.jsp index f21a1277f..54bd9b920 100644 --- a/flow/src/org/labkey/flow/controllers/protocol/joinSampleType.jsp +++ b/flow/src/org/labkey/flow/controllers/protocol/joinSampleType.jsp @@ -24,7 +24,7 @@ <% JoinSampleTypeForm form = (JoinSampleTypeForm) __form; - if (form.getProtocol().getSampleType(getUser()) == null) + if (form.getProtocol().getSampleType() == null) { %>

You must first upload a sample type before specifying how to match samples to FCS files.

diff --git a/flow/src/org/labkey/flow/controllers/protocol/showProtocol.jsp b/flow/src/org/labkey/flow/controllers/protocol/showProtocol.jsp index 2c27a4ef4..7f71c72b5 100644 --- a/flow/src/org/labkey/flow/controllers/protocol/showProtocol.jsp +++ b/flow/src/org/labkey/flow/controllers/protocol/showProtocol.jsp @@ -27,7 +27,7 @@ <% ProtocolForm form = (ProtocolForm) __form; FlowProtocol protocol = form.getProtocol(); - ExpSampleType sampleType = protocol.getSampleType(getUser()); + ExpSampleType sampleType = protocol.getSampleType(); %>

The Flow Protocol describes sample information and metadata about the experiment. diff --git a/flow/src/org/labkey/flow/controllers/protocol/showSamples2.jsp b/flow/src/org/labkey/flow/controllers/protocol/showSamples2.jsp index 4f3d1968f..07be36150 100644 --- a/flow/src/org/labkey/flow/controllers/protocol/showSamples2.jsp +++ b/flow/src/org/labkey/flow/controllers/protocol/showSamples2.jsp @@ -37,7 +37,7 @@ <% ProtocolForm form = (ProtocolForm) __form; FlowProtocol protocol = form.getProtocol(); - ExpSampleType st = protocol.getSampleType(getUser()); + ExpSampleType st = protocol.getSampleType(); ExperimentUrls expUrls = urlProvider(ExperimentUrls.class); diff --git a/flow/src/org/labkey/flow/controllers/protocol/updateSamples.jsp b/flow/src/org/labkey/flow/controllers/protocol/updateSamples.jsp index 023a4596f..24632a6c9 100644 --- a/flow/src/org/labkey/flow/controllers/protocol/updateSamples.jsp +++ b/flow/src/org/labkey/flow/controllers/protocol/updateSamples.jsp @@ -25,5 +25,5 @@ <%= form.fileCount%> FCS files were linked to samples in this sample type.

Show linked samples
-Show all samples
+Show all samples
Edit join properties

\ No newline at end of file diff --git a/flow/src/org/labkey/flow/data/FlowProtocol.java b/flow/src/org/labkey/flow/data/FlowProtocol.java index e205c87e2..cd6e07d93 100644 --- a/flow/src/org/labkey/flow/data/FlowProtocol.java +++ b/flow/src/org/labkey/flow/data/FlowProtocol.java @@ -257,7 +257,11 @@ public FlowProtocolStep getStep() */ public ExpSampleType getSampleType(User user) { - return SampleTypeService.get().getSampleType(getContainer(), user, SAMPLETYPE_NAME); + return SampleTypeService.get().getSampleType(getContainer(), SAMPLETYPE_NAME, true); + } + public ExpSampleType getSampleType() + { + return SampleTypeService.get().getSampleType(getContainer(), SAMPLETYPE_NAME, true); } /** @@ -305,14 +309,14 @@ public Map getSampleTypeJoinFields() return ret; } - public String getSampleTypeLSID(User user) + public String getSampleTypeLSID() { String propValue = (String) getProperty(ExperimentProperty.SampleTypeLSID.getPropertyDescriptor()); if (propValue != null) return propValue; // get lsid for sample type with name "Samples" - ExpSampleType sampleType = getSampleType(user); + ExpSampleType sampleType = getSampleType(); if (sampleType != null) return sampleType.getLSID(); @@ -328,7 +332,7 @@ public void setSampleTypeJoinFields(User user, Map values) thr } String value = StringUtils.join(strings.iterator(), "&"); setProperty(user, FlowProperty.SampleTypeJoin.getPropertyDescriptor(), value); - setProperty(user, ExperimentProperty.SampleTypeLSID.getPropertyDescriptor(), getSampleTypeLSID(user)); + setProperty(user, ExperimentProperty.SampleTypeLSID.getPropertyDescriptor(), getSampleTypeLSID()); FlowManager.get().flowObjectModified(); } @@ -352,7 +356,7 @@ public ActionURL urlShowSamples() public Map getSampleMap(User user) { - ExpSampleType st = getSampleType(user); + ExpSampleType st = getSampleType(); if (st == null) return Collections.emptyMap(); Set propertyNames = getSampleTypeJoinFields().keySet(); @@ -433,7 +437,7 @@ public int updateSampleIds(User user) Map sampleMap = getSampleMap(user); _log.debug("sampleMap=" + sampleMap.size()); - ExpSampleType st = getSampleType(user); + ExpSampleType st = getSampleType(); _log.debug("sampleType=" + (st == null ? "" : st.getName()) + ", lsid=" + (st == null ? "" : st.getLSID())); FlowSchema schema = new FlowSchema(user, getContainer()); @@ -604,7 +608,7 @@ public FCSFilesGroupedBySample getFCSFilesGroupedBySample(User user, Container c "__FCSFiles.Sample = M.RowId\n" + "ORDER BY M.Name, __FCSFiles.RowId"; - ExpSampleType sampleType = getSampleType(user); + ExpSampleType sampleType = getSampleType(); ContainerFilter cf = getContainerFilter(sampleType, user); UserSchema userSchema = QueryService.get().getUserSchema(user, getContainer(), SamplesSchema.SCHEMA_NAME); TableInfo sampleTable = userSchema.getTable(SAMPLETYPE_NAME, cf); @@ -1017,8 +1021,8 @@ public void testSampleJoin() throws Exception assertEquals(0, fcsFiles[1].getSamples().size()); // create sample type - assertNull(protocol.getSampleType(user)); - String sampleTypeLSID = protocol.getSampleTypeLSID(user); + assertNull(protocol.getSampleType()); + String sampleTypeLSID = protocol.getSampleTypeLSID(); assertNull(sampleTypeLSID); List props = List.of( @@ -1029,9 +1033,9 @@ public void testSampleJoin() throws Exception ); ExpSampleType st = SampleTypeService.get().createSampleType(c, user, SAMPLETYPE_NAME, null, props, List.of(), -1,-1,-1,-1,null); - assertNotNull(protocol.getSampleType(user)); + assertNotNull(protocol.getSampleType()); - sampleTypeLSID = protocol.getSampleTypeLSID(user); + sampleTypeLSID = protocol.getSampleTypeLSID(); assertNotNull(sampleTypeLSID); // add join fields diff --git a/flow/src/org/labkey/flow/persist/FlowKeywordAuditProvider.java b/flow/src/org/labkey/flow/persist/FlowKeywordAuditProvider.java index 8218c34e3..03e7d2d51 100644 --- a/flow/src/org/labkey/flow/persist/FlowKeywordAuditProvider.java +++ b/flow/src/org/labkey/flow/persist/FlowKeywordAuditProvider.java @@ -99,16 +99,6 @@ public String getDescription() return "Displays information about keyword changes."; } - @Override - public Map legacyNameMap() - { - Map legacyNames = super.legacyNameMap(); - legacyNames.put(FieldKey.fromParts("key1"), COLUMN_NAME_DIRECTORY); - legacyNames.put(FieldKey.fromParts("key2"), COLUMN_NAME_FILE); - legacyNames.put(FieldKey.fromParts("key3"), COLUMN_NAME_KEYWORD_NAME); - return legacyNames; - } - @Override public Class getEventClass() { diff --git a/flow/src/org/labkey/flow/persist/FlowManager.java b/flow/src/org/labkey/flow/persist/FlowManager.java index da086456b..c5509b9fe 100644 --- a/flow/src/org/labkey/flow/persist/FlowManager.java +++ b/flow/src/org/labkey/flow/persist/FlowManager.java @@ -1359,7 +1359,7 @@ public Map getUsageMetrics(User user, Container c, boolean inclu FlowProtocol protocol = FlowProtocol.getForContainer(c); if (protocol != null) { - ExpSampleType st = protocol.getSampleType(user); + ExpSampleType st = protocol.getSampleType(); if (st != null) { // put sample count at top-level since it isn't really specific to the protocol diff --git a/flow/src/org/labkey/flow/query/FlowSchema.java b/flow/src/org/labkey/flow/query/FlowSchema.java index a3d81a2ee..b4432d0a7 100644 --- a/flow/src/org/labkey/flow/query/FlowSchema.java +++ b/flow/src/org/labkey/flow/query/FlowSchema.java @@ -1518,7 +1518,7 @@ public FlowDataTable createFCSFileTable(String name, ContainerFilter cf, boolean ExpSampleType st = null; if (_protocol != null) { - st = _protocol.getSampleType(getUser()); + st = _protocol.getSampleType(); } var colMaterialInput = ret.addMaterialInputColumn("Sample", new SamplesSchema(getUser(), getContainer()), ExpMaterialRunInput.DEFAULT_ROLE, st); if (st == null) diff --git a/flow/src/org/labkey/flow/reports/statPicker.jsp b/flow/src/org/labkey/flow/reports/statPicker.jsp index d893d0dbf..32b146878 100644 --- a/flow/src/org/labkey/flow/reports/statPicker.jsp +++ b/flow/src/org/labkey/flow/reports/statPicker.jsp @@ -68,7 +68,7 @@ Collection sampleTypeProperties = new ArrayList<>(); FlowProtocol protocol = FlowProtocol.ensureForContainer(getUser(), getContainer()); - ExpSampleType sampleType = protocol.getSampleType(getUser()); + ExpSampleType sampleType = protocol.getSampleType(); if (sampleType != null) { for (DomainProperty dp : sampleType.getDomain().getProperties()) diff --git a/flow/src/org/labkey/flow/webparts/FlowOverview.java b/flow/src/org/labkey/flow/webparts/FlowOverview.java index 744d23722..17c6d21aa 100644 --- a/flow/src/org/labkey/flow/webparts/FlowOverview.java +++ b/flow/src/org/labkey/flow/webparts/FlowOverview.java @@ -190,7 +190,7 @@ private Step getSamplesStep() Step ret = new Step("Assign additional meanings to keywords", status); if (protocol != null) { - ExpSampleType st = protocol.getSampleType(getUser()); + ExpSampleType st = protocol.getSampleType(); if (st != null) { HtmlStringBuilder sb = HtmlStringBuilder.of(); diff --git a/flow/src/org/labkey/flow/webparts/FlowSummary.jsp b/flow/src/org/labkey/flow/webparts/FlowSummary.jsp index abc58bf8e..2d23bcde9 100644 --- a/flow/src/org/labkey/flow/webparts/FlowSummary.jsp +++ b/flow/src/org/labkey/flow/webparts/FlowSummary.jsp @@ -76,7 +76,7 @@ //int _flaggedCount = FlowManager.get().getFlaggedCount(c); FlowProtocol _protocol = FlowProtocol.getForContainer(c); - ExpSampleType _sampleType = _protocol != null ? _protocol.getSampleType(getUser()) : null; + ExpSampleType _sampleType = _protocol != null ? _protocol.getSampleType() : null; List _sampleTypeSamples = _sampleType == null ? null : _protocol.getSamples(_sampleType, user); ActionURL _sampleTypeDetailsUrl = _sampleType != null ? _protocol.getSampleTypeDetailsURL(_sampleType, getContainer()) : null;