package at.gv.egovernment.moa.ss.erechtclient.init; import java.util.Properties; import org.apache.log4j.Logger; /** * @author Gregor Karlinger (mailto:gregor.karlinger@siemens.com) */ public class InitPropertiesBean { private Properties initProps_; private static Logger logger_ = Logger.getLogger(Constants.LH_BEANS_); public InitPropertiesBean(Properties props) { initProps_ = props; } public String getWebAppHostPort() { String webAppHostPort = initProps_.getProperty(Constants.IP_WEBAPP_HOST_PORT_); logger_.debug("MOA SS E-Recht Client web application host/port: " + webAppHostPort); if (webAppHostPort == null || webAppHostPort.trim().length() == 0) { String defaultWebAppHostPath = Constants.DV_WEBAPP_HOST_PATH_; logger_.info("MOA SS E-Recht Client web application host/port property not available, using default (" + defaultWebAppHostPath + ")"); return defaultWebAppHostPath; } else return webAppHostPort; } }