Class CodeGenerationPersistenceHandler
java.lang.Object
com.broadleafcommerce.promotion.offer.service.persistence.CodeGenerationPersistenceHandler
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.PersistenceHandler
public class CodeGenerationPersistenceHandler
extends Object
implements com.broadleafcommerce.common.messaging.PersistenceHandler
- Author:
- Chad Harchar (charchar)
-
Field Summary
Fields inherited from interface com.broadleafcommerce.common.messaging.PersistenceHandler
log
-
Constructor Summary
ConstructorDescriptionCodeGenerationPersistenceHandler
(CodeGeneratorRepository<com.broadleafcommerce.data.tracking.core.Trackable> codeGeneratorRepository, CodeGenerationService codeGenerationService, com.broadleafcommerce.data.tracking.core.mapping.DomainMapperManager trackingMapper, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, IdempotentPersistenceNotificationConsumptionService idempotentConsumptionService, com.broadleafcommerce.common.extension.data.DataRouteSupporting route) -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.ObjectMapper
String[]
void
protected com.broadleafcommerce.data.tracking.core.context.ContextRequest
hydrateContextRequest
(com.broadleafcommerce.data.tracking.core.Trackable trackable) protected com.broadleafcommerce.data.tracking.core.Trackable
hydrateFromJson
(com.fasterxml.jackson.databind.JsonNode entityJson, Class<?> domainType, com.fasterxml.jackson.databind.ObjectMapper mapper) Create a repository-specific entity instance given a JSON representation.void
processStateChange
(com.fasterxml.jackson.databind.JsonNode entityJson) protected void
processStateChangeInternal
(com.fasterxml.jackson.databind.JsonNode entityJson) void
validate
(com.fasterxml.jackson.databind.JsonNode entityJson) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.common.messaging.PersistenceHandler
handle, isValidType
-
Constructor Details
-
CodeGenerationPersistenceHandler
public CodeGenerationPersistenceHandler(CodeGeneratorRepository<com.broadleafcommerce.data.tracking.core.Trackable> codeGeneratorRepository, CodeGenerationService codeGenerationService, com.broadleafcommerce.data.tracking.core.mapping.DomainMapperManager trackingMapper, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, IdempotentPersistenceNotificationConsumptionService idempotentConsumptionService, com.broadleafcommerce.common.extension.data.DataRouteSupporting route)
-
-
Method Details
-
hook
- Specified by:
hook
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
processStateChange
public void processStateChange(com.fasterxml.jackson.databind.JsonNode entityJson) - Specified by:
processStateChange
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
processStateChangeInternal
protected void processStateChangeInternal(com.fasterxml.jackson.databind.JsonNode entityJson) -
hydrateContextRequest
protected com.broadleafcommerce.data.tracking.core.context.ContextRequest hydrateContextRequest(com.broadleafcommerce.data.tracking.core.Trackable trackable) -
getSupportedSimpleTypeNames
- Specified by:
getSupportedSimpleTypeNames
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()- Specified by:
getObjectMapper
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
validate
public void validate(com.fasterxml.jackson.databind.JsonNode entityJson) - Specified by:
validate
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
hydrateFromJson
protected com.broadleafcommerce.data.tracking.core.Trackable hydrateFromJson(com.fasterxml.jackson.databind.JsonNode entityJson, Class<?> domainType, com.fasterxml.jackson.databind.ObjectMapper mapper) Create a repository-specific entity instance given a JSON representation.- Parameters:
entityJson
- The JSON representation of the entitydomainType
- The repository specific domain class typemapper
- The Jackson mapper instance that can facilitate conversion- Returns:
- The instantiated and fully-populated entity instance
-