/** 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()); }
/** 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()) + '/'; }
/** * Returns the path relative to the context root. * * <p>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(); }