@Repository(value="blCreditAccountService") public class CreditAccountServiceImpl extends Object implements CreditAccountService
Modifier and Type | Field and Description |
---|---|
protected CreditAccountDao |
creditAccountDao |
protected CreditAccountEventDetailService |
creditAccountEventDetailService |
protected CreditAccountEventService |
creditAccountEventService |
protected static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
CreditAccountServiceImpl() |
Modifier and Type | Method and Description |
---|---|
CreditAccountEvent |
clearAccountBalance(CreditAccount creditAccount)
Zeros out a CreditAccount.
|
CreditAccountEvent |
createCreditAccountEvent(CreditAccount creditAccount,
CreditAccountEventEnum type,
org.broadleafcommerce.common.money.Money amount)
Returns a new CreditAccountEvent of the type passed in.
|
CreditAccountEvent |
createCreditAccountEvent(CreditAccount creditAccount,
CreditAccountEventEnum type,
org.broadleafcommerce.common.money.Money amount,
CreditAccountEventRequestDTO requestDTO)
Returns a new CreditAccountEvent of the type passed in.
|
CreditAccountEvent |
creditAccount(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount,
Date expirationDate)
Credits the CreditAccount for the given amount.
|
CreditAccountEvent |
debitAccount(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount)
Debits the CreditAccount for the given amount.
|
CreditAccountEvent |
debitAccount(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount,
org.broadleafcommerce.core.order.domain.Order order)
Debits the CreditAccount for the given amount.
|
CreditAccountEvent |
getLastActivity(CreditAccount creditAccount)
Gets the last activity registered on the CreditAccount.
|
CreditAccountEvent |
getLastDebitEvent(CreditAccount creditAccount)
Gets the last debit event registered on the CreditAccount.
|
boolean |
isExpired(CreditAccount creditAccount)
Returns true if there is an expiration date on the creditAccount.
|
CreditAccount |
readAccountByAccountNumber(String accountNumber)
Returns a Credit Account that matches the account number.
|
CreditAccount |
readById(Long creditAccountID)
Gets a CreditAccount by id
|
CreditAccountEvent |
refundAccount(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount)
Refunds a CreditAccount for the given amount.
|
CreditAccount |
registerAccountCreation(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount,
CreditAccountEventRequestDTO requestDTO)
Registers the creation of a new CreditAccount by creating a CreditAccountEvent and CreditAccountEventDetail.
|
CreditAccountEvent |
rollback(CreditAccountEvent originalEvent,
CreditAccountEvent rollbackEvent,
org.broadleafcommerce.common.money.Money amount) |
CreditAccountEvent |
rollbackCredit(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount)
Used by a RollbackHandler to debit back an amount that had been refunded on a credit.
|
CreditAccountEvent |
rollbackDebit(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount)
Used by a RollbackHandler to credit back an amount that had been deducted on a debit.
|
CreditAccountEvent |
transferAccountBalance(CreditAccount sender,
CreditAccount receiver,
org.broadleafcommerce.common.money.Money amount)
Transfers an amount from the Sender CreditAccount to the Receiver CreditAccount.
|
CreditAccountEvent |
voidAccount(CreditAccount creditAccount,
Date expirationDate)
Voids a CreditAccount by setting an expiration date.
|
protected static final org.apache.commons.logging.Log LOG
protected CreditAccountDao creditAccountDao
protected CreditAccountEventService creditAccountEventService
protected CreditAccountEventDetailService creditAccountEventDetailService
public CreditAccountEvent createCreditAccountEvent(CreditAccount creditAccount, CreditAccountEventEnum type, org.broadleafcommerce.common.money.Money amount)
CreditAccountService
createCreditAccountEvent
in interface CreditAccountService
public CreditAccountEvent createCreditAccountEvent(CreditAccount creditAccount, CreditAccountEventEnum type, org.broadleafcommerce.common.money.Money amount, CreditAccountEventRequestDTO requestDTO)
CreditAccountService
createCreditAccountEvent
in interface CreditAccountService
public CreditAccount registerAccountCreation(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount, CreditAccountEventRequestDTO requestDTO)
CreditAccountService
registerAccountCreation
in interface CreditAccountService
@Transactional(value="blTransactionManager", rollbackFor=javax.persistence.OptimisticLockException.class) public CreditAccountEvent creditAccount(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount, Date expirationDate)
CreditAccountService
creditAccount
in interface CreditAccountService
public CreditAccountEvent debitAccount(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount)
CreditAccountService
debitAccount
in interface CreditAccountService
@Transactional(value="blTransactionManager", rollbackFor=javax.persistence.OptimisticLockException.class) public CreditAccountEvent debitAccount(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount, org.broadleafcommerce.core.order.domain.Order order)
CreditAccountService
debitAccount
in interface CreditAccountService
@Transactional(value="blTransactionManager", rollbackFor=javax.persistence.OptimisticLockException.class) public CreditAccountEvent rollback(CreditAccountEvent originalEvent, CreditAccountEvent rollbackEvent, org.broadleafcommerce.common.money.Money amount)
public CreditAccountEvent rollbackDebit(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount)
CreditAccountService
rollbackDebit
in interface CreditAccountService
public CreditAccountEvent rollbackCredit(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount)
CreditAccountService
rollbackCredit
in interface CreditAccountService
public CreditAccountEvent refundAccount(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount)
CreditAccountService
refundAccount
in interface CreditAccountService
public CreditAccountEvent voidAccount(CreditAccount creditAccount, Date expirationDate)
CreditAccountService
voidAccount
in interface CreditAccountService
public CreditAccountEvent clearAccountBalance(CreditAccount creditAccount)
CreditAccountService
clearAccountBalance
in interface CreditAccountService
public CreditAccountEvent getLastActivity(CreditAccount creditAccount)
CreditAccountService
getLastActivity
in interface CreditAccountService
public CreditAccountEvent getLastDebitEvent(CreditAccount creditAccount)
CreditAccountService
getLastDebitEvent
in interface CreditAccountService
public CreditAccountEvent transferAccountBalance(CreditAccount sender, CreditAccount receiver, org.broadleafcommerce.common.money.Money amount)
CreditAccountService
transferAccountBalance
in interface CreditAccountService
public boolean isExpired(CreditAccount creditAccount)
CreditAccountService
isExpired
in interface CreditAccountService
public CreditAccount readAccountByAccountNumber(String accountNumber)
CreditAccountService
readAccountByAccountNumber
in interface CreditAccountService
public CreditAccount readById(Long creditAccountID)
CreditAccountService
readById
in interface CreditAccountService
Copyright © 2019. All rights reserved.