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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
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)
-
-
-
Method Detail
-
handle
public void handle(String entityJson)
- Specified by:
handle
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
- Specified by:
getObjectMapper
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
isValidType
public boolean isValidType(String reportedType, String projectionType)
- Specified by:
isValidType
in interfacecom.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
-
-