diff options
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java | 14 |
1 files changed, 14 insertions, 0 deletions
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"; + } + } } |