Skip to content

Commit c8a7dbf

Browse files
Complete migration from srcURL and returnURL to returnUrl
1 parent b1d13af commit c8a7dbf

File tree

6 files changed

+31
-36
lines changed

6 files changed

+31
-36
lines changed

genotyping/src/org/labkey/genotyping/GenotypingController.java

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public boolean handlePost(ReturnUrlForm returnUrlForm, BindException errors)
385385
public URLHelper getSuccessURL(ReturnUrlForm form)
386386
{
387387
ActionURL begin = PageFlowUtil.urlProvider(ProjectUrls.class).getBeginURL(getContainer());
388-
return form.getReturnURLHelper(begin);
388+
return form.getReturnUrlHelper(begin);
389389
}
390390
}
391391

@@ -494,18 +494,18 @@ public void setMessage(String message)
494494
}
495495

496496

497-
private ActionURL getAdminURL(String message, ActionURL returnURL)
497+
private ActionURL getAdminURL(String message, ActionURL returnUrl)
498498
{
499-
ActionURL url = getAdminURL(getContainer(), returnURL);
499+
ActionURL url = getAdminURL(getContainer(), returnUrl);
500500
url.addParameter("message", message);
501501
return url;
502502
}
503503

504504

505-
public static ActionURL getAdminURL(Container c, ActionURL returnURL)
505+
public static ActionURL getAdminURL(Container c, ActionURL returnUrl)
506506
{
507507
ActionURL url = new ActionURL(AdminAction.class, c);
508-
url.addReturnURL(returnURL);
508+
url.addReturnUrl(returnUrl);
509509
return url;
510510
}
511511

@@ -684,10 +684,10 @@ public void setGalaxyKey(String galaxyKey)
684684
}
685685

686686

687-
public static ActionURL getMySettingsURL(Container c, ActionURL returnURL)
687+
public static ActionURL getMySettingsURL(Container c, ActionURL returnUrl)
688688
{
689689
ActionURL url = new ActionURL(MySettingsAction.class, c);
690-
url.addReturnURL(returnURL);
690+
url.addReturnUrl(returnUrl);
691691
return url;
692692
}
693693

@@ -752,7 +752,7 @@ public boolean handlePost(MySettingsForm form, BindException errors)
752752
@Override
753753
public URLHelper getSuccessURL(MySettingsForm form)
754754
{
755-
return form.getReturnURLHelper();
755+
return form.getReturnUrlHelper();
756756
}
757757

758758
@Override
@@ -1110,7 +1110,7 @@ private ActionURL getAnalyzeURL(int runId, ActionURL cancelURL)
11101110
{
11111111
ActionURL url = new ActionURL(AnalyzeAction.class, getContainer());
11121112
url.addParameter("run", runId);
1113-
url.addReturnURL(cancelURL);
1113+
url.addReturnUrl(cancelURL);
11141114
return url;
11151115
}
11161116

@@ -1232,13 +1232,13 @@ public static class AnalyzeBean
12321232
{
12331233
private final SortedSet<CustomView> _sequencesViews;
12341234
private final Map<Integer, Pair<String, String>> _sampleMap;
1235-
private final ActionURL _returnURL;
1235+
private final ActionURL _returnUrl;
12361236

1237-
private AnalyzeBean(SortedSet<CustomView> sequenceViews, Map<Integer, Pair<String, String>> sampleMap, ActionURL returnURL)
1237+
private AnalyzeBean(SortedSet<CustomView> sequenceViews, Map<Integer, Pair<String, String>> sampleMap, ActionURL returnUrl)
12381238
{
12391239
_sequencesViews = sequenceViews;
12401240
_sampleMap = sampleMap;
1241-
_returnURL = returnURL;
1241+
_returnUrl = returnUrl;
12421242
}
12431243

12441244
public SortedSet<CustomView> getSequencesViews()
@@ -1251,9 +1251,9 @@ public Map<Integer, Pair<String, String>> getSampleMap()
12511251
return _sampleMap;
12521252
}
12531253

