X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=aai-service%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fccsdk%2Fsli%2Fadaptors%2Faai%2FRelationshipRequest.java;h=76a377ea67cb5b50dec3892f612ae73b16f8a129;hb=8ed112cc25f33315e453b238478c4a1fde3e257e;hp=a73206d4fb4fbc9bd1f3a986116397d7b2b0fc7c;hpb=aed80a23d7fb16b5106a0bd242aa7e60ff451c67;p=ccsdk%2Fsli%2Fadaptors.git diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/RelationshipRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/RelationshipRequest.java index a73206d4..76a377ea 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/RelationshipRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/RelationshipRequest.java @@ -3,14 +3,14 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,7 +32,7 @@ import org.apache.http.NameValuePair; import org.apache.http.client.utils.URIBuilder; import org.apache.http.message.BasicNameValuePair; import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum; -import org.openecomp.aai.inventory.v11.Relationship; +import org.openecomp.aai.inventory.v13.Relationship; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -40,28 +40,28 @@ import com.google.common.base.Joiner; public class RelationshipRequest extends GenericRequest { - public RelationshipRequest(AAIRequest masterRequest) { - super(Relationship.class); - this.addMasterRequest(masterRequest); - } + public RelationshipRequest(AAIRequest masterRequest) { + super(Relationship.class); + this.addMasterRequest(masterRequest); + } - - @Override - public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException, URISyntaxException { - + + @Override + public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException, URISyntaxException { + - URL url = super.getRequestUrl(method, null); - URIBuilder builder = new URIBuilder(url.toURI()); - String newPath = builder.getPath() + "/relationship-list/relationship"; - builder.setPath(newPath); - if(resourceVersion != null) { - List queryList = builder.getQueryParams(); - NameValuePair nvp = new BasicNameValuePair("resourceVersion", resourceVersion); - queryList.add(nvp); - } + URL url = super.getRequestUrl(method, null); + URIBuilder builder = new URIBuilder(url.toURI()); + String newPath = builder.getPath() + "/relationship-list/relationship"; + builder.setPath(newPath); + if(resourceVersion != null) { + List queryList = builder.getQueryParams(); + NameValuePair nvp = new BasicNameValuePair("resourceVersion", resourceVersion); + queryList.add(nvp); + } - aaiService.LOGwriteFirstTrace(method, builder.toString()); - - return builder.build().toURL(); - } + aaiService.LOGwriteFirstTrace(method, builder.toString()); + + return builder.build().toURL(); + } }