diff options
author | Venkata Harish K Kajur <vk250x@att.com> | 2017-11-27 03:46:28 -0500 |
---|---|---|
committer | Venkata Harish K Kajur <vk250x@att.com> | 2017-11-27 09:53:43 -0500 |
commit | dd6d9048332c71716ef24b2cfc8ce93b02139a2a (patch) | |
tree | cd53ad69f40c0d01c5e65d0d41232ddf2be45202 /aai-core/src/main/java | |
parent | 0f6f35ed623ec836312ff2372d96930ef0d7886a (diff) |
Add v12 api changes for the new release code
Update the pom to use 1.2.0-SNAPSHOT
and add v12 oxm and json and ensure
the esr stuff is properly included
Issue-ID: AAI-514
Change-Id: I96ceb7dbaa6de7650d55a79e2d1b18f5d1815f06
Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'aai-core/src/main/java')
5 files changed, 16 insertions, 12 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/db/props/AAIProperties.java b/aai-core/src/main/java/org/onap/aai/db/props/AAIProperties.java index e481f3cf..76a13363 100644 --- a/aai-core/src/main/java/org/onap/aai/db/props/AAIProperties.java +++ b/aai-core/src/main/java/org/onap/aai/db/props/AAIProperties.java @@ -32,7 +32,7 @@ public class AAIProperties { public static final String CREATED_TS = "aai-created-ts"; public static final String RESOURCE_VERSION = "resource-version"; public static final String AAI_URI = "aai-uri"; - public static final Version LATEST = Version.v11; + public static final Version LATEST = Version.v12; public static final Integer MAXIMUM_DEPTH = 10000; public static final String LINKED = "linked"; public static final String DB_ALIAS_SUFFIX = "-local"; diff --git a/aai-core/src/main/java/org/onap/aai/introspection/Version.java b/aai-core/src/main/java/org/onap/aai/introspection/Version.java index e51231a4..c1e913e2 100644 --- a/aai-core/src/main/java/org/onap/aai/introspection/Version.java +++ b/aai-core/src/main/java/org/onap/aai/introspection/Version.java @@ -25,13 +25,14 @@ public enum Version { v8, v9, v10, - v11; + v11, + v12; public static boolean isLatest(Version v) { - return (Version.v11.equals(v)); //TODO update when we increment the version, or find a better way of doing this + return (Version.v12.equals(v)); //TODO update when we increment the version, or find a better way of doing this } public static Version getLatest(){ - return Version.v11; //TODO update when we increment the version, or find a better way of doing this + return Version.v12; //TODO update when we increment the version, or find a better way of doing this } } diff --git a/aai-core/src/main/java/org/onap/aai/rest/ueb/UEBNotification.java b/aai-core/src/main/java/org/onap/aai/rest/ueb/UEBNotification.java index 1ada5036..26d029f5 100644 --- a/aai-core/src/main/java/org/onap/aai/rest/ueb/UEBNotification.java +++ b/aai-core/src/main/java/org/onap/aai/rest/ueb/UEBNotification.java @@ -61,7 +61,7 @@ public class UEBNotification { public UEBNotification(Loader loader) { events = new ArrayList<>(); currentVersionLoader = LoaderFactory.createLoaderForVersion(loader.getModelType(), AAIProperties.LATEST); - notificationVersion = Version.valueOf(AAIConfig.get("aai.notification.current.version","v11")); + notificationVersion = Version.valueOf(AAIConfig.get("aai.notification.current.version","v12")); } diff --git a/aai-core/src/main/java/org/onap/aai/serialization/queryformats/utils/UrlBuilder.java b/aai-core/src/main/java/org/onap/aai/serialization/queryformats/utils/UrlBuilder.java index 8387285d..1c5b71f4 100644 --- a/aai-core/src/main/java/org/onap/aai/serialization/queryformats/utils/UrlBuilder.java +++ b/aai-core/src/main/java/org/onap/aai/serialization/queryformats/utils/UrlBuilder.java @@ -58,7 +58,7 @@ public class UrlBuilder { final StringBuilder result = new StringBuilder(); final URI uri = this.serializer.getURIForVertex(v); - if (this.version.compareTo(Version.v11) >= 0) { + if (this.version.compareTo(Version.v11) >= 0 || this.version.compareTo(Version.v12) >= 0) { result.append(AAIConstants.AAI_APP_ROOT); } else { result.append(this.serverBase); @@ -77,7 +77,7 @@ public class UrlBuilder { result.append("/resources/id/" + v.id()); result.insert(0, this.version); - if (this.version.compareTo(Version.v11) >= 0) { + if (this.version.compareTo(Version.v11) >= 0 || this.version.compareTo(Version.v12) >= 0) { result.insert(0, AAIConstants.AAI_APP_ROOT); } else { result.insert(0, this.serverBase); diff --git a/aai-core/src/main/java/org/onap/aai/util/GenerateXsd.java b/aai-core/src/main/java/org/onap/aai/util/GenerateXsd.java index c9405264..d2dc8b76 100644 --- a/aai-core/src/main/java/org/onap/aai/util/GenerateXsd.java +++ b/aai-core/src/main/java/org/onap/aai/util/GenerateXsd.java @@ -64,7 +64,7 @@ public class GenerateXsd { private static final String root = "../aai-schema/src/main/resources"; private static final String xsd_dir = root + "/aai_schema"; private static final String yaml_dir = root + "/aai_swagger_yaml"; - + private static int annotationsStartVersion = 9; // minimum version to support annotations in xsd private static int swaggerSupportStartsVersion = 7; // minimum version to support swagger documentation @@ -582,7 +582,7 @@ public class GenerateXsd { } sb1.append( indentation + " <xs:appinfo>\r\n" + - indentation + " <annox:annotate target=\""+target+"\">@org.onap.aai.annotations.Metadata(" + Joiner.on(",").join(metadata) + ")</annox:annotate>\r\n" + + indentation + " <annox:annotate target=\""+target+"\">@org.onap.aai.annotations.Metadata(" + Joiner.on(",").join(metadata) + ")</annox:annotate>\r\n" + indentation + " </xs:appinfo>\r\n"); } @@ -667,7 +667,10 @@ public class GenerateXsd { { StringBuilder sb = new StringBuilder(); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"); - String namespace = "org.openecomp"; + String namespace = "org.onap"; + if (v.compareTo(Version.v11) < 0 || v.compareTo(Version.v12) < 0) { + namespace = "org.openecomp"; + } if ( useAnnotationsInXsd ) { sb.append("<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://" + namespace + ".aai.inventory/" + apiVersion + "\" xmlns:tns=\"http://" + namespace + ".aai.inventory/" + apiVersion + "\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"" @@ -677,7 +680,7 @@ public class GenerateXsd { " xmlns:annox=\"http://annox.dev.java.net\" \r\n" + " jaxb:extensionBindingPrefixes=\"annox\">\n\n"); } else { - sb.append("<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://" + namespace + ".aai.inventory/" + sb.append("<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://" + namespace + ".aai.inventory/" + apiVersion + "\" xmlns:tns=\"http://" + namespace + ".aai.inventory/" + apiVersion + "\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n\n"); } @@ -775,7 +778,7 @@ public class GenerateXsd { } return result; } - + /** * Guaranteed to at least return non null but empty collection of edge descriptions * @param nodeName name of the vertex whose edge relationships to return |