Class DefaultPaymentVersionValidationService
java.lang.Object
com.broadleafcommerce.paymenttransaction.service.validation.DefaultPaymentVersionValidationService
- All Implemented Interfaces:
PaymentVersionValidationService
public class DefaultPaymentVersionValidationService
extends Object
implements PaymentVersionValidationService
The default implementation of
PaymentVersionValidationService
.- Author:
- Chris Kittrell (ckittrell)
-
Constructor Summary
-
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
.
-
Constructor Details
-
DefaultPaymentVersionValidationService
public DefaultPaymentVersionValidationService()
-
-
Method Details
-
versionIsStale
Description copied from interface:PaymentVersionValidationService
Determines if the providedversionToTest
is valid for thePayment
.- Specified by:
versionIsStale
in interfacePaymentVersionValidationService
- Parameters:
payment
- ThePayment
whose version is being validated.versionToTest
- The version provided by the request, which may or may not be out of date.- Returns:
- Whether the provided
versionToTest
is valid for thePayment
.
-
validateVersionForUpdate
Description copied from interface:PaymentVersionValidationService
Determines if the providedversionToTest
is valid for an update of thePayment
.- Specified by:
validateVersionForUpdate
in interfacePaymentVersionValidationService
- Parameters:
payment
- ThePayment
whose version is being validated.versionToTest
- The version provided by the request, which may or may not be out of date.
-
validateVersionForArchival
Description copied from interface:PaymentVersionValidationService
Determines if the providedversionToTest
is valid for an archival of thePayment
.- Specified by:
validateVersionForArchival
in interfacePaymentVersionValidationService
- Parameters:
payment
- ThePayment
whose version is being validated.versionToTest
- The version provided by the request, which may or may not be out of date.
-