Class AuthDataUpdatePersistenceHandler

java.lang.Object
com.broadleafcommerce.auth.user.listener.AuthDataUpdatePersistenceHandler
All Implemented Interfaces:
com.broadleafcommerce.common.messaging.PersistenceHandler
Direct Known Subclasses:
CustomerPersistenceHandler, OperationAwarePersistenceHandler

public abstract class AuthDataUpdatePersistenceHandler extends Object implements com.broadleafcommerce.common.messaging.PersistenceHandler
Handles messages from the Persistence channel for other services that can impact the data in the authentication service, such as roles, permissions, and users. This is designed to perform a replacement of existing data within this service with data from an external service.
Author:
Phillip Verheyden (phillipuniverse)
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthDataUpdatePersistenceHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.ObjectMapper
     
    void
    handle(String entityJson)
     
    boolean
    isNodeNull(com.fasterxml.jackson.databind.JsonNode jsonNode)
    Checks if a JSON Node is equal to null or if the Node itself is present but represents the JSON literal value of "null".
    boolean
    isValidType(String reportedType, String projectionType)
     

    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

    getSupportedSimpleTypeNames, hook, processStateChange, validate
  • Constructor Details

    • AuthDataUpdatePersistenceHandler

      public AuthDataUpdatePersistenceHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • handle

      public void handle(String entityJson)
      Specified by:
      handle 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
    • isValidType

      public boolean isValidType(String reportedType, String projectionType)
      Specified by:
      isValidType in interface com.broadleafcommerce.common.messaging.PersistenceHandler
    • isNodeNull

      public boolean isNodeNull(com.fasterxml.jackson.databind.JsonNode jsonNode)
      Checks if a JSON Node is equal to null or if the Node itself is present but represents the JSON literal value of "null". e.g.
           {
      
           }  // returns true
           {
               "name": null
           } // returns true
           {
               "name": "Perry"
           } // returns false
           {
               "name": ""
           } // returns false
       
      Parameters:
      jsonNode -
      Returns:
      true if node is null, or JSON literal null