From c8a7dbff3cade312428b5f0d23841ec7e70c45ef Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Mon, 3 Mar 2025 17:28:20 -0800 Subject: [PATCH] Complete migration from srcURL and returnURL to returnUrl --- .../genotyping/GenotypingController.java | 49 +++++++++---------- .../org/labkey/genotyping/view/analyze.jsp | 2 +- .../org/labkey/genotyping/view/configure.jsp | 6 +-- .../view/editHaplotypeAssignment.jsp | 6 +-- .../view/haplotypeAssignmentReport.jsp | 2 +- .../org/labkey/genotyping/view/mySettings.jsp | 2 +- 6 files changed, 31 insertions(+), 36 deletions(-) diff --git a/genotyping/src/org/labkey/genotyping/GenotypingController.java b/genotyping/src/org/labkey/genotyping/GenotypingController.java index a08afb65..c4bf8c77 100644 --- a/genotyping/src/org/labkey/genotyping/GenotypingController.java +++ b/genotyping/src/org/labkey/genotyping/GenotypingController.java @@ -385,7 +385,7 @@ public boolean handlePost(ReturnUrlForm returnUrlForm, BindException errors) public URLHelper getSuccessURL(ReturnUrlForm form) { ActionURL begin = PageFlowUtil.urlProvider(ProjectUrls.class).getBeginURL(getContainer()); - return form.getReturnURLHelper(begin); + return form.getReturnUrlHelper(begin); } } @@ -494,18 +494,18 @@ public void setMessage(String message) } - private ActionURL getAdminURL(String message, ActionURL returnURL) + private ActionURL getAdminURL(String message, ActionURL returnUrl) { - ActionURL url = getAdminURL(getContainer(), returnURL); + ActionURL url = getAdminURL(getContainer(), returnUrl); url.addParameter("message", message); return url; } - public static ActionURL getAdminURL(Container c, ActionURL returnURL) + public static ActionURL getAdminURL(Container c, ActionURL returnUrl) { ActionURL url = new ActionURL(AdminAction.class, c); - url.addReturnURL(returnURL); + url.addReturnUrl(returnUrl); return url; } @@ -684,10 +684,10 @@ public void setGalaxyKey(String galaxyKey) } - public static ActionURL getMySettingsURL(Container c, ActionURL returnURL) + public static ActionURL getMySettingsURL(Container c, ActionURL returnUrl) { ActionURL url = new ActionURL(MySettingsAction.class, c); - url.addReturnURL(returnURL); + url.addReturnUrl(returnUrl); return url; } @@ -752,7 +752,7 @@ public boolean handlePost(MySettingsForm form, BindException errors) @Override public URLHelper getSuccessURL(MySettingsForm form) { - return form.getReturnURLHelper(); + return form.getReturnUrlHelper(); } @Override @@ -1110,7 +1110,7 @@ private ActionURL getAnalyzeURL(int runId, ActionURL cancelURL) { ActionURL url = new ActionURL(AnalyzeAction.class, getContainer()); url.addParameter("run", runId); - url.addReturnURL(cancelURL); + url.addReturnUrl(cancelURL); return url; } @@ -1232,13 +1232,13 @@ public static class AnalyzeBean { private final SortedSet _sequencesViews; private final Map> _sampleMap; - private final ActionURL _returnURL; + private final ActionURL _returnUrl; - private AnalyzeBean(SortedSet sequenceViews, Map> sampleMap, ActionURL returnURL) + private AnalyzeBean(SortedSet sequenceViews, Map> sampleMap, ActionURL returnUrl) { _sequencesViews = sequenceViews; _sampleMap = sampleMap; - _returnURL = returnURL; + _returnUrl = returnUrl; } public SortedSet getSequencesViews() @@ -1251,9 +1251,9 @@ public Map> getSampleMap() return _sampleMap; } - public ActionURL getReturnURL() + public ActionURL getReturnUrl() { - return _returnURL; + return _returnUrl; } } @@ -2015,13 +2015,13 @@ public class AssignmentReportBean { private final Collection _ids; private final String _assayName; - private final ActionURL _returnURL; + private final ActionURL _returnUrl; - public AssignmentReportBean(Collection ids, String assayName, ActionURL returnURL) + public AssignmentReportBean(Collection ids, String assayName, ActionURL returnUrl) { _ids = ids; _assayName = assayName; - _returnURL = returnURL; + _returnUrl = returnUrl; } public Collection getIds() @@ -2034,9 +2034,9 @@ public String getAssayName() return _assayName; } - public ActionURL getReturnURL() + public ActionURL getReturnUrl() { - return _returnURL; + return _returnUrl; } } @@ -2057,10 +2057,10 @@ public ModelAndView getView(ProtocolIdForm form, BindException errors) AssayHeaderView header = new AssayHeaderView(form.getProtocol(), form.getProvider(), false, true, null); result.addView(header); - ActionURL returnURL = form.getReturnActionURL(PageFlowUtil.urlProvider(ProjectUrls.class).getBeginURL(getContainer())); + ActionURL returnUrl = form.getReturnActionURL(PageFlowUtil.urlProvider(ProjectUrls.class).getBeginURL(getContainer())); - AssignmentReportBean bean = new AssignmentReportBean(selected, _protocol.getName(), returnURL); - JspView report = new JspView<>("/org/labkey/genotyping/view/haplotypeAssignmentReport.jsp", bean); + AssignmentReportBean bean = new AssignmentReportBean(selected, _protocol.getName(), returnUrl); + JspView report = new JspView<>("/org/labkey/genotyping/view/haplotypeAssignmentReport.jsp", bean); result.addView(report); return result; @@ -2361,10 +2361,5 @@ public void setRowId(int rowId) { _rowId = rowId; } - - public void setSrcURL(String srcURL) - { - ReturnUrlForm.throwBadParam(); - } } } diff --git a/genotyping/src/org/labkey/genotyping/view/analyze.jsp b/genotyping/src/org/labkey/genotyping/view/analyze.jsp index 132c66f3..0bc9e449 100644 --- a/genotyping/src/org/labkey/genotyping/view/analyze.jsp +++ b/genotyping/src/org/labkey/genotyping/view/analyze.jsp @@ -133,7 +133,7 @@ var f = new LABKEY.ext.FormPanel({ description, selectedSamples ], - buttons:[{text:'Submit', type:'submit', handler:submit}, {text:'Cancel', handler:function() {document.location = <%=q(bean.getReturnURL())%>;}}], + buttons:[{text:'Submit', type:'submit', handler:submit}, {text:'Cancel', handler:function() {document.location = <%=q(bean.getReturnUrl())%>;}}], buttonAlign:'left' }); diff --git a/genotyping/src/org/labkey/genotyping/view/configure.jsp b/genotyping/src/org/labkey/genotyping/view/configure.jsp index 4a1f3e80..14f0c4d0 100644 --- a/genotyping/src/org/labkey/genotyping/view/configure.jsp +++ b/genotyping/src/org/labkey/genotyping/view/configure.jsp @@ -39,11 +39,11 @@ ActionURL animalQueryURL = QueryService.get().urlFor(getUser(), getContainer(), QueryAction.executeQuery, "genotyping", "Animal"); ActionURL animalEditDomainURL = PropertyService.get().getDomainKind(schema.getDomainURI(GenotypingQuerySchema.TableType.Animal.name())).urlCreateDefinition(GenotypingQuerySchema.NAME, GenotypingQuerySchema.TableType.Animal.name(), getContainer(), getUser()); - animalEditDomainURL.addReturnURL(getActionURL()); + animalEditDomainURL.addReturnUrl(getActionURL()); ActionURL haplotypeQueryURL = QueryService.get().urlFor(getUser(), getContainer(), QueryAction.executeQuery, "genotyping", "Haplotype"); ActionURL haplotypeEditDomainURL = PropertyService.get().getDomainKind(schema.getDomainURI(GenotypingQuerySchema.TableType.Haplotype.name())).urlCreateDefinition(GenotypingQuerySchema.NAME, GenotypingQuerySchema.TableType.Haplotype.name(), getContainer(), getUser()); - haplotypeEditDomainURL.addReturnURL(getActionURL()); + haplotypeEditDomainURL.addReturnUrl(getActionURL()); %>