Class DefaultAbstractAuditRequestEventConverter
java.lang.Object
com.broadleafcommerce.common.audit.converter.DefaultAbstractAuditRequestEventConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<AuditRequestEvent,
,AuditEvent> org.springframework.core.Ordered
public abstract class DefaultAbstractAuditRequestEventConverter
extends Object
implements org.springframework.core.convert.converter.Converter<AuditRequestEvent,AuditEvent>, org.springframework.core.Ordered
Basic converter that contains much of the plumbing required for conversion. Subclasses may
override protected methods to enhance the behavior for specific domain use cases. This includes
validating specific types and filtering included fields.
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert
(AuditRequestEvent source) int
getOrder()
protected boolean
isValid
(AuditRequestEvent source) Whether theAuditRequestEvent
instance is valid for audit tracking.protected AuditEvent
postProcess
(AuditEvent candidate) Optionally post process theAuditEvent
instance before returning from the conversion.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
-
DefaultAbstractAuditRequestEventConverter
public DefaultAbstractAuditRequestEventConverter()
-
-
Method Details
-
convert
- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<AuditRequestEvent,
AuditEvent>
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
isValid
Whether theAuditRequestEvent
instance is valid for audit tracking. Default is true.- Parameters:
source
- The source event detecting a change- Returns:
- Whether the
AuditRequestEvent
instance is valid for audit tracking. Default is true.
-
postProcess
Optionally post process theAuditEvent
instance before returning from the conversion.- Parameters:
candidate
- The candidateAuditEvent
instance- Returns:
- The post-processed
AuditEvent
instance
-