Class ObjectMapperFactory
java.lang.Object
se.idsec.signservice.integration.core.ObjectMapperFactory
Singleton factory for getting an ObjectMapper instance.
By using this factory, a pre-configured ObjectMapper instance can be obtained.
- Author:
- Martin Lindström
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectMapperFactoryReturns the ObjectMapper instance.com.fasterxml.jackson.databind.ObjectMapperIf an ObjectMapper instance has been configured, it is returned.voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Assigns the ObjectMapper instance.
-
Method Details
-
getInstance
Returns the ObjectMapper instance.- Returns:
- the ObjectMapper instance
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()If an ObjectMapper instance has been configured, it is returned. Otherwise a new instance is created.- Returns:
- the ObjectMapper instance
-
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Assigns the ObjectMapper instance.- Parameters:
objectMapper- the ObjectMapper instance
-