@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)
CreditAccountServicecreateCreditAccountEvent in interface CreditAccountServicepublic CreditAccountEvent createCreditAccountEvent(CreditAccount creditAccount, CreditAccountEventEnum type, org.broadleafcommerce.common.money.Money amount, CreditAccountEventRequestDTO requestDTO)
CreditAccountServicecreateCreditAccountEvent in interface CreditAccountServicepublic CreditAccount registerAccountCreation(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount, CreditAccountEventRequestDTO requestDTO)
CreditAccountServiceregisterAccountCreation in interface CreditAccountService@Transactional(value="blTransactionManager",
rollbackFor=javax.persistence.OptimisticLockException.class)
public CreditAccountEvent creditAccount(CreditAccount creditAccount,
org.broadleafcommerce.common.money.Money amount,
Date expirationDate)
CreditAccountServicecreditAccount in interface CreditAccountServicepublic CreditAccountEvent debitAccount(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount)
CreditAccountServicedebitAccount 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)
CreditAccountServicedebitAccount 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)
CreditAccountServicerollbackDebit in interface CreditAccountServicepublic CreditAccountEvent rollbackCredit(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount)
CreditAccountServicerollbackCredit in interface CreditAccountServicepublic CreditAccountEvent refundAccount(CreditAccount creditAccount, org.broadleafcommerce.common.money.Money amount)
CreditAccountServicerefundAccount in interface CreditAccountServicepublic CreditAccountEvent voidAccount(CreditAccount creditAccount, Date expirationDate)
CreditAccountServicevoidAccount in interface CreditAccountServicepublic CreditAccountEvent clearAccountBalance(CreditAccount creditAccount)
CreditAccountServiceclearAccountBalance in interface CreditAccountServicepublic CreditAccountEvent getLastActivity(CreditAccount creditAccount)
CreditAccountServicegetLastActivity in interface CreditAccountServicepublic CreditAccountEvent getLastDebitEvent(CreditAccount creditAccount)
CreditAccountServicegetLastDebitEvent in interface CreditAccountServicepublic CreditAccountEvent transferAccountBalance(CreditAccount sender, CreditAccount receiver, org.broadleafcommerce.common.money.Money amount)
CreditAccountServicetransferAccountBalance in interface CreditAccountServicepublic boolean isExpired(CreditAccount creditAccount)
CreditAccountServiceisExpired in interface CreditAccountServicepublic CreditAccount readAccountByAccountNumber(String accountNumber)
CreditAccountServicereadAccountByAccountNumber in interface CreditAccountServicepublic CreditAccount readById(Long creditAccountID)
CreditAccountServicereadById in interface CreditAccountServiceCopyright © 2019. All rights reserved.