diff options
Diffstat (limited to 'common/src/main/java/org/onap/so/client/policy/CommonObjectMapperProvider.java')
-rw-r--r-- | common/src/main/java/org/onap/so/client/policy/CommonObjectMapperProvider.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common/src/main/java/org/onap/so/client/policy/CommonObjectMapperProvider.java b/common/src/main/java/org/onap/so/client/policy/CommonObjectMapperProvider.java index c55370f7dc..334e0f7231 100644 --- a/common/src/main/java/org/onap/so/client/policy/CommonObjectMapperProvider.java +++ b/common/src/main/java/org/onap/so/client/policy/CommonObjectMapperProvider.java @@ -20,13 +20,16 @@ package org.onap.so.client.policy; +import javax.ws.rs.ext.ContextResolver; +import javax.ws.rs.ext.Provider; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -public class CommonObjectMapperProvider { +@Provider +public class CommonObjectMapperProvider implements ContextResolver<ObjectMapper> { protected ObjectMapper mapper; @@ -43,4 +46,10 @@ public class CommonObjectMapperProvider { public ObjectMapper getMapper() { return mapper; } + + @Override + public ObjectMapper getContext(Class<?> type) { + + return mapper; + } } |