X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Futils%2FURLUtilities.java;h=d0178fd64be0cfbcf0bf3701be3e177be5a6ef70;hb=5ecbc83f99f72a197447857f8520449d4cba040e;hp=c3661ba0ecec15096c5444cf17a4f2cfbf6418eb;hpb=4261823d84c2b911b68cdf4cb4dc3be429ebe285;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java index c3661ba0..d0178fd6 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/URLUtilities.java @@ -37,6 +37,7 @@ import org.onap.dmaap.datarouter.provisioning.BaseServlet; * @version $Id: URLUtilities.java,v 1.2 2014/03/12 19:45:41 eby Exp $ */ public class URLUtilities { + /** * Generate the URL used to access a feed. * @@ -44,7 +45,7 @@ public class URLUtilities { * @return the URL */ public static String generateFeedURL(int feedid) { - return "https://" + BaseServlet.prov_name + "/feed/" + feedid; + return "https://" + BaseServlet.provName + "/feed/" + feedid; } /** @@ -54,7 +55,7 @@ public class URLUtilities { * @return the URL */ public static String generatePublishURL(int feedid) { - return "https://" + BaseServlet.prov_name + "/publish/" + feedid; + return "https://" + BaseServlet.provName + "/publish/" + feedid; } /** @@ -64,7 +65,7 @@ public class URLUtilities { * @return the URL */ public static String generateSubscribeURL(int feedid) { - return "https://" + BaseServlet.prov_name + "/subscribe/" + feedid; + return "https://" + BaseServlet.provName + "/subscribe/" + feedid; } /** @@ -74,7 +75,7 @@ public class URLUtilities { * @return the URL */ public static String generateFeedLogURL(int feedid) { - return "https://" + BaseServlet.prov_name + "/feedlog/" + feedid; + return "https://" + BaseServlet.provName + "/feedlog/" + feedid; } /** @@ -84,7 +85,7 @@ public class URLUtilities { * @return the URL */ public static String generateSubscriptionURL(int subid) { - return "https://" + BaseServlet.prov_name + "/subs/" + subid; + return "https://" + BaseServlet.provName + "/subs/" + subid; } /** @@ -94,7 +95,7 @@ public class URLUtilities { * @return the URL */ public static String generateSubLogURL(int subid) { - return "https://" + BaseServlet.prov_name + "/sublog/" + subid; + return "https://" + BaseServlet.provName + "/sublog/" + subid; } /** @@ -114,7 +115,7 @@ public class URLUtilities { public static String generatePeerLogsURL() { //Fixes for Itrack ticket - DATARTR-4#Fixing if only one Prov is configured, not to give exception to fill logs. String peerPodUrl = getPeerPodName(); - if (peerPodUrl.equals("") || peerPodUrl.equals(null)) { + if (peerPodUrl == null || peerPodUrl.equals("")) { return ""; } @@ -137,8 +138,9 @@ public class URLUtilities { } System.out.println("ALL PODS: " + Arrays.asList(BaseServlet.getPods())); for (String pod : BaseServlet.getPods()) { - if (!pod.equals(this_pod)) + if (!pod.equals(this_pod)) { other_pod = pod; + } } } return other_pod;