本文整理匯總了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;
}
示例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;
}
示例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";
}
}
示例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;
}
示例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();
}
}
示例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);
}
}
}