Class DefaultFulfillmentCaptureClaimSummaryService<P extends com.broadleafcommerce.order.client.domain.FulfillmentCaptureClaimSummary>

java.lang.Object
com.broadleafcommerce.order.service.DefaultFulfillmentCaptureClaimSummaryService<P>
All Implemented Interfaces:
FulfillmentCaptureClaimSummaryService<P>

public class DefaultFulfillmentCaptureClaimSummaryService<P extends com.broadleafcommerce.order.client.domain.FulfillmentCaptureClaimSummary> extends Object implements FulfillmentCaptureClaimSummaryService<P>
This service provides a mechanism to build a FulfillmentCaptureClaimSummary based on the given FulfillmentCaptureClaims.
Author:
Sunny Yu
  • Constructor Details

    • DefaultFulfillmentCaptureClaimSummaryService

      public DefaultFulfillmentCaptureClaimSummaryService(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • buildClaimSummary

      public P buildClaimSummary(String discriminatorType, String discriminatorId, List<com.broadleafcommerce.order.client.domain.FulfillmentCaptureClaim> fulfillmentCaptureClaims)
      Description copied from interface: FulfillmentCaptureClaimSummaryService
      Builds a FulfillmentCaptureClaimSummary from the given fulfillment capture fulfillmentCaptureClaims.
      Specified by:
      buildClaimSummary in interface FulfillmentCaptureClaimSummaryService<P extends com.broadleafcommerce.order.client.domain.FulfillmentCaptureClaimSummary>
      Parameters:
      discriminatorType - the type of the discriminating entity for filtering the fulfillmentCaptureClaims, usually order fulfillment or payment
      discriminatorId - the id of the discriminating entity for filtering the fulfillmentCaptureClaims, usually the id of the order fulfillment or payment
      fulfillmentCaptureClaims - the list of FulfillmentCaptureClaims to build the summary from
      Returns:
      a FulfillmentCaptureClaimSummary from the given fulfillment capture fulfillmentCaptureClaims
    • buildClaimSummariesByPaymentId

      public <C extends com.broadleafcommerce.order.client.domain.FulfillmentCaptureClaim> List<P> buildClaimSummariesByPaymentId(@NonNull @NonNull List<C> fulfillmentCaptureClaims)
      Description copied from interface: FulfillmentCaptureClaimSummaryService
      Builds a list of FulfillmentCaptureClaimSummaries from the given fulfillmentCaptureClaims and consolidate them based on FulfillmentCaptureClaim.getPaymentId().
      Specified by:
      buildClaimSummariesByPaymentId in interface FulfillmentCaptureClaimSummaryService<P extends com.broadleafcommerce.order.client.domain.FulfillmentCaptureClaimSummary>
      Parameters:
      fulfillmentCaptureClaims - the list of FulfillmentCaptureClaims to build the summary from
      Returns:
      a list of FulfillmentCaptureClaimSummaries from the given fulfillmentCaptureClaims and consolidated by FulfillmentCaptureClaim.getPaymentId()
    • getCurrency

      protected javax.money.CurrencyUnit getCurrency(@NonNull @NonNull List<com.broadleafcommerce.order.client.domain.FulfillmentCaptureClaim> fulfillmentCaptureClaims)
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()