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 the AuthPersistenceConsumer channel that specializes in replicating persisted Application domain information into a subset of that information embodied in the Application domain.
Author:
Jeff Fischer
  • Constructor Details

  • Method Details

    • handle

      public void handle(String entityJson)
      Specified by:
      handle in interface com.broadleafcommerce.common.messaging.PersistenceHandler
    • hook

      @StreamListener("persistenceInputTenantSyncDataTracking") public void hook(String entityJson)
      Specified by:
      hook in interface com.broadleafcommerce.common.messaging.PersistenceHandler
    • getObjectMapper

      public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
      Specified by:
      getObjectMapper in interface com.broadleafcommerce.common.messaging.PersistenceHandler
    • processStateChange

      public void processStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)
      Specified by:
      processStateChange in interface com.broadleafcommerce.common.messaging.PersistenceHandler
    • isNewChange

      protected boolean isNewChange(com.fasterxml.jackson.databind.JsonNode entityJson, Application application)
      Checks whether the incoming change is newer or equals than the local persisted application.
      Parameters:
      entityJson - the incoming change
      application - local persisted application
      Returns:
      true if incoming change is newer or equals to the local persisted application
    • 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 entityJson)
    • isValidType

      public boolean isValidType(String reportedType, String projectionType)
      Specified by:
      isValidType in interface com.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 interface com.broadleafcommerce.common.messaging.PersistenceHandler