public static String encode(String s) { return Util.encode(s); }
/** * Returns the absolute URL of this item. This relies on the current * {@link StaplerRequest} to figure out what the host name is, * so can be used only during processing client requests. * * @return * absolute URL. * @throws IllegalStateException * if the method is invoked outside the HTTP request processing. * * @deprecated * This method shall <b>NEVER</b> be used during HTML page rendering, as it won't work with * network set up like Apache reverse proxy. * This method is only intended for the remote API clients who cannot resolve relative references * (even this won't work for the same reason, which should be fixed.) */ @Deprecated default String getAbsoluteUrl() { String r = Jenkins.getInstance().getRootUrl(); if(r==null) throw new IllegalStateException("Root URL isn't configured yet. Cannot compute absolute URL."); return Util.encode(r+getUrl()); }
URL jobURL = new URL(home + "job/" + Util.encode(projectName).replace("/", "/job/") + "/");
public static String encode(String s) { return Util.encode(s); }
public static String encode(String s) { return Util.encode(s); }
public static String encode(String s) { return Util.encode(s); }
public static String encode(String s) { return Util.encode(s); }
public static String encode(String s) { return Util.encode(s); }
public static String getProjectUrl(Job project) { return Util.encode(project.getAbsoluteUrl()); }
public static String getProjectUrl(Job project) { return Util.encode(project.getAbsoluteUrl()); }
/** * Returns the full URL to the build details page for a given build. */ public static String getBuildURL(AbstractBuild<?, ?> build) { // The hudson's base url final StringBuilder builder; if (Hudson.getInstance() != null) { builder = new StringBuilder( String.valueOf(Hudson.getInstance().getRootUrl())); } else { builder = new StringBuilder("null"); } // The build's url, escaped for project with space or other specials // characters builder.append(Util.encode(build.getUrl())); return builder.toString(); }
@Exported(visibility=999,name="url") public final String getAbsoluteUrl() { String r = Jenkins.getInstance().getRootUrl(); if(r==null) throw new IllegalStateException("Root URL isn't configured yet. Cannot compute absolute URL."); return Util.encode(r+getUrl()); }
@Exported(visibility=999,name="url") public final String getAbsoluteUrl() { StaplerRequest request = Stapler.getCurrentRequest(); if(request==null) throw new IllegalStateException("Not processing a HTTP request"); return Util.encode(Hudson.getInstance().getRootUrl()+getUrl()); }
@Exported(visibility=999,name="url") public final String getAbsoluteUrl() { StaplerRequest request = Stapler.getCurrentRequest(); if(request==null) throw new IllegalStateException("Not processing a HTTP request"); return Util.encode(Hudson.getInstance().getRootUrl()+getUrl()); }
@Exported(visibility = 999, name = "url") public final String getAbsoluteUrl() { StaplerRequest request = Stapler.getCurrentRequest(); if (request == null) { throw new IllegalStateException("Not processing a HTTP request"); } return Util.encode(Hudson.getInstance().getRootUrl() + getUrl()); }
@Exported(visibility=999,name="url") public final String getAbsoluteUrl() { StaplerRequest request = Stapler.getCurrentRequest(); if(request==null) throw new IllegalStateException("Not processing a HTTP request"); return Util.encode(Hudson.getInstance().getRootUrl()+getUrl()); }
/** * Appends build URL to the builder. * * @param build build. * @param buf {@link StringBuilder}. */ protected void appendBuildUrl(AbstractBuild<?, ?> build, StringBuilder buf) { appendUrl(Util.encode(build.getUrl()) + (build.getChangeSet().isEmptySet() ? "" : "changes"), buf); }
/** * Appends build URL to the builder. * * @param build build. * @param buf {@link StringBuilder}. */ protected void appendBuildUrl(AbstractBuild<?, ?> build, StringBuilder buf) { appendUrl(Util.encode(build.getUrl()) + (build.getChangeSet().isEmptySet() ? "" : "changes"), buf); }
/** * Appends build URL to the builder. * * @param build build. * @param buf {@link StringBuilder}. */ protected void appendBuildUrl(AbstractBuild<?, ?> build, StringBuilder buf) { appendUrl(Util.encode(build.getUrl()) + (build.getChangeSet().isEmptySet() ? "" : "changes"), buf); }
/** * Appends build URL to the builder. * * @param build build. * @param buf {@link StringBuilder}. */ protected void appendBuildUrl(AbstractBuild<?, ?> build, StringBuilder buf) { appendUrl(Util.encode(build.getUrl()) + (build.getChangeSet().isEmptySet() ? "" : "changes"), buf); }