Class DefaultPaymentAccountService<P extends PaymentAccount>
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
-
- com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
-
- com.broadleafcommerce.customer.service.DefaultPaymentAccountService<P>
-
- All Implemented Interfaces:
PaymentAccountService<P>,com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
@Deprecated(since="1.7.2", forRemoval=true) public class DefaultPaymentAccountService<P extends PaymentAccount> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements PaymentAccountService<P>
Deprecated, for removal: This API element is subject to removal in a future version.since 1.7.2, in favor of usingSavedPaymentMethodin PaymentTransactionServices to manage saved payment methods.
-
-
Constructor Summary
Constructors Constructor Description DefaultPaymentAccountService(PaymentAccountRepository<com.broadleafcommerce.data.tracking.core.Trackable> paymentAccountRepository, CustomerService<Customer> customerService, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)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 PaymentAccountaddPaymentAccount(@NonNull String customerId, P paymentAccountRequest, boolean makeDefaultAccount, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Pass the paymentAccountJpaPaymentAccountfor processing the default account relationship with the customer before saving to the data store.protected CustomerRefcreateCustomerRefFromCustomer(@NonNull Customer customer)Deprecated, for removal: This API element is subject to removal in a future version.Creates aCustomerRefbased on the providedCustomerobjectvoiddelete(@NonNull String customerId, @NonNull String paymentAccountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Pass the ID of the paymentAccountJpaPaymentAccountand the owning customer for removal of the paymentAccount.protected CustomerService<Customer>getCustomerService()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.protected com.broadleafcommerce.common.extension.TypeFactorygetTypeFactory()Deprecated, for removal: This API element is subject to removal in a future version.org.springframework.data.domain.Page<P>readAllByCustomerId(@NonNull String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters)Deprecated, for removal: This API element is subject to removal in a future version.Pass theCustomerID to find all the active paymentAccountJpaPaymentAccountentitiesList<P>readAllByOriginatingPaymentId(List<String> originatingPaymentIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Find all thePaymentAccountsbyPaymentAccount.getOriginatingPaymentId()PreadByContextIdAndCustomerId(@NonNull String id, @NonNull String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Pass the ID of the paymentAccountJpaPaymentAccountand the owning customer ID for retrieval of the paymentAccount from the data store.List<P>readPaymentAccountsByContextId(@NonNull List<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Pass a list of paymentAccount IDs to return a list of the paymentAccountsJpaPaymentAccountassociated with those IDs.Pupdate(P paymentAccount, @NonNull Customer customer, boolean makeDefaultAccount, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Pass the updated paymentAccountJpaPaymentAccountand the owning customer for persistence to the data store.-
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAll
-
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService
convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getRepository, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
-
-
-
Constructor Detail
-
DefaultPaymentAccountService
public DefaultPaymentAccountService(PaymentAccountRepository<com.broadleafcommerce.data.tracking.core.Trackable> paymentAccountRepository, CustomerService<Customer> customerService, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
readAllByCustomerId
public org.springframework.data.domain.Page<P> readAllByCustomerId(@NonNull @NonNull String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @Nullable org.springframework.data.domain.Pageable page, @Nullable cz.jirutka.rsql.parser.ast.Node filters)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PaymentAccountServicePass theCustomerID to find all the active paymentAccountJpaPaymentAccountentities- Specified by:
readAllByCustomerIdin interfacePaymentAccountService<P extends PaymentAccount>- Parameters:
customerId- the ID of the owning customercontextInfo- context information surrounding sandboxing and multitenant statepage- the requested page of results from the databasefilters- An RSQL filter used to narrow query results. May beEmptyNodeif no filters should be applied.- Returns:
- the payment accounts in the data store with that customer ID.
-
readByContextIdAndCustomerId
public P readByContextIdAndCustomerId(@NonNull @NonNull String id, @NonNull @NonNull String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PaymentAccountServicePass the ID of the paymentAccountJpaPaymentAccountand the owning customer ID for retrieval of the paymentAccount from the data store.- Specified by:
readByContextIdAndCustomerIdin interfacePaymentAccountService<P extends PaymentAccount>- Parameters:
id- the ID of the paymentAccount to be foundcustomerId- the ID of the owning customercontextInfo- context information surrounding sandboxing and multitenant state- Returns:
- the payment account in the data store if found
-
addPaymentAccount
@Transactional("customerTransactionManager") public PaymentAccount addPaymentAccount(@NonNull @NonNull String customerId, @NonNull P paymentAccountRequest, boolean makeDefaultAccount, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PaymentAccountServicePass the paymentAccountJpaPaymentAccountfor processing the default account relationship with the customer before saving to the data store.- Specified by:
addPaymentAccountin interfacePaymentAccountService<P extends PaymentAccount>- Parameters:
customerId- the ID of the owning customerpaymentAccountRequest- the paymentAccount to be persistedmakeDefaultAccount- whether this is the default paymentAccount for the customercontextInfo- context information surrounding sandboxing and multitenant state- Returns:
- the newly created payment account
-
update
@Transactional("customerTransactionManager") public P update(@NonNull P paymentAccount, @NonNull @NonNull Customer customer, boolean makeDefaultAccount, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PaymentAccountServicePass the updated paymentAccountJpaPaymentAccountand the owning customer for persistence to the data store.- Specified by:
updatein interfacePaymentAccountService<P extends PaymentAccount>- Parameters:
paymentAccount- the paymentAccount to be persistedcustomer- the owning customermakeDefaultAccount- whether this is the default paymentAccount for the customercontextInfo- context information surrounding sandboxing and multitenant state- Returns:
- the payment account after it has been updated
-
delete
@Transactional("customerTransactionManager") public void delete(@NonNull @NonNull String customerId, @NonNull @NonNull String paymentAccountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PaymentAccountServicePass the ID of the paymentAccountJpaPaymentAccountand the owning customer for removal of the paymentAccount.- Specified by:
deletein interfacePaymentAccountService<P extends PaymentAccount>- Parameters:
customerId- the ID of the owning customerpaymentAccountId- the ID of paymentAccount to be removedcontextInfo- context information surrounding sandboxing and multitenant state
-
readPaymentAccountsByContextId
public List<P> readPaymentAccountsByContextId(@NonNull @NonNull List<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PaymentAccountServicePass a list of paymentAccount IDs to return a list of the paymentAccountsJpaPaymentAccountassociated with those IDs.- Specified by:
readPaymentAccountsByContextIdin interfacePaymentAccountService<P extends PaymentAccount>- Parameters:
ids- the IDs of the paymentAccounts to be retrievedcontextInfo- context information surrounding sandboxing and multitenant state- Returns:
- the payment accounts found by ID in the data store
-
readAllByOriginatingPaymentId
public List<P> readAllByOriginatingPaymentId(List<String> originatingPaymentIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PaymentAccountServiceFind all thePaymentAccountsbyPaymentAccount.getOriginatingPaymentId()- Specified by:
readAllByOriginatingPaymentIdin interfacePaymentAccountService<P extends PaymentAccount>- Parameters:
originatingPaymentIds- the payment IDs to queryPaymentAccount.getOriginatingPaymentId()againstcontextInfo- context information regarding sandboxing and multitenant state- Returns:
- all the
PaymentAccountsmatching the givenPaymentAccount.getOriginatingPaymentId()
-
createCustomerRefFromCustomer
protected CustomerRef createCustomerRefFromCustomer(@NonNull @NonNull Customer customer)
Deprecated, for removal: This API element is subject to removal in a future version.Creates aCustomerRefbased on the providedCustomerobject- Parameters:
customer- the customer object that is used to build the CustomerRef- Returns:
- a CustomerRef based on the provided Customer object
-
getPaymentAccountRepository
protected PaymentAccountRepository<com.broadleafcommerce.data.tracking.core.Trackable> getPaymentAccountRepository()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getCustomerService
protected CustomerService<Customer> getCustomerService()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
Deprecated, for removal: This API element is subject to removal in a future version.
-
-