Package com.vaadin.signals.impl
Interface CommandResult
- All Known Implementing Classes:
 CommandResult.Accept,CommandResult.Reject
The result of applying a signal command against a tree revision. The result
 is either to accept or reject the command.
- See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAn accepted command.static final recordA data node update in an accepted command result.static final recordA rejected command, together with the reason for the rejection. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepted()Tests whether this command result is accepted or rejected.static CommandResultconditional(boolean condition, String reasonIfFailed) Creates an accepted or rejected result depending on the provided condition.static CommandResult.RejectCreates a new rejected result with the given reason.static CommandResult.Acceptok()Creates a simple accepted result without modifications or original inserts.static Map<Id, CommandResult> rejectAll(Map<Id, CommandResult> results, String reason) Creates a copy of the given map of command results where all accepted results are replaced with the same rejection. 
- 
Method Details
- 
accepted
boolean accepted()Tests whether this command result is accepted or rejected.- Returns:
 trueif the command is accepted,falseif it's rejected
 - 
rejectAll
Creates a copy of the given map of command results where all accepted results are replaced with the same rejection.- Parameters:
 results- the original map from ids to command results, notnullreason- the rejection reason string, notnull- Returns:
 - a map with all accepted results replaced with rejections
 
 - 
ok
Creates a simple accepted result without modifications or original inserts.- Returns:
 - the accepted result, not 
null 
 - 
fail
Creates a new rejected result with the given reason.- Parameters:
 reason- the reason string to use, notnull- Returns:
 - a new rejected result, not 
null 
 - 
conditional
Creates an accepted or rejected result depending on the provided condition.- Parameters:
 condition- the condition to checkreasonIfFailed- the reason string to use if rejected, notnull- Returns:
 - an accepted result if the condition is 
true, a rejected result if the condition isfalse 
 
 -