Class DefaultPaymentAccountValidator<P extends PaymentAccount>

  • All Implemented Interfaces:
    com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator

    @Deprecated(since="1.7.2",
                forRemoval=true)
    public class DefaultPaymentAccountValidator<P extends PaymentAccount>
    extends Object
    implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 1.7.2, in favor of using SavedPaymentMethod in PaymentTransactionServices to manage saved payment methods.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultPaymentAccountValidator​(PaymentAccountRepository<com.broadleafcommerce.data.tracking.core.Trackable> paymentAccountRepository)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected P fromRepositoryDomain​(com.broadleafcommerce.data.tracking.core.Trackable trackable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper getHelper()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected PaymentAccountRepository<com.broadleafcommerce.data.tracking.core.Trackable> getPaymentAccountRepository()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      void setHelper​(com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      boolean supports​(Class<?> serviceClass, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected void throwIfErrors​(org.springframework.validation.Errors errors)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws a ValidationException if Errors.hasErrors() returns true.
      void validate​(Object paymentAccount, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected void validateCreate​(P paymentAccount, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      void validateForCreate​(Object paymentAccount, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      void validateForReplace​(Object paymentAccount, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      void validateForUpdate​(Object paymentAccount, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected void validateUpdate​(String id, P paymentAccount, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Constructor Detail

      • DefaultPaymentAccountValidator

        public DefaultPaymentAccountValidator​(PaymentAccountRepository<com.broadleafcommerce.data.tracking.core.Trackable> paymentAccountRepository)
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • validate

        public void validate​(@NonNull
                             Object paymentAccount,
                             @NonNull
                             org.springframework.validation.Errors errors,
                             com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        validate in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
      • validateForCreate

        public void validateForCreate​(@NonNull
                                      Object paymentAccount,
                                      @NonNull
                                      org.springframework.validation.Errors errors,
                                      com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        validateForCreate in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
      • validateForUpdate

        public void validateForUpdate​(@NonNull
                                      Object paymentAccount,
                                      @NonNull
                                      org.springframework.validation.Errors errors,
                                      com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        validateForUpdate in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
      • validateForReplace

        public void validateForReplace​(@NonNull
                                       Object paymentAccount,
                                       @NonNull
                                       org.springframework.validation.Errors errors,
                                       com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        validateForReplace in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
      • setHelper

        @Autowired
        @Lazy
        public void setHelper​(com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • supports

        public boolean supports​(Class<?> serviceClass,
                                com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        supports in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
      • validateCreate

        protected void validateCreate​(@NonNull
                                      P paymentAccount,
                                      @NonNull
                                      org.springframework.validation.Errors errors,
                                      com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • validateUpdate

        protected void validateUpdate​(@Nullable
                                      String id,
                                      @NonNull
                                      P paymentAccount,
                                      @NonNull
                                      org.springframework.validation.Errors errors,
                                      com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • throwIfErrors

        protected void throwIfErrors​(org.springframework.validation.Errors errors)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Throws a ValidationException if Errors.hasErrors() returns true. May be overridden if throwing a runtime exception is undesirable.
        Parameters:
        errors - The errors object bound to the payment account that has been validated.
      • fromRepositoryDomain

        protected P fromRepositoryDomain​(com.broadleafcommerce.data.tracking.core.Trackable trackable,
                                         com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getPaymentAccountRepository

        protected PaymentAccountRepository<com.broadleafcommerce.data.tracking.core.Trackable> getPaymentAccountRepository()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getHelper

        protected com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper getHelper()
        Deprecated, for removal: This API element is subject to removal in a future version.