Interface PaymentVersionValidationService
- All Known Implementing Classes:
DefaultPaymentVersionValidationService
public interface PaymentVersionValidationService
Service used for validating the version of a
Payment
for reads and updates within this
service.- Author:
- Chris Kittrell (ckittrell)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validateVersionForArchival
(Payment payment, Integer versionToTest) Determines if the providedversionToTest
is valid for an archival of thePayment
.void
validateVersionForUpdate
(Payment payment, Integer versionToTest) Determines if the providedversionToTest
is valid for an update of thePayment
.boolean
versionIsStale
(Payment payment, Integer versionToTest) Determines if the providedversionToTest
is valid for thePayment
.
-
Method Details
-
versionIsStale
Determines if the providedversionToTest
is valid for thePayment
. -
validateVersionForUpdate
Determines if the providedversionToTest
is valid for an update of thePayment
.- Parameters:
payment
- ThePayment
whose version is being validated.versionToTest
- The version provided by the request, which may or may not be out of date.- Throws:
StalePaymentVersionException
- If the provided version is stale.
-
validateVersionForArchival
Determines if the providedversionToTest
is valid for an archival of thePayment
.- Parameters:
payment
- ThePayment
whose version is being validated.versionToTest
- The version provided by the request, which may or may not be out of date.- Throws:
StalePaymentVersionException
- If the provided version is stale.
-