diff options
author | Benjamin, Max <max.benjamin@att.com> | 2020-03-18 13:05:11 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-03-18 13:05:12 -0400 |
commit | d0b46ad269c870c72e228a9617615b0a828a940c (patch) | |
tree | 467f51712f846d4342d2f4074882536cf8b8144b /common/src/main/java/org/onap | |
parent | 5ba975d726fdaadec5b22076a37faa388a8923a4 (diff) |
Correct object provider for jersey
Initial setup of aai test for unknown property error
updated mapper provider in AAI Client
added back support for cxf clients
updated aai-schema version to a release version
formatted file that was missed
moved provider register calls together
Issue-ID: SO-2750
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I0bf694f39bbab9bcbabd85bb30fb9dbf23f00520
Diffstat (limited to 'common/src/main/java/org/onap')
3 files changed, 21 insertions, 4 deletions
diff --git a/common/src/main/java/org/onap/so/client/RestClient.java b/common/src/main/java/org/onap/so/client/RestClient.java index 077ba24c2b..30389de742 100644 --- a/common/src/main/java/org/onap/so/client/RestClient.java +++ b/common/src/main/java/org/onap/so/client/RestClient.java @@ -188,8 +188,7 @@ public abstract class RestClient { client.register(new PayloadLoggingClientFilter(this.getMaxPayloadSize())); } CommonObjectMapperProvider provider = this.getCommonObjectMapperProvider(); - client.register(new JacksonJsonProvider(provider.getMapper())); - + client.register(provider).register(new JacksonJsonProvider(provider.getMapper())); metricLogClientFilter = new SOMetricLogClientFilter(); mdcSetup.setTargetEntity(getTargetEntity()); client.register(metricLogClientFilter); diff --git a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java index 4f06b787f7..42887884db 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java @@ -23,7 +23,16 @@ package org.onap.so.client.aai; import org.onap.so.client.graphinventory.GraphInventoryVersion; public enum AAIVersion implements GraphInventoryVersion { - V13("v13"), V14("v14"), V15("v15"), V16("v16"), V17("v17"), V18("v18"), V19("v19"); + V10("V10"), + V11("V11"), + V12("V12"), + V13("v13"), + V14("v14"), + V15("v15"), + V16("v16"), + V17("v17"), + V18("v18"), + V19("v19"); public static final AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1]; private final String value; 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; + } } |