Skip to content

Commit 51950d5

Browse files
More constants for field names
1 parent 01fbf1c commit 51950d5

10 files changed

Lines changed: 21 additions & 15 deletions

File tree

elispotassay/src/org/labkey/elispot/query/ElispotRunDataTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public List<FieldKey> getDefaultVisibleColumns()
170170
FieldKey runPropFieldKey = FieldKey.fromParts("Run");
171171
fieldKeys.add(FieldKey.fromParts(runPropFieldKey, FieldKey.fromString("ProtocolName")));
172172
fieldKeys.add(FieldKey.fromParts(runPropFieldKey, FieldKey.fromString("PlateReader")));
173-
fieldKeys.add(FieldKey.fromParts(runPropFieldKey, FieldKey.fromString("Batch"), FieldKey.fromString("TargetStudy")));
173+
fieldKeys.add(FieldKey.fromParts(runPropFieldKey, FieldKey.fromString("Batch"), FieldKey.fromString(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME)));
174174
return fieldKeys;
175175
}
176176

flow/src/org/labkey/flow/controllers/executescript/confirmRunsToImport.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<%@ page import="java.util.LinkedHashMap" %>
3131
<%@ page import="java.util.Map" %>
3232
<%@ page import="java.util.Set" %>
33+
<%@ page import="org.labkey.api.assay.AbstractAssayProvider" %>
3334
<%@ page extends="org.labkey.api.jsp.JspBase" %>
3435
<%
3536
JspView<ImportRunsForm> me = HttpView.currentView();
@@ -86,8 +87,8 @@
8687
to look up specimen information from the target study's specimen repository.
8788
</p>
8889
<p class="labkey-indented">
89-
<label for="TargetStudy">Optionally, choose a target study folder:</label><br>
90-
<select id="TargetStudy" name="TargetStudy">
90+
<label for="<%= h(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME)%>">Optionally, choose a target study folder:</label><br>
91+
<select id="<%= h(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME)%>" name="<%= h(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME)%>">
9192
<labkey:options value="<%=unsafe(form.getTargetStudy())%>" map="<%=targetStudies%>"/>
9293
</select>
9394
</p>

flow/src/org/labkey/flow/controllers/executescript/importAnalysisChooseAnalysis.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<%@ page import="java.util.List" %>
3737
<%@ page import="java.util.Map" %>
3838
<%@ page import="java.util.Set" %>
39+
<%@ page import="org.labkey.api.assay.AbstractAssayProvider" %>
3940
<%@ page extends="org.labkey.api.jsp.JspBase" %>
4041
<%@ taglib prefix="labkey" uri="http://www.labkey.org/taglib" %>
4142
<%
@@ -233,7 +234,7 @@ if (form.getKeywordDir() != null && form.getKeywordDir().length > 0 && StudyPubl
233234
<div style="padding-left: 2em; padding-bottom: 1em;">
234235
<br>
235236
Choose a target study folder:<br>
236-
<%=select().name("TargetStudy").className(null).addOptions(targetStudies).selected(unsafe(form.getTargetStudy())).onChange("document.getElementById('studyChanged').value = true;")
237+
<%=select().name(<%= h(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME)%>).className(null).addOptions(targetStudies).selected(unsafe(form.getTargetStudy())).onChange("document.getElementById('studyChanged').value = true;")
237238
%>
238239
<br><br>
239240
</div>

flow/src/org/labkey/flow/controllers/executescript/importAnalysisConfirm.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<%@ page import="java.util.Map" %>
4343
<%@ page import="java.util.Set" %>
4444
<%@ page import="static org.labkey.flow.controllers.executescript.AnalysisScriptController.BACK_BUTTON_ACTION" %>
45+
<%@ page import="org.labkey.api.assay.AbstractAssayProvider" %>
4546
<%@ page extends="org.labkey.api.jsp.JspBase" %>
4647
<%
4748
ImportAnalysisForm form = (ImportAnalysisForm)getModelBean();
@@ -93,7 +94,7 @@
9394
<input type="hidden" name="existingAnalysisId" id="existingAnalysisId" value="<%=form.getExistingAnalysisId()%>">
9495
<% } %>
9596

