Class OfferCodeAuditEventConverter

java.lang.Object
com.broadleafcommerce.promotion.offer.audit.OfferCodeAuditEventConverter
All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent,com.broadleafcommerce.common.audit.domain.AuditEvent>, org.springframework.core.Ordered

public class OfferCodeAuditEventConverter extends Object implements org.springframework.core.convert.converter.Converter<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent,com.broadleafcommerce.common.audit.domain.AuditEvent>, org.springframework.core.Ordered
This converter is responsible for converting MutationNotifyEvent into AuditEvent for tracking changes to Offer related domain.
Since:
Offer Services 3.2.0, Release Train 2.3.0
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.broadleafcommerce.common.audit.domain.AuditEvent
    convert(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent source)
     
    int
     
    protected boolean
    isValid(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent source, com.broadleafcommerce.data.tracking.core.Trackable changed)
    Whether the Trackable instance is valid for audit tracking

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.core.convert.converter.Converter

    andThen
  • Constructor Details

    • OfferCodeAuditEventConverter

      public OfferCodeAuditEventConverter()
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • convert

      @Nullable public com.broadleafcommerce.common.audit.domain.AuditEvent convert(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent source)
      Specified by:
      convert in interface org.springframework.core.convert.converter.Converter<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent,com.broadleafcommerce.common.audit.domain.AuditEvent>
    • isValid

      protected boolean isValid(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent source, com.broadleafcommerce.data.tracking.core.Trackable changed)
      Whether the Trackable instance is valid for audit tracking
      Parameters:
      source - The source event detecting a change
      changed - The modified entity
      Returns:
      Whether the Trackable instance is valid for audit tracking