1254-
public ActionURL getReturnURL()
1254+
public ActionURL getReturnUrl()
12551255
{
1256-
return _returnURL;
1256+
return _returnUrl;
12571257
}
12581258
}
12591259

@@ -2015,13 +2015,13 @@ public class AssignmentReportBean
20152015
{
20162016
private final Collection<Integer> _ids;
20172017
private final String _assayName;
2018-
private final ActionURL _returnURL;
2018+
private final ActionURL _returnUrl;
20192019

2020-
public AssignmentReportBean(Collection<Integer> ids, String assayName, ActionURL returnURL)
2020+
public AssignmentReportBean(Collection<Integer> ids, String assayName, ActionURL returnUrl)
20212021
{
20222022
_ids = ids;
20232023
_assayName = assayName;
2024-
_returnURL = returnURL;
2024+
_returnUrl = returnUrl;
20252025
}
20262026

20272027
public Collection<Integer> getIds()
@@ -2034,9 +2034,9 @@ public String getAssayName()
20342034
return _assayName;
20352035
}
20362036

2037-
public ActionURL getReturnURL()
2037+
public ActionURL getReturnUrl()
20382038
{
2039-
return _returnURL;
2039+
return _returnUrl;
20402040
}
20412041
}
20422042

@@ -2057,10 +2057,10 @@ public ModelAndView getView(ProtocolIdForm form, BindException errors)
20572057
AssayHeaderView header = new AssayHeaderView(form.getProtocol(), form.getProvider(), false, true, null);
20582058
result.addView(header);
20592059

2060-
ActionURL returnURL = form.getReturnActionURL(PageFlowUtil.urlProvider(ProjectUrls.class).getBeginURL(getContainer()));
2060+
ActionURL returnUrl = form.getReturnActionURL(PageFlowUtil.urlProvider(ProjectUrls.class).getBeginURL(getContainer()));
20612061

2062-
AssignmentReportBean bean = new AssignmentReportBean(selected, _protocol.getName(), returnURL);
2063-
JspView report = new JspView<>("/org/labkey/genotyping/view/haplotypeAssignmentReport.jsp", bean);
2062+
AssignmentReportBean bean = new AssignmentReportBean(selected, _protocol.getName(), returnUrl);
2063+
JspView<?> report = new JspView<>("/org/labkey/genotyping/view/haplotypeAssignmentReport.jsp", bean);
20642064
result.addView(report);
20652065

20662066
return result;
@@ -2361,10 +2361,5 @@ public void setRowId(int rowId)
23612361
{
23622362
_rowId = rowId;
23632363
}
2364-
2365-
public void setSrcURL(String srcURL)
2366-
{
2367-
ReturnUrlForm.throwBadParam();
2368-
}
23692364
}
23702365
}

genotyping/src/org/labkey/genotyping/view/analyze.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ var f = new LABKEY.ext.FormPanel({
133133
description,
134134
selectedSamples
135135
],
136-
buttons:[{text:'Submit', type:'submit', handler:submit}, {text:'Cancel', handler:function() {document.location = <%=q(bean.getReturnURL())%>;}}],
136+
buttons:[{text:'Submit', type:'submit', handler:submit}, {text:'Cancel', handler:function() {document.location = <%=q(bean.getReturnUrl())%>;}}],
137137
buttonAlign:'left'
138138
});
139139

