Class 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 Detail

      • AuthDataUpdatePersistenceHandler

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

      • 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