Class DefaultPaymentPriorityStrategy
- java.lang.Object
 - 
- com.broadleafcommerce.orderoperation.service.payment.DefaultPaymentPriorityStrategy
 
 
- 
- All Implemented Interfaces:
 PaymentPriorityStrategy
public class DefaultPaymentPriorityStrategy extends Object implements PaymentPriorityStrategy
- Author:
 - Samarth Dhruva (samarthd)
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected static intHIGHEST_PRIORITYprotected static intLOWEST_PRIORITY 
- 
Constructor Summary
Constructors Constructor Description DefaultPaymentPriorityStrategy() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetRefundPriority(PaymentSummary payment)List<PaymentSummary>sortByRefundPriority(List<PaymentSummary> payments)Sort based on the priority of eachPaymentSummary.getType(), withfinal paymentsbeing sorted first. 
 - 
 
- 
- 
Field Detail
- 
HIGHEST_PRIORITY
protected static final int HIGHEST_PRIORITY
- See Also:
 - Constant Field Values
 
 
- 
LOWEST_PRIORITY
protected static final int LOWEST_PRIORITY
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
sortByRefundPriority
public List<PaymentSummary> sortByRefundPriority(List<PaymentSummary> payments)
Sort based on the priority of eachPaymentSummary.getType(), withfinal paymentsbeing sorted first.- Specified by:
 sortByRefundPriorityin interfacePaymentPriorityStrategy- Parameters:
 payments- the payments to sort- Returns:
 - a new list representing the sorted result
 
 
- 
getRefundPriority
protected int getRefundPriority(PaymentSummary payment)
 
 - 
 
 -