genotyping/src/org/labkey/genotyping/view/configure.jsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
4040
ActionURL animalQueryURL = QueryService.get().urlFor(getUser(), getContainer(), QueryAction.executeQuery, "genotyping", "Animal");
4141
ActionURL animalEditDomainURL = PropertyService.get().getDomainKind(schema.getDomainURI(GenotypingQuerySchema.TableType.Animal.name())).urlCreateDefinition(GenotypingQuerySchema.NAME, GenotypingQuerySchema.TableType.Animal.name(), getContainer(), getUser());
42-
animalEditDomainURL.addReturnURL(getActionURL());
42+
animalEditDomainURL.addReturnUrl(getActionURL());
4343
4444
ActionURL haplotypeQueryURL = QueryService.get().urlFor(getUser(), getContainer(), QueryAction.executeQuery, "genotyping", "Haplotype");
4545
ActionURL haplotypeEditDomainURL = PropertyService.get().getDomainKind(schema.getDomainURI(GenotypingQuerySchema.TableType.Haplotype.name())).urlCreateDefinition(GenotypingQuerySchema.NAME, GenotypingQuerySchema.TableType.Haplotype.name(), getContainer(), getUser());
46-
haplotypeEditDomainURL.addReturnURL(getActionURL());
46+
haplotypeEditDomainURL.addReturnUrl(getActionURL());
4747
%>
4848
<script type="text/javascript" nonce="<%=getScriptNonce()%>">
4949
var queries = {};
@@ -166,6 +166,6 @@
166166
</td>
167167
</tr>
168168
<tr><td>&nbsp;</td></tr>
169-
<tr><td><%= button("Submit").submit(true) %> <%= button("Done").href(form.getReturnURLHelper()) %><%=generateReturnUrlFormField(form)%></td></tr>
169+
<tr><td><%= button("Submit").submit(true) %> <%= button("Done").href(form.getReturnUrlHelper()) %><%=generateReturnUrlFormField(form)%></td></tr>
170170
</table>
171171
</form>

genotyping/src/org/labkey/genotyping/view/editHaplotypeAssignment.jsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
GenotypingController.AssignmentForm bean = me.getModelBean();
3535
final String formDivId = "form" + getRequestScopedUID();
3636
37-
ActionURL returnURL = bean.getReturnActionURL(urlProvider(ProjectUrls.class).getBeginURL(getContainer()));
37+
ActionURL returnUrl = bean.getReturnActionURL(urlProvider(ProjectUrls.class).getBeginURL(getContainer()));
3838
%>
3939
<%
4040
if (getErrors("form").hasErrors())
@@ -111,7 +111,7 @@
111111
commands: commands,
112112
success: function(data) {
113113
assignmentForm.getEl().unmask();
114-
window.location = <%=q(returnURL)%>
114+
window.location = <%=q(returnUrl)%>
115115
},
116116
failure: function(response) {
117117
alert(response.exception);
@@ -123,7 +123,7 @@
123123
{
124124
text: 'Cancel',
125125
handler: function(){
126-
window.location = <%=q(returnURL)%>
126+
window.location = <%=q(returnUrl)%>
127127
}
128128
}
129129
],

genotyping/src/org/labkey/genotyping/view/haplotypeAssignmentReport.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
{
144144
text: 'Cancel',
145145
handler: function(){
146-
window.location = <%=q(bean.getReturnURL())%>;
146+
window.location = <%=q(bean.getReturnUrl())%>;
147147
}
148148
}
149149
],

genotyping/src/org/labkey/genotyping/view/mySettings.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@
4848
<tr><td>&nbsp;</td></tr>
4949
<tr><td>Galaxy web API key</td><td><input size="40" name="galaxyKey" value="<%=h(form.getGalaxyKey())%>"></td></tr>
5050
<tr><td>&nbsp;</td></tr>
51-
<tr><td><%= button("Submit").submit(true) %> <%= button("Cancel").href(form.getReturnURLHelper()) %><%=generateReturnUrlFormField(form)%></td></tr>
51+
<tr><td><%= button("Submit").submit(true) %> <%= button("Cancel").href(form.getReturnUrlHelper()) %><%=generateReturnUrlFormField(form)%></td></tr>
5252
</table>
5353
</labkey:form>

0 commit comments

Comments
 (0)