|
|
|
|
@ -40,16 +40,18 @@ public class OperationResult {
|
|
|
|
|
public boolean ok () {
|
|
|
|
|
boolean proxiedOK = proxiedOK();
|
|
|
|
|
|
|
|
|
|
if (!proxiedOK) { for (OperationMessage message : this.messages) { System.out.println(message.toString()); } }
|
|
|
|
|
if (!proxiedOK) { this.messages.forEach(message -> {
|
|
|
|
|
System.out.println(message.toString());
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return proxiedOK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean proxiedOK () {
|
|
|
|
|
|
|
|
|
|
if (this.messages.stream().anyMatch(message -> (message.type().equals(MessageType.FAIL)))) { return false; }
|
|
|
|
|
|
|
|
|
|
if (!this.subresults.stream().noneMatch(subresult -> (!subresult.ok()))) { return false; }
|
|
|
|
|
return true;
|
|
|
|
|
if (this.messages.stream().anyMatch(message -> (message.type().equals(MessageType.FAIL)))) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return this.subresults.stream().noneMatch(subresult -> (!subresult.ok()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public long timestamp () {
|
|
|
|
|
|