Add portal property; correct docker build script.
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / utils / EcompPortalUtils.java
index 48c2dbe..2b39da0 100644 (file)
@@ -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";
+               }               
+       }
 
 }