Class AuthTenantPersistenceHandler
- java.lang.Object
-
- com.broadleafcommerce.auth.tenant.message.AuthTenantPersistenceHandler
-
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.PersistenceHandler
public class AuthTenantPersistenceHandler extends Object implements com.broadleafcommerce.common.messaging.PersistenceHandler
Handler for theAuthPersistenceConsumer
channel that specializes in replicating persistedApplication
domain information into a subset of that information embodied in theApplication
domain.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description AuthTenantPersistenceHandler(ApplicationService<Application> applicationService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
Deprecated.As of 1.4.0.AuthTenantPersistenceHandler(ApplicationService<Application> applicationService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, AuthServerCreationHandler authServerCreationHandler)
AuthTenantPersistenceHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ApplicationService<Application> applicationService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, AuthServerCreationHandler authServerCreationHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getApplicationName(com.fasterxml.jackson.databind.JsonNode entityJson)
protected Instant
getChangeTimestamp(com.fasterxml.jackson.databind.JsonNode persistenceMessage)
com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
String[]
getSupportedSimpleTypeNames()
void
handle(String entityJson)
protected void
handleCreate(com.fasterxml.jackson.databind.JsonNode entityJson, String applicationId)
protected void
handleDelete(String id)
protected void
handleUpdate(com.fasterxml.jackson.databind.JsonNode entityJson, Application application)
void
hook(String entityJson)
protected boolean
isDelete(com.fasterxml.jackson.databind.JsonNode tracking)
boolean
isNodeNull(com.fasterxml.jackson.databind.JsonNode jsonNode)
boolean
isValidType(String reportedType, String projectionType)
protected IllegalArgumentException
missingTimestampError()
void
processStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)
protected void
updateApplication(com.fasterxml.jackson.databind.JsonNode entityJson, Application application)
-
-
-
Constructor Detail
-
AuthTenantPersistenceHandler
public AuthTenantPersistenceHandler(ApplicationService<Application> applicationService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, @Nullable AuthServerCreationHandler authServerCreationHandler)
-
AuthTenantPersistenceHandler
@Deprecated public AuthTenantPersistenceHandler(ApplicationService<Application> applicationService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
Deprecated.
-
AuthTenantPersistenceHandler
public AuthTenantPersistenceHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ApplicationService<Application> applicationService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, AuthServerCreationHandler authServerCreationHandler)
-
-
Method Detail
-
handle
public void handle(String entityJson)
- Specified by:
handle
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
hook
@StreamListener("persistenceInputTenantSyncAuth") public void hook(String entityJson)
- Specified by:
hook
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
- Specified by:
getObjectMapper
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
-
handleUpdate
protected void handleUpdate(com.fasterxml.jackson.databind.JsonNode entityJson, Application application)
-
handleCreate
protected void handleCreate(com.fasterxml.jackson.databind.JsonNode entityJson, String applicationId)
-
getApplicationName
protected String getApplicationName(com.fasterxml.jackson.databind.JsonNode entityJson)
-
updateApplication
protected void updateApplication(com.fasterxml.jackson.databind.JsonNode entityJson, Application application)
-
handleDelete
protected void handleDelete(String id)
-
isDelete
protected boolean isDelete(com.fasterxml.jackson.databind.JsonNode tracking)
-
isValidType
public boolean isValidType(String reportedType, String projectionType)
- Specified by:
isValidType
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getChangeTimestamp
protected Instant getChangeTimestamp(com.fasterxml.jackson.databind.JsonNode persistenceMessage)
-
missingTimestampError
protected IllegalArgumentException missingTimestampError()
-
isNodeNull
public boolean isNodeNull(com.fasterxml.jackson.databind.JsonNode jsonNode)
-
getSupportedSimpleTypeNames
public String[] getSupportedSimpleTypeNames()
- Specified by:
getSupportedSimpleTypeNames
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
-