aboutsummaryrefslogtreecommitdiffstats
path: root/aai-service/provider/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'aai-service/provider/src/main')
-rwxr-xr-xaai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java5
-rwxr-xr-xaai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java1
-rwxr-xr-xaai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java10
3 files changed, 12 insertions, 4 deletions
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java
index 4b4c439a..28b4955a 100755
--- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java
+++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClient.java
@@ -37,6 +37,9 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
import org.onap.ccsdk.sli.core.sli.SvcLogicResource;
import org.onap.ccsdk.sli.adaptors.aai.data.notify.NotifyEvent;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+
public interface AAIClient extends SvcLogicResource, SvcLogicJavaPlugin {
public SearchResults requestServiceInstanceURL(String svcInstanceId) throws AAIServiceException;
@@ -76,7 +79,7 @@ public interface AAIClient extends SvcLogicResource, SvcLogicJavaPlugin {
public void logKeyError(String keys);
- public QueryStatus processResponseData(String rv, String resource, AAIRequest request, String prefix, SvcLogicContext ctx, Map<String, String> nameValues, String modifier) throws IOException, AAIServiceException ;
+ public QueryStatus processResponseData(String rv, String resource, AAIRequest request, String prefix, SvcLogicContext ctx, Map<String, String> nameValues, String modifier) throws JsonParseException, JsonMappingException, IOException, AAIServiceException ;
public String getPathTemplateForResource(String resoourceName, String join, SvcLogicContext ctx) throws MalformedURLException;
public boolean isDeprecatedFormat(String resource, Map<String, String> nameValues);
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
index c57b3a45..8b8aaaab 100755
--- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
+++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
@@ -1636,6 +1636,7 @@ public abstract class AAIDeclarations implements AAIClient {
try {
obj = getMetadataMethod.invoke(instance);
} catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
}
}
if(obj != null && obj instanceof Metadata){
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java
index 7c6234e5..7f15c03f 100755
--- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java
+++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequest.java
@@ -189,9 +189,13 @@ public class GenericRequest extends AAIRequest {
queryParams.put(splitKey[1], encodeQuery(value));
} else {
- String token = String.format("%s/{%s}", splitKey[0], splitKey[1]);
- String encoded_vnf = encodeQuery(value);
- request_url = request_url.replace(token, String.format("%s/%s", splitKey[0], encoded_vnf));
+ String encoded_vnf = encodeQuery(value);
+ if(!resourceName.equals(splitKey[0]) && resourceName.contains(splitKey[0])) {
+ queryParams.put(splitKey[1], encoded_vnf);
+ } else {
+ String token = String.format("%s/{%s}", splitKey[0], splitKey[1]);
+ request_url = request_url.replace(token, String.format("%s/%s", splitKey[0], encoded_vnf));
+ }
}
}