summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-09-30 09:22:37 -0400
committerJames Moger <james.moger@gitblit.com>2014-09-30 09:22:37 -0400
commit60bbdfa46d8ce823ea5954fe72447babbadb3051 (patch)
treebf41c455b0828f2b17abfc011e4caff9dc2ecc19
parentc160cbe3634feefac117386d43eeddf6abaecf15 (diff)
downloadgitblit-60bbdfa46d8ce823ea5954fe72447babbadb3051.tar.gz
gitblit-60bbdfa46d8ce823ea5954fe72447babbadb3051.zip
Rename redirect method
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BasePage.java6
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditTicketPage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/NewTicketPage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RootPage.java4
6 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/BasePage.java b/src/main/java/com/gitblit/wicket/pages/BasePage.java
index 03d19184..b6967003 100644
--- a/src/main/java/com/gitblit/wicket/pages/BasePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BasePage.java
@@ -113,11 +113,11 @@ public abstract class BasePage extends SessionPage {
return canonicalUrl;
}
- protected void manualRedirect(Class<? extends BasePage> pageClass) {
- redirect(pageClass, null);
+ protected void redirectTo(Class<? extends BasePage> pageClass) {
+ redirectTo(pageClass, null);
}
- protected void redirect(Class<? extends BasePage> pageClass, PageParameters parameters) {
+ protected void redirectTo(Class<? extends BasePage> pageClass, PageParameters parameters) {
String absoluteUrl = getCanonicalUrl(pageClass, parameters);
getRequestCycle().setRequestTarget(new RedirectRequestTarget(absoluteUrl));
}
diff --git a/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java b/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java
index 801631e8..6e96526e 100644
--- a/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java
@@ -143,7 +143,7 @@ public class EditMilestonePage extends RepositoryPage {
}
if (success && app().tickets().updateMilestone(getRepositoryModel(), tm, createdBy)) {
- redirect(TicketsPage.class, WicketUtils.newOpenTicketsParameter(repositoryName));
+ redirectTo(TicketsPage.class, WicketUtils.newOpenTicketsParameter(repositoryName));
} else {
// TODO error
}
diff --git a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
index b55ce9c3..c3d405bc 100644
--- a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
@@ -331,13 +331,13 @@ public class EditTicketPage extends RepositoryPage {
if (ticket != null) {
TicketNotifier notifier = app().tickets().createNotifier();
notifier.sendMailing(ticket);
- redirect(TicketsPage.class, WicketUtils.newObjectParameter(getRepositoryModel().name, "" + ticket.number));
+ redirectTo(TicketsPage.class, WicketUtils.newObjectParameter(getRepositoryModel().name, "" + ticket.number));
} else {
// TODO error
}
} else {
// nothing to change?!
- redirect(TicketsPage.class, WicketUtils.newObjectParameter(getRepositoryModel().name, "" + ticket.number));
+ redirectTo(TicketsPage.class, WicketUtils.newObjectParameter(getRepositoryModel().name, "" + ticket.number));
}
}
});
diff --git a/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java b/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java
index 24a43120..b452a910 100644
--- a/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java
@@ -108,7 +108,7 @@ public class NewMilestonePage extends RepositoryPage {
if (milestone != null) {
milestone.due = due;
app().tickets().updateMilestone(getRepositoryModel(), milestone, createdBy);
- redirect(TicketsPage.class, WicketUtils.newOpenTicketsParameter(repositoryName));
+ redirectTo(TicketsPage.class, WicketUtils.newOpenTicketsParameter(repositoryName));
} else {
// TODO error
}
diff --git a/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java b/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java
index f80a7d7e..8f28055a 100644
--- a/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java
@@ -223,7 +223,7 @@ public class NewTicketPage extends RepositoryPage {
TicketNotifier notifier = app().tickets().createNotifier();
notifier.sendMailing(ticket);
- redirect(TicketsPage.class, WicketUtils.newObjectParameter(getRepositoryModel().name, "" + ticket.number));
+ redirectTo(TicketsPage.class, WicketUtils.newObjectParameter(getRepositoryModel().name, "" + ticket.number));
} else {
// TODO error
}
diff --git a/src/main/java/com/gitblit/wicket/pages/RootPage.java b/src/main/java/com/gitblit/wicket/pages/RootPage.java
index 15e4304d..43de3b9f 100644
--- a/src/main/java/com/gitblit/wicket/pages/RootPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RootPage.java
@@ -280,12 +280,12 @@ public abstract class RootPage extends BasePage {
PageParameters params = getPageParameters();
if (params == null) {
// redirect to this page
- manualRedirect(getClass());
+ redirectTo(getClass());
} else {
// Strip username and password and redirect to this page
params.remove("username");
params.remove("password");
- redirect(getClass(), params);
+ redirectTo(getClass(), params);
}
}
}