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 theAuthPersistenceConsumerchannel that specializes in replicating persistedApplicationdomain information into a subset of that information embodied in theApplicationdomain.- 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 StringgetApplicationName(com.fasterxml.jackson.databind.JsonNode entityJson)protected InstantgetChangeTimestamp(com.fasterxml.jackson.databind.JsonNode persistenceMessage)com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()String[]getSupportedSimpleTypeNames()voidhandle(String entityJson)protected voidhandleCreate(com.fasterxml.jackson.databind.JsonNode entityJson, String applicationId)protected voidhandleDelete(String id)protected voidhandleUpdate(com.fasterxml.jackson.databind.JsonNode entityJson, Application application)voidhook(String entityJson)protected booleanisDelete(com.fasterxml.jackson.databind.JsonNode tracking)booleanisNodeNull(com.fasterxml.jackson.databind.JsonNode jsonNode)booleanisValidType(String reportedType, String projectionType)protected IllegalArgumentExceptionmissingTimestampError()voidprocessStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)protected voidupdateApplication(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:
handlein interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
hook
@StreamListener("persistenceInputTenantSyncAuth") public void hook(String entityJson)- Specified by:
hookin interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
- Specified by:
getObjectMapperin interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
processStateChange
public void processStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)
- Specified by:
processStateChangein 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:
isValidTypein 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:
getSupportedSimpleTypeNamesin interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
-