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) intgetOrder()protected booleanisValid(AuditRequestEvent source) Whether theAuditRequestEventinstance is valid for audit tracking.protected AuditEventpostProcess(AuditEvent candidate) Optionally post process theAuditEventinstance before returning from the conversion.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
DefaultAbstractAuditRequestEventConverter
public DefaultAbstractAuditRequestEventConverter()
-
-
Method Details
-
convert
- Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<AuditRequestEvent,AuditEvent>
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
isValid
Whether theAuditRequestEventinstance is valid for audit tracking. Default is true.- Parameters:
source- The source event detecting a change- Returns:
- Whether the
AuditRequestEventinstance is valid for audit tracking. Default is true.
-
postProcess
Optionally post process theAuditEventinstance before returning from the conversion.- Parameters:
candidate- The candidateAuditEventinstance- Returns:
- The post-processed
AuditEventinstance
-