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


Java Result.equals方法代碼示例

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


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

示例1: isRelevant

import hudson.model.Result; //導入方法依賴的package包/類
public static boolean isRelevant(OTCNotifier notifier, String phase, Result result){
    boolean onStarted;
    boolean onCompleted;
    boolean onFinalized;
    boolean failureOnly;

    //Make sure OTC Notifier was found in the publisherList
    if(notifier != null){
        onStarted = notifier.getOnStarted();
        onCompleted = notifier.getOnCompleted();
        onFinalized = notifier.getOnFinalized();
        failureOnly = notifier.getFailureOnly();

        if(onStarted && "STARTED".equals(phase) || onCompleted && "COMPLETED".equals(phase)
                || onFinalized && "FINALIZED".equals(phase)){//check selections
            if(failureOnly && result != null && result.equals(Result.FAILURE) || !failureOnly){//check failureOnly
                return true;
            }
        }
    }

    return false;
}
 
開發者ID:IBM,項目名稱:ibm-cloud-devops,代碼行數:24,代碼來源:EventHandler.java

示例2: runToBuildPhase

import hudson.model.Result; //導入方法依賴的package包/類
private String runToBuildPhase(Run run) {
	if (run != null && !run.hasntStartedYet()) {
		if (run.isBuilding()) {
			return BuildPhases.RUNNING;
		} else {
			Result result = run.getResult();
			if (result != null) {
				if (result.equals(Result.SUCCESS)) {
					return BuildPhases.COMPLETE;
				} else if (result.equals(Result.ABORTED)) {
					return BuildPhases.CANCELLED;
				} else if (result.equals(Result.FAILURE)) {
					return BuildPhases.FAILED;
				} else if (result.equals(Result.UNSTABLE)) {
					return BuildPhases.FAILED;
				} else {
					return BuildPhases.PENDING;
				}
			}
		}
	}
	return BuildPhases.NEW;
}
 
開發者ID:jenkinsci,項目名稱:openshift-sync-plugin,代碼行數:24,代碼來源:BuildSyncRunListener.java

示例3: getRunStatus

import hudson.model.Result; //導入方法依賴的package包/類
private String getRunStatus(AbstractBuild<?, ?> theBuild) {
    Result result = theBuild.getResult();
    if (result != null) {
        if (result.isBetterOrEqualTo(Result.SUCCESS)) {
            return "PASSED";
        } else if (result.isBetterOrEqualTo(Result.UNSTABLE)) {
            return "WARNING";
        } else if (result.equals(Result.ABORTED)) {
            return "INTERRUPTED";
        } else {
            return "FAILED";
        }
    } else {
        return "FAILED";
    }
}
 
開發者ID:jenkinsci,項目名稱:ontrack-plugin,代碼行數:17,代碼來源:OntrackValidationRunNotifier.java

示例4: shouldPostDeployableMappingMessage

import hudson.model.Result; //導入方法依賴的package包/類
public static boolean shouldPostDeployableMappingMessage(OTCNotifier notifier, String phase, Result result){
	// publish deployable mapping message only is traceability is enabled, phase is completed and build is successful
	if(notifier != null && notifier.getEnableTraceability()){   		
		if ("COMPLETED".equals(phase) && result.equals(Result.SUCCESS)){
			return true;
		}
	}
	return false;
}
 
開發者ID:IBM,項目名稱:ibm-cloud-devops,代碼行數:10,代碼來源:EventHandler.java

示例5: onCompleted

import hudson.model.Result; //導入方法依賴的package包/類
@Override
public void onCompleted(AbstractBuild builder, @Nonnull TaskListener listener) {

    Result result = builder.getResult();
    if (null != result && result.equals(Result.SUCCESS)) {
        getService(builder, listener).success();
    } else {
        getService(builder, listener).failed();
    }
}
 
開發者ID:wanyukang,項目名稱:custom-notifier-plugin,代碼行數:11,代碼來源:JobListener.java

示例6: fireDifference

import hudson.model.Result; //導入方法依賴的package包/類
private void fireDifference(Collection<View> affectedViews) {
	for (View view : affectedViews) {
		String key = key(view);
		Result newResult = getResult(view);
		Result oldResult = results.get(key);
		if(oldResult != null && !oldResult.equals(newResult)) {
			results.put(key, newResult);
			fireViewChanged(view, oldResult, newResult);
		}
	}
}
 
開發者ID:baloise,項目名稱:rocket-chat-notifier,代碼行數:12,代碼來源:ViewTracker.java


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