summaryrefslogtreecommitdiffstats
path: root/aai-core
diff options
context:
space:
mode:
Diffstat (limited to 'aai-core')
-rw-r--r--aai-core/pom.xml53
-rw-r--r--aai-core/src/main/java/org/onap/aai/parsers/uri/URIParser.java16
-rw-r--r--aai-core/src/test/java/org/onap/aai/AAISetup.java6
3 files changed, 43 insertions, 32 deletions
diff --git a/aai-core/pom.xml b/aai-core/pom.xml
index 3f65e277..75aea62b 100644
--- a/aai-core/pom.xml
+++ b/aai-core/pom.xml
@@ -27,13 +27,14 @@
<parent>
<groupId>org.onap.aai.aai-common</groupId>
<artifactId>aai-common</artifactId>
- <version>1.4.4-SNAPSHOT</version>
+ <version>1.6.0-SNAPSHOT</version>
</parent>
<artifactId>aai-core</artifactId>
<name>aai-core</name>
- <version>1.4.4-SNAPSHOT</version>
+ <version>1.6.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
+ <springframework.version>4.3.24.RELEASE</springframework.version>
<sonar.language>java</sonar.language>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
@@ -74,6 +75,7 @@
<profile>
<id>onap</id>
<properties>
+ <springframework.version>4.3.24.RELEASE</springframework.version>
<aai.release>onap</aai.release>
<schema.configuration.location>N/A</schema.configuration.location>
<schema.nodes.location>aai-schema/src/main/resources/${aai.release}/oxm</schema.nodes.location>
@@ -174,10 +176,6 @@
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>nexus-staging-maven-plugin</artifactId>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
</plugin>
@@ -265,7 +263,7 @@
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-core</artifactId>
- <version>0.2.0</version>
+ <version>0.2.3</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
@@ -288,16 +286,6 @@
<version>1.1.1</version>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>4.3.21.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>4.3.21.RELEASE</version>
- </dependency>
- <dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
@@ -443,16 +431,41 @@
<version>${groovy.version}</version>
<classifier>indy</classifier>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <version>4.3.21.RELEASE</version>
+ <version>${springframework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
- <version>1.5.20.RELEASE</version>
+ <version>1.5.21.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -486,7 +499,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
- <version>4.3.21.RELEASE</version>
+ <version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
diff --git a/aai-core/src/main/java/org/onap/aai/parsers/uri/URIParser.java b/aai-core/src/main/java/org/onap/aai/parsers/uri/URIParser.java
index d8f401ee..80643429 100644
--- a/aai-core/src/main/java/org/onap/aai/parsers/uri/URIParser.java
+++ b/aai-core/src/main/java/org/onap/aai/parsers/uri/URIParser.java
@@ -3,6 +3,7 @@
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modification Copyright © 2019 IBM
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,18 +29,13 @@ import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.UriBuilder;
-import org.onap.aai.config.SpringContextAware;
import org.onap.aai.edges.enums.EdgeType;
import org.onap.aai.exceptions.AAIException;
import org.onap.aai.introspection.Introspector;
import org.onap.aai.introspection.Loader;
-import org.onap.aai.introspection.LoaderFactory;
-import org.onap.aai.logging.ErrorLogHelper;
import org.onap.aai.parsers.exceptions.DoesNotStartWithValidNamespaceException;
import org.onap.aai.rest.RestTokens;
import org.onap.aai.schema.enums.ObjectMetadata;
-import org.onap.aai.setup.SchemaVersion;
-import org.onap.aai.util.AAIConfig;
import org.springframework.web.util.UriUtils;
/**
@@ -56,6 +52,8 @@ public class URIParser {
private URI originalURI = null;
private MultivaluedMap<String, String> queryParams = null;
+
+ private static String aaiExceptionCode = "AAI_3001";
/**
* Instantiates a new URI parser.
@@ -135,7 +133,7 @@ public class URIParser {
}
introspector = loader.introspectorFromName(parts[i + 1]);
if (null == previousObj) {
- throw new AAIException("AAI_3001");
+ throw new AAIException(aaiExceptionCode);
}
if (previousObj.isContainer() && introspector.isContainer()) {
throw new AAIException("AAI_3000", uri + " not a valid path. Cannot chain plurals together");
@@ -167,7 +165,7 @@ public class URIParser {
// previous has current as property
if (previousObj != null && !previousObj.hasChild(introspector)
&& !previousObj.getDbName().equals("nodes")) {
- throw new AAIException("AAI_3001", uri + " not a valid path. " + part + " not valid");
+ throw new AAIException(aaiExceptionCode, uri + " not a valid path. " + part + " not valid");
} else if (previousObj == null) {
String abstractType = introspector.getMetadata(ObjectMetadata.ABSTRACT);
if (abstractType == null) {
@@ -225,13 +223,13 @@ public class URIParser {
} else {
// invalid item found should log
// original said bad path
- throw new AAIException("AAI_3001", "invalid item found in path: " + part);
+ throw new AAIException(aaiExceptionCode, "invalid item found in path: " + part);
}
}
} catch (AAIException e) {
throw e;
} catch (Exception e) {
- throw new AAIException("AAI_3001", e);
+ throw new AAIException(aaiExceptionCode, e);
}
}
diff --git a/aai-core/src/test/java/org/onap/aai/AAISetup.java b/aai-core/src/test/java/org/onap/aai/AAISetup.java
index ade20f4a..4bc30b8c 100644
--- a/aai-core/src/test/java/org/onap/aai/AAISetup.java
+++ b/aai-core/src/test/java/org/onap/aai/AAISetup.java
@@ -22,7 +22,7 @@ package org.onap.aai;
import java.util.Map;
-import org.junit.BeforeClass;
+import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.onap.aai.config.ConfigConfiguration;
@@ -88,8 +88,8 @@ public abstract class AAISetup {
protected static final String SERVICE_NAME = "JUNIT";
- @BeforeClass
- public static void setupBundleconfig() throws Exception {
+ @Before
+ public void setupBundleconfig() throws Exception {
System.setProperty("AJSC_HOME", ".");
System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local");
System.setProperty("aai.service.name", SERVICE_NAME);