X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fportalapp%2Fportal%2Futils%2FEcompPortalUtils.java;h=2b39da0afe2734523a88b2193bf7de4bee720cdb;hb=b58317907044b0cd72f1cdd8582800dc2c764b40;hp=48c2dbe8ec34f51db94df20810f3aee907ac58e3;hpb=c67680ada04c96a1753c037d67080c65628d32ca;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java index 48c2dbe8..2b39da0a 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java @@ -340,5 +340,19 @@ public class EcompPortalUtils { } } } + + public static String widgetMsProtocol(){ + final String protocol; + try{ + protocol = SystemProperties.getProperty(EPCommonSystemProperties.WIDGET_MS_PROTOCOL); + return (protocol == null || protocol.trim().equals("")) ? "https" : protocol ; + } + catch(IllegalStateException ese){ + //looks like SystemProperties.getProperty throws IllegalStateException if it cannot find a property you are looking for + //In order to not break the code if a non-required property is missing from system.properties, returning https as default + //when this exception is caught. + return "https"; + } + } }