當前位置: 首頁>>代碼示例>>Java>>正文


Java StaplerRequest.checkIfModified方法代碼示例

本文整理匯總了Java中org.kohsuke.stapler.StaplerRequest.checkIfModified方法的典型用法代碼示例。如果您正苦於以下問題:Java StaplerRequest.checkIfModified方法的具體用法?Java StaplerRequest.checkIfModified怎麽用?Java StaplerRequest.checkIfModified使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.kohsuke.stapler.StaplerRequest的用法示例。


在下文中一共展示了StaplerRequest.checkIfModified方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: doGraph

import org.kohsuke.stapler.StaplerRequest; //導入方法依賴的package包/類
/**
 * Create the graph image for the number of pass/warn/fail results in a test run, for the previous three Jenkins runs.
 *
 * @param request
 * @param response
 * @throws IOException
 */
@SuppressWarnings("unused")
public void doGraph(StaplerRequest request, StaplerResponse response) throws IOException {
    // Abort if having Java AWT issues.
    if (ChartUtil.awtProblemCause != null) {
        response.sendRedirect2(String.format("%s/images/headless.png", request.getContextPath()));
        return;
    }

    // Check the "If-Modified-Since" header and abort if we don't need re-create the graph.
    if (isCompleted()) {
        Calendar timestamp = getOwner().getTimestamp();
        if (request.checkIfModified(timestamp, response)) {
            return;
        }
    }

    // Create new graph for this AWS Device Farm result.
    Graph graph = AWSDeviceFarmGraph.createResultTrendGraph(build, isCompleted(), getPreviousResults(DefaultTrendGraphSize));
    graph.doPng(request, response);
}
 
開發者ID:awslabs,項目名稱:aws-device-farm-jenkins-plugin,代碼行數:28,代碼來源:AWSDeviceFarmTestResult.java

示例2: doDurationGraph

import org.kohsuke.stapler.StaplerRequest; //導入方法依賴的package包/類
/**
 * Create the graph image for the number of device minutes used in a test run, for the previous three Jenkins runs.
 *
 * @param request
 * @param response
 * @throws IOException
 */
@SuppressWarnings("unused")
public void doDurationGraph(StaplerRequest request, StaplerResponse response) throws IOException {
    // Abort if having Java AWT issues.
    if (ChartUtil.awtProblemCause != null) {
        response.sendRedirect2(String.format("%s/images/headless.png", request.getContextPath()));
        return;
    }

    // Check the "If-Modified-Since" header and abort if we don't need re-create the graph.
    if (isCompleted()) {
        Calendar timestamp = getOwner().getTimestamp();
        if (request.checkIfModified(timestamp, response)) {
            return;
        }
    }

    // Create new duration graph for this AWS Device Farm result.
    Graph graph = AWSDeviceFarmGraph.createDurationTrendGraph(build, isCompleted(), getPreviousResults(DefaultTrendGraphSize));
    graph.doPng(request, response);
}
 
開發者ID:awslabs,項目名稱:aws-device-farm-jenkins-plugin,代碼行數:28,代碼來源:AWSDeviceFarmTestResult.java

示例3: doGraph

import org.kohsuke.stapler.StaplerRequest; //導入方法依賴的package包/類
/**
 * Generates a PNG image for the test result trend.
 */
public void doGraph(StaplerRequest req, StaplerResponse rsp) throws IOException {
    if (ChartUtil.awtProblemCause != null) {
        // not available. send out error message
        rsp.sendRedirect2(req.getContextPath() + "/images/headless.png");
        return;
    }

    CxScanResult cxScanResult = getLastSynchronousBuildAction();
    if (cxScanResult != null && req.checkIfModified(cxScanResult.owner.getTimestamp(), rsp)) {
        return;
    }

    ChartUtil.generateGraph(req, rsp, createChart(req, buildDataSet(req)), calcDefaultSize());
}
 
開發者ID:jenkinsci,項目名稱:checkmarx-plugin,代碼行數:18,代碼來源:CxProjectResult.java

示例4: doGraphMap

import org.kohsuke.stapler.StaplerRequest; //導入方法依賴的package包/類
/**
 * Generates a clickable map HTML for {@link #doGraph(StaplerRequest, StaplerResponse)}.
 */
public void doGraphMap(StaplerRequest req, StaplerResponse rsp) throws IOException {
    CxScanResult cxScanResult = getLastSynchronousBuildAction();
    if (cxScanResult != null && req.checkIfModified(cxScanResult.owner.getTimestamp(), rsp)) {
        return;
    }
    ChartUtil.generateClickableMap(req, rsp, createChart(req, buildDataSet(req)), calcDefaultSize());
}
 
開發者ID:jenkinsci,項目名稱:checkmarx-plugin,代碼行數:11,代碼來源:CxProjectResult.java


注:本文中的org.kohsuke.stapler.StaplerRequest.checkIfModified方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。