96-
<input type="hidden" name="TargetStudy" id="TargetStudy" value="<%=h(form.getTargetStudy())%>">
97+
<input type="hidden" name="<%= h(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME)%>" id="<%= h(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME)%>" value="<%=h(form.getTargetStudy())%>">
9798

9899
<p>You are about to import the analysis from the workspace with the following settings:</p>
99100
<%

flow/src/org/labkey/flow/data/FlowProperty.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.labkey.flow.data;
1818

19+
import org.labkey.api.assay.AbstractAssayProvider;
1920
import org.labkey.api.exp.PropertyType;
2021
import org.labkey.api.exp.property.SystemProperty;
2122

@@ -35,7 +36,7 @@ abstract public class FlowProperty
3536
static public final SystemProperty AnalysisEngine = new SystemProperty(PROPERTY_BASE + "AnalysisEngine", PropertyType.STRING);
3637

3738
// Property on FlowRun ExpRun object: container id of target study
38-
static public final SystemProperty TargetStudy = new SystemProperty(PROPERTY_BASE + "TargetStudy", PropertyType.STRING);
39+
static public final SystemProperty TargetStudy = new SystemProperty(PROPERTY_BASE + AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME, PropertyType.STRING);
3940

4041
// Property on FlowFCSFile ExpData object: true when the FlowFCSFile was created from an external analysis (extracted from FlowJo workspace or analysis archive)
4142
//static public final SystemProperty ExtraKeywordsFCSFile = new SystemProperty(PROPERTY_BASE + "ExtraKeywordsFCSFile", PropertyType.BOOLEAN);

flow/src/org/labkey/flow/query/FCSFileCoalescingColumn.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package org.labkey.flow.query;
1717

1818
import org.jetbrains.annotations.Nullable;
19+
import org.labkey.api.assay.AbstractAssayProvider;
1920
import org.labkey.api.data.ColumnInfo;
2021
import org.labkey.api.data.JdbcType;
2122
import org.labkey.api.data.SQLFragment;
@@ -74,7 +75,7 @@ public FCSFileCoalescingColumn(TableInfo parent, FieldKey key, JdbcType type, @N
7475
_dateFieldKeys = Pair.of(dateFieldKey, FlowSchema.rewriteAsOriginalFCSFile(dateFieldKey));
7576
}
7677

77-
FieldKey targetStudyFieldKey = relativeFromFCSFile ? FieldKey.fromParts("Run", "TargetStudy") : FieldKey.fromParts("FCSFile", "Run", "TargetStudy");
78+
FieldKey targetStudyFieldKey = relativeFromFCSFile ? FieldKey.fromParts("Run", AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME) : FieldKey.fromParts("FCSFile", "Run", "TargetStudy");
7879
_targetStudyFieldKeys = Pair.of(targetStudyFieldKey, FlowSchema.rewriteAsOriginalFCSFile(targetStudyFieldKey));
7980
}
8081

luminex/test/src/org/labkey/test/components/luminex/importwizard/BatchPropertiesWebPart.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import org.labkey.test.Locator;
1919
import org.labkey.test.components.WebPartPanel;
20+
import org.labkey.test.components.assay.AssayConstants;
2021
import org.openqa.selenium.WebDriver;
2122
import org.openqa.selenium.WebElement;
2223

@@ -67,6 +68,6 @@ public class Elements extends WebPartPanel<?>.ElementCache
6768

6869
public static class Locators
6970
{
70-
protected static final Locator sampleInfoRadio = Locator.radioButtonByNameAndValue("ParticipantVisitResolver", "SampleInfo");
71+
protected static final Locator sampleInfoRadio = Locator.radioButtonByNameAndValue(AssayConstants.PARTICIPANT_VISIT_RESOLVER_FIELD_NAME, "SampleInfo");
7172
}
7273
}

luminex/test/src/org/labkey/test/tests/luminex/LuminexMultipleCurvesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private void reImportData(Map<String, WellRole[]> wellRoleMap)
145145
goToTestAssayHome();
146146
click(Locator.linkContainingText(MULTIPLE_CURVE_ASSAY_RUN_NAME));
147147
clickButtonContainingText("Re-import run");
148-
checkCheckbox(Locator.radioButtonByNameAndValue("ParticipantVisitResolver", "SampleInfo"));
148+
checkCheckbox(Locator.radioButtonByNameAndValue(AssayConstants.PARTICIPANT_VISIT_RESOLVER_FIELD_NAME, "SampleInfo"));
149149
clickButtonContainingText("Next");
150150
setFormElement(AssayConstants.ASSAY_NAME_FIELD_LOCATOR, MULTIPLE_CURVE_ASSAY_RUN_NAME);
151151
clickButtonContainingText("Next");

luminex/test/src/org/labkey/test/tests/luminex/LuminexUploadAndLinkTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public void testUploadAndLink()
8888
// Upload another run using a thaw list pasted in as a TSV
8989
clickButton("Import Data");
9090
assertEquals(TEST_ASSAY_LUM_SET_PROP_SPECIES2, getFormElement(SPECIES_LOCATOR));
91-
checkCheckbox(Locator.radioButtonByNameAndValue("ParticipantVisitResolver", "Lookup"));
92-
checkCheckbox(Locator.radioButtonByNameAndValue("ThawListType", "Text"));
91+
checkCheckbox(Locator.radioButtonByNameAndValue(AssayConstants.PARTICIPANT_VISIT_RESOLVER_FIELD_NAME, "Lookup"));
92+
checkCheckbox(Locator.radioButtonByNameAndValue(AssayConstants.THAW_LIST_TYPE_FIELD_NAME, "Text"));
9393
setFormElement(Locator.id("ThawListTextArea"), "Index\tSpecimenID\tParticipantID\tVisitID\n" +
9494
"1\tSpecimenID1\tParticipantID1\t1.1\n" +
9595
"2\tSpecimenID2\tParticipantID2\t1.2\n" +
@@ -163,10 +163,10 @@ public void testUploadAndLink()
163163
// Upload another run using a thaw list that pointed at the list we uploaded earlier
164164
clickButton("Import Data");
165165
assertEquals(TEST_ASSAY_LUM_SET_PROP_SPECIES2, getFormElement(SPECIES_LOCATOR));
166-
assertRadioButtonSelected(Locator.radioButtonByNameAndValue("ParticipantVisitResolver", "Lookup"));
167-
assertRadioButtonSelected(Locator.radioButtonByNameAndValue("ThawListType", "Text"));
166+
assertRadioButtonSelected(Locator.radioButtonByNameAndValue(AssayConstants.PARTICIPANT_VISIT_RESOLVER_FIELD_NAME, "Lookup"));
167+
assertRadioButtonSelected(Locator.radioButtonByNameAndValue(AssayConstants.THAW_LIST_TYPE_FIELD_NAME, "Text"));
168168

169-
checkCheckbox(Locator.radioButtonByNameAndValue("ThawListType", "List"));
169+
checkCheckbox(Locator.radioButtonByNameAndValue(AssayConstants.THAW_LIST_TYPE_FIELD_NAME, "List"));
170170
waitForElement(Locator.css(".schema-loaded-marker"));
171171
_ext4Helper.selectComboBoxItem(Locator.id("thawListSchemaName"), "lists");
172172
waitForElement(Locator.css(".query-loaded-marker"));

viability/src/org/labkey/viability/ViabilityAssaySchema.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public TableInfo getLookupTableInfo()
362362

363363
private MutableColumnInfo createTargetStudyCol()
364364
{
365-
var col = wrapColumn(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME, getRealTable().getColumn("TargetStudy"));
365+
var col = wrapColumn(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME, getRealTable().getColumn(AbstractAssayProvider.TARGET_STUDY_PROPERTY_NAME));
366366
fixupRenderers(col, col);
367367
col.setUserEditable(false);
368368
col.setReadOnly(true);

0 commit comments

Comments
 (0)