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 TypeMethodDescriptionvoidvalidateVersionForArchival(Payment payment, Integer versionToTest) Determines if the providedversionToTestis valid for an archival of thePayment.voidvalidateVersionForUpdate(Payment payment, Integer versionToTest) Determines if the providedversionToTestis valid for an update of thePayment.booleanversionIsStale(Payment payment, Integer versionToTest) Determines if the providedversionToTestis valid for thePayment.
-
Method Details
-
versionIsStale
Determines if the providedversionToTestis valid for thePayment. -
validateVersionForUpdate
Determines if the providedversionToTestis valid for an update of thePayment.- Parameters:
payment- ThePaymentwhose 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 providedversionToTestis valid for an archival of thePayment.- Parameters:
payment- ThePaymentwhose 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.
-