pushing up the getUrl method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13959 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-12-30 01:40:27 +00:00
1 parent 57e4bacbb9
commit 9b480fa311
4 files changed
+4 -11

No files matched your search

@@ -118,10 +118,6 @@ public class ListView extends View {
return item;
}
public String getUrl() {
return "view/"+name+'/';
}
@Override
public synchronized void onJobChange(Item item, String oldName, String newName) {
jobNames.remove(oldName);
@@ -55,11 +55,6 @@ public class MyView extends View {
return Collections.unmodifiableList(items);
}
@Override
public String getUrl() {
return "view/" + getViewName() + "/";
}
@Override
public String getPostConstructLandingPage() {
return ""; // there's no configuration page
+3 -1
View File
@@ -100,7 +100,9 @@ public abstract class View extends AbstractModelObject implements AccessControll
* Doesn't start with '/' but ends with '/'. (except when this is
* Hudson,
*/
public abstract String getUrl();
public String getUrl() {
return owner.getUrl()+"view/"+getViewName()+'/';
}
public String getSearchUrl() {
return getUrl();
@@ -28,7 +28,7 @@ public interface ViewGroup extends Saveable, ModelObject {
/**
* Gets a view of the given name.
*
* This also creates the URL binding for views (in the form of ".../view/FOOBAR/..."
* This also creates the URL binding for views (in the form of ".../view/FOOBAR/...")
*/
View getView(String name);