Package org.approvej
Interface ApprovalResult
- All Known Implementing Classes:
FileApprovalResult
,InplaceApprovalResult
public interface ApprovalResult
Interface for results of approvals.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Determines if the result needs approval by a human reviewer.Returns the previously approved value.received()
Returns the received value.default void
Throws anApprovalError
ifneedsApproval()
returns true.
-
Method Details
-
previouslyApproved
String previouslyApproved()Returns the previously approved value.- Returns:
- the previously approved value
-
received
String received()Returns the received value.- Returns:
- the received value
-
needsApproval
default boolean needsApproval()Determines if the result needs approval by a human reviewer.- Returns:
- true, if an approval is needed; false if the received value equals the previously approved
-
throwIfNotApproved
default void throwIfNotApproved()Throws anApprovalError
ifneedsApproval()
returns true.- Throws:
ApprovalError
- ifneedsApproval()
returns true
-