[AAI-176 Amsterdam] Check in related link changes
[aai/aai-common.git] / aai-core / src / main / java / org / openecomp / aai / serialization / queryformats / utils / UrlBuilder.java
index 817a679..7f08856 100644 (file)
@@ -25,7 +25,6 @@ import java.net.URI;
 import java.net.URISyntaxException;
 
 import org.apache.tinkerpop.gremlin.structure.Vertex;
-
 import org.openecomp.aai.db.props.AAIProperties;
 import org.openecomp.aai.exceptions.AAIException;
 import org.openecomp.aai.introspection.Version;
@@ -43,7 +42,13 @@ public class UrlBuilder {
        public UrlBuilder (Version version, DBSerializer serializer) throws AAIException {
                this.serializer = serializer;
                this.version = version;
-               this.serverBase = AAIApiServerURLBase.get(AAIProperties.LATEST);
+        this.serverBase = AAIApiServerURLBase.get(AAIProperties.LATEST);
+       }
+
+       public UrlBuilder (Version version, DBSerializer serializer, String serverBase) {
+               this.serializer = serializer;
+               this.version = version;
+               this.serverBase = serverBase;
        }
        
        public String pathed(Vertex v) throws AAIFormatVertexException {
@@ -71,4 +76,8 @@ public class UrlBuilder {
 
                return result.toString();
        }
+
+       protected String getServerBase(Version v) throws AAIException {
+               return AAIApiServerURLBase.get(v);
+       }
 }