/** * Returns the path relative to the context root. * * Doesn't start with '/' but ends with '/' (except returns * empty string when this is the default view). */ public String getUrl() { return isDefault() ? (owner!=null ? owner.getUrl() : "") : getViewUrl(); }
/** * Same as {@link #getUrl()} except this returns a view/{name} path * even for the default view. */ public String getViewUrl() { return (owner!=null ? owner.getUrl() : "") + "view/" + Util.rawEncode(getViewName()) + '/'; }
/** * Deletes this view. */ @RequirePOST public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { checkPermission(DELETE); owner.deleteView(this); rsp.sendRedirect2(req.getContextPath()+"/" + owner.getUrl()); }
/** * Deletes this item. * Note on the funny name: for reasons of historical compatibility, this URL is {@code /doDelete} * since it predates {@code <l:confirmationLink>}. {@code /delete} goes to a Jelly page * which should now be unused by core but is left in case plugins are still using it. */ @RequirePOST public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { delete(); if (req == null || rsp == null) { // CLI return; } List<Ancestor> ancestors = req.getAncestors(); ListIterator<Ancestor> it = ancestors.listIterator(ancestors.size()); String url = getParent().getUrl(); // fallback but we ought to get to Jenkins.instance at the root while (it.hasPrevious()) { Object a = it.previous().getObject(); if (a instanceof View) { url = ((View) a).getUrl(); break; } else if (a instanceof ViewGroup && a != this) { url = ((ViewGroup) a).getUrl(); break; } } rsp.sendRedirect2(req.getContextPath() + '/' + url); }
/** * Used by Jelly to get the correct configure URL when linking from views with no jobs. * * @return String - cron */ @SuppressWarnings(UNUSED) public String getConfigureUrl() { return getOwner().getUrl() + "configure"; }
/** * Returns the path relative to the context root. * * Doesn't start with '/' but ends with '/' (except returns * empty string when this is the default view). */ public String getUrl() { return isDefault() ? (owner!=null ? owner.getUrl() : "") : getViewUrl(); }
/** * Same as {@link #getUrl()} except this returns a view/{name} path * even for the default view. */ public String getViewUrl() { return (owner!=null ? owner.getUrl() : "") + "view/" + Util.rawEncode(getViewName()) + '/'; }
/** * Same as {@link #getUrl()} except this returns a view/{name} path even for * the default view. */ public String getViewUrl() { return (owner != null ? owner.getUrl() : "") + "view/" + Util.rawEncode(getViewName()) + '/'; }
/** * Same as {@link #getUrl()} except this returns a view/{name} path * even for the default view. */ public String getViewUrl() { return (owner!=null ? owner.getUrl() : "") + "view/" + Util.rawEncode(getViewName()) + '/'; }
/** * Same as {@link #getUrl()} except this returns a view/{name} path * even for the default view. */ public String getViewUrl() { return (owner!=null ? owner.getUrl() : "") + "view/" + Util.rawEncode(getViewName()) + '/'; }
/** * Same as {@link #getUrl()} except this returns a view/{name} path * even for the default view. */ public String getViewUrl() { return (owner!=null ? owner.getUrl() : "") + "view/" + Util.rawEncode(getViewName()) + '/'; }
new Object[]{allView.owner.getUrl(), primaryView, DEFAULT_VIEW_NAME}); allView.name = DEFAULT_VIEW_NAME; return DEFAULT_VIEW_NAME;
/** * Deletes this view. */ @RequirePOST public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { checkPermission(DELETE); owner.deleteView(this); rsp.sendRedirect2(req.getContextPath()+"/" + owner.getUrl()); }
/** * Deletes this view. */ public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { requirePOST(); checkPermission(DELETE); owner.deleteView(this); rsp.sendRedirect2(req.getContextPath()+"/" + owner.getUrl()); }
/** * Deletes this view. */ public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { requirePOST(); checkPermission(DELETE); owner.deleteView(this); rsp.sendRedirect2(req.getContextPath()+"/" + owner.getUrl()); }
/** * Deletes this view. */ public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { requirePOST(); checkPermission(DELETE); owner.deleteView(this); rsp.sendRedirect2(req.getContextPath()+"/" + owner.getUrl()); }
/** * Deletes this item. * Note on the funny name: for reasons of historical compatibility, this URL is {@code /doDelete} * since it predates {@code <l:confirmationLink>}. {@code /delete} goes to a Jelly page * which should now be unused by core but is left in case plugins are still using it. */ @RequirePOST public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { delete(); if (req == null || rsp == null) { // CLI return; } List<Ancestor> ancestors = req.getAncestors(); ListIterator<Ancestor> it = ancestors.listIterator(ancestors.size()); String url = getParent().getUrl(); // fallback but we ought to get to Jenkins.instance at the root while (it.hasPrevious()) { Object a = it.previous().getObject(); if (a instanceof View) { url = ((View) a).getUrl(); break; } else if (a instanceof ViewGroup && a != this) { url = ((ViewGroup) a).getUrl(); break; } } rsp.sendRedirect2(req.getContextPath() + '/' + url); }
/** * Deletes this view. */ public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { requirePOST(); checkPermission(DELETE); owner.deleteView(this); removeFromTeam(getViewName()); rsp.sendRedirect2(req.getContextPath() + "/" + owner.getUrl()); }