hudson.model.Job.getAbsoluteUrl()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中hudson.model.Job.getAbsoluteUrl()方法的一些代码示例,展示了Job.getAbsoluteUrl()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.getAbsoluteUrl()方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:getAbsoluteUrl

Job.getAbsoluteUrl介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
   * The entry unique ID needs to be tied to a project, so that
   * new builds will replace the old result.
   */
  @Override
  public String getEntryID(Run e) {
    // can't use a meaningful year field unless we remember when the job was created.
    return "tag:hudson.dev.java.net,2008:"+e.getParent().getAbsoluteUrl();
  }
};

代码示例来源:origin: jenkinsci/jenkins

/**
 * Obtains the absolute URL to this build.
 *
 * @deprecated
 *      This method shall <b>NEVER</b> be used during HTML page rendering, as it's too easy for
 *      misconfiguration to break this value, with network set up like Apache reverse proxy.
 *      This method is only intended for the remote API clients who cannot resolve relative references.
 */
@Exported(visibility=2,name="url")
@Deprecated
public final @Nonnull String getAbsoluteUrl() {
  return project.getAbsoluteUrl()+getNumber()+'/';
}

代码示例来源:origin: jenkinsci/analysis-core-plugin

/**
 * Creates a new instance of {@link DefaultGraphConfigurationView}.
 *
 * @param configuration
 *            the graph configuration
 * @param job
 *            the owning job to configure the graphs for
 * @param pluginName
 *            The name of the plug-in.
 * @param buildHistory
 *            the build history for this job
 */
public DefaultGraphConfigurationView(final GraphConfiguration configuration, final Job<?, ?> job,
    final String pluginName, final BuildHistory buildHistory) {
  this(configuration, job, pluginName, buildHistory,
      job.getAbsoluteUrl() + pluginName + "/configureDefaults");
}

代码示例来源:origin: hudson/hudson-2.x

/**
   * The entry unique ID needs to be tied to a project, so that
   * new builds will replace the old result.
   */
  @Override
  public String getEntryID(Run e) {
    // can't use a meaningful year field unless we remember when the job was created.
    return "tag:hudson.java.net,2008:"+e.getParent().getAbsoluteUrl();
  }
};

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
   * The entry unique ID needs to be tied to a project, so that
   * new builds will replace the old result.
   */
  @Override
  public String getEntryID(Run e) {
    // can't use a meaningful year field unless we remember when the job was created.
    return "tag:hudson.dev.java.net,2008:"+e.getParent().getAbsoluteUrl();
  }
};

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
   * The entry unique ID needs to be tied to a project, so that
   * new builds will replace the old result.
   */
  @Override
  public String getEntryID(Run e) {
    // can't use a meaningful year field unless we remember when the job was created.
    return "tag:hudson.java.net,2008:"+e.getParent().getAbsoluteUrl();
  }
};

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
   * The entry unique ID needs to be tied to a project, so that
   * new builds will replace the old result.
   */
  @Override
  public String getEntryID(Run e) {
    // can't use a meaningful year field unless we remember when the job was created.
    return "tag:hudson.java.net,2008:"+e.getParent().getAbsoluteUrl();
  }
};

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
   * The entry unique ID needs to be tied to a project, so that new builds
   * will replace the old result.
   */
  @Override
  public String getEntryID(Run e) {
    // can't use a meaningful year field unless we remember when the job was created.
    return "tag:hudson.java.net,2008:" + e.getParent().getAbsoluteUrl();
  }
};

代码示例来源:origin: org.hudsonci.plugins/disk-usage

public static String getProjectUrl(Job project) {
  return Util.encode(project.getAbsoluteUrl());
}

代码示例来源:origin: org.jenkins-ci.plugins/disk-usage

public static String getProjectUrl(Job project) {
  return Util.encode(project.getAbsoluteUrl());
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Obtains the absolute URL to this build.
 *
 * @deprecated
 *      This method shall <b>NEVER</b> be used during HTML page rendering, as it's too easy for
 *      misconfiguration to break this value, with network set up like Apache reverse proxy.
 *      This method is only intended for the remote API clients who cannot resolve relative references.
 */
@Exported(visibility=2,name="url")
@Deprecated
public final @Nonnull String getAbsoluteUrl() {
  return project.getAbsoluteUrl()+getNumber()+'/';
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Obtains the absolute URL to this build.
 *
 * @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.)
 */
@Exported(visibility=2,name="url")
public final String getAbsoluteUrl() {
  return project.getAbsoluteUrl()+getNumber()+'/';
}

代码示例来源:origin: jenkinsci/analysis-core-plugin

/**
 * Returns the URL of this object.
 *
 * @return the URL of this object
 */
public String getUrl() {
  return getOwner().getAbsoluteUrl() + "/" + getKey() + "/configure";
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Obtains the absolute URL to this build.
 *
 * @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.)
 */
@Exported(visibility=2,name="url")
public final String getAbsoluteUrl() {
  return project.getAbsoluteUrl()+getNumber()+'/';
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Obtains the absolute URL to this build.
 *
 * @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.)
 */
@Exported(visibility = 2, name = "url")
public final String getAbsoluteUrl() {
  return project.getAbsoluteUrl() + getNumber() + '/';
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Obtains the absolute URL to this build.
 *
 * @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.)
 */
@Exported(visibility=2,name="url")
public final String getAbsoluteUrl() {
  return project.getAbsoluteUrl()+getNumber()+'/';
}

代码示例来源:origin: jenkinsci/tfs-plugin

public static TeamGitStatus fromJob(@Nonnull final Job job) {
  final TeamGitStatus status = new TeamGitStatus();
  status.state = GitStatusState.Pending;
  status.description = "Jenkins Job " + job.getDisplayName() + " queued";
  status.targetUrl = job.getAbsoluteUrl();
  status.context = getStatusContext(job);
  return status;
}

代码示例来源:origin: jenkinsci/analysis-core-plugin

/**
 * Saves the configured values. Subclasses need to implement the actual persistence.
 *
 * @param request
 *            Stapler request
 * @param response
 *            Stapler response
 */
public void doSave(final StaplerRequest request, final StaplerResponse response) {
  try {
    JSONObject formData = request.getSubmittedForm();
    if (configuration.initializeFrom(formData)) {
      persistValue(configuration.serializeToString(), key, request, response);
    }
  }
  catch (IOException exception) {
    LOGGER.log(Level.SEVERE, "Can't save the form data: " + request, exception);
  }
  catch (ServletException exception) {
    LOGGER.log(Level.SEVERE, "Can't process the form data: " + request, exception);
  }
  finally {
    try {
      response.sendRedirect(owner.getAbsoluteUrl());
    }
    catch (IOException exception) {
      LOGGER.log(Level.SEVERE, "Can't redirect", exception);
    }
  }
}

代码示例来源:origin: jenkinsci/gerrit-trigger-plugin

response.sendRedirect2(entity.getProject().getAbsoluteUrl());

代码示例来源:origin: jenkinsci/gerrit-trigger-plugin

response.sendRedirect2(entity.getProject().getAbsoluteUrl());

相关文章

微信公众号

最新文章

更多

Job类方法