List of usage examples for com.liferay.portal.kernel.util PropsUtil get
public static String get(String key)
From source file:com.liferay.shopping.util.ShoppingPreferences.java
License:Open Source License
public boolean getEmailOrderConfirmationEnabled() { String emailOrderConfirmationEnabled = _portletPreferences.getValue("emailOrderConfirmationEnabled", StringPool.BLANK);/*from w w w .j a v a2 s. c om*/ if (Validator.isNotNull(emailOrderConfirmationEnabled)) { return GetterUtil.getBoolean(emailOrderConfirmationEnabled); } else { return GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SHOPPING_EMAIL_ORDER_CONFIRMATION_ENABLED)); } }
From source file:com.liferay.shopping.util.ShoppingPreferences.java
License:Open Source License
public String getEmailOrderConfirmationBody() { String emailOrderConfirmationBody = PortletProps .get(PortletPropsKeys.SHOPPING_EMAIL_ORDER_CONFIRMATION_BODY); _log.error(PortletPropsKeys.SHOPPING_EMAIL_ORDER_CONFIRMATION_BODY + " " + emailOrderConfirmationBody); if (Validator.isNotNull(emailOrderConfirmationBody)) { return ContentUtil.get(emailOrderConfirmationBody); } else {//from ww w .j a v a2 s.com return ContentUtil.get(PropsUtil.get(PropsKeys.SHOPPING_EMAIL_ORDER_CONFIRMATION_BODY)); } }
From source file:com.liferay.shopping.util.ShoppingPreferences.java
License:Open Source License
public String getEmailOrderConfirmationSubject() { String emailOrderConfirmationSubject = PortletProps .get(PortletPropsKeys.SHOPPING_EMAIL_ORDER_CONFIRMATION_SUBJECT); _log.error(/* w w w .j a v a2s. c o m*/ PortletPropsKeys.SHOPPING_EMAIL_ORDER_CONFIRMATION_SUBJECT + " " + emailOrderConfirmationSubject); if (Validator.isNotNull(emailOrderConfirmationSubject)) { return ContentUtil.get(emailOrderConfirmationSubject); } else { return ContentUtil.get(PropsUtil.get(PropsKeys.SHOPPING_EMAIL_ORDER_CONFIRMATION_SUBJECT)); } }
From source file:com.liferay.shopping.util.ShoppingPreferences.java
License:Open Source License
public boolean getEmailOrderShippingEnabled() { //String emailOrderShippingEnabled = _portletPreferences.getValue( // "emailOrderShippingEnabled", StringPool.BLANK); String emailOrderShippingEnabled = PortletProps.get(PortletPropsKeys.SHOPPING_EMAIL_ORDER_SHIPPING_ENABLED); if (Validator.isNotNull(emailOrderShippingEnabled)) { return GetterUtil.getBoolean(emailOrderShippingEnabled); } else {/*from ww w . j a va 2 s . com*/ return GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SHOPPING_EMAIL_ORDER_SHIPPING_ENABLED)); } }
From source file:com.liferay.shopping.util.ShoppingPreferences.java
License:Open Source License
public String getEmailOrderShippingBody() { //String emailOrderShippingBody = _portletPreferences.getValue( // "emailOrderShippingBody", StringPool.BLANK); String emailOrderShippingBody = PortletProps.get(PortletPropsKeys.SHOPPING_EMAIL_ORDER_SHIPPING_BODY); if (Validator.isNotNull(emailOrderShippingBody)) { return ContentUtil.get(emailOrderShippingBody); } else {//from w w w . java2s . co m return ContentUtil.get(PropsUtil.get(PropsKeys.SHOPPING_EMAIL_ORDER_SHIPPING_BODY)); } }
From source file:com.liferay.shopping.util.ShoppingPreferences.java
License:Open Source License
public String getEmailOrderShippingSubject() { //String emailOrderShippingSubject = _portletPreferences.getValue( // "emailOrderShippingSubject", StringPool.BLANK); String emailOrderShippingSubject = PortletProps.get(PortletPropsKeys.SHOPPING_EMAIL_ORDER_SHIPPING_SUBJECT); if (Validator.isNotNull(emailOrderShippingSubject)) { return ContentUtil.get(emailOrderShippingSubject); } else {/*from ww w . j a v a 2s . c om*/ return ContentUtil.get(PropsUtil.get(PropsKeys.SHOPPING_EMAIL_ORDER_SHIPPING_SUBJECT)); } }
From source file:com.liferay.skinny.service.ClpSerializer.java
License:Open Source License
public static String getServletContextName() { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; }//from w w w .j a v a2 s .co m synchronized (ClpSerializer.class) { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; } try { ClassLoader classLoader = ClpSerializer.class.getClassLoader(); Class<?> portletPropsClass = classLoader.loadClass("com.liferay.util.portlet.PortletProps"); Method getMethod = portletPropsClass.getMethod("get", new Class<?>[] { String.class }); String portletPropsServletContextName = (String) getMethod.invoke(null, "skinny-web-deployment-context"); if (Validator.isNotNull(portletPropsServletContextName)) { _servletContextName = portletPropsServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portlet properties"); } } if (Validator.isNull(_servletContextName)) { try { String propsUtilServletContextName = PropsUtil.get("skinny-web-deployment-context"); if (Validator.isNotNull(propsUtilServletContextName)) { _servletContextName = propsUtilServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portal properties"); } } } if (Validator.isNull(_servletContextName)) { _servletContextName = "skinny-web"; } return _servletContextName; } }
From source file:com.liferay.smartstore.service.service.ClpSerializer.java
License:Open Source License
public static String getServletContextName() { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; }/* w w w .j av a 2 s . c o m*/ synchronized (ClpSerializer.class) { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; } try { ClassLoader classLoader = ClpSerializer.class.getClassLoader(); Class<?> portletPropsClass = classLoader.loadClass("com.liferay.util.portlet.PortletProps"); Method getMethod = portletPropsClass.getMethod("get", new Class<?>[] { String.class }); String portletPropsServletContextName = (String) getMethod.invoke(null, "SmartStore-portlet-deployment-context"); if (Validator.isNotNull(portletPropsServletContextName)) { _servletContextName = portletPropsServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portlet properties"); } } if (Validator.isNull(_servletContextName)) { try { String propsUtilServletContextName = PropsUtil.get("SmartStore-portlet-deployment-context"); if (Validator.isNotNull(propsUtilServletContextName)) { _servletContextName = propsUtilServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portal properties"); } } } if (Validator.isNull(_servletContextName)) { _servletContextName = "SmartStore-portlet"; } return _servletContextName; } }
From source file:com.liferay.so.service.ClpSerializer.java
License:Open Source License
public static String getServletContextName() { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; }//from w ww . j a v a2s . c om synchronized (ClpSerializer.class) { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; } try { ClassLoader classLoader = ClpSerializer.class.getClassLoader(); Class<?> portletPropsClass = classLoader.loadClass("com.liferay.util.portlet.PortletProps"); Method getMethod = portletPropsClass.getMethod("get", new Class<?>[] { String.class }); String portletPropsServletContextName = (String) getMethod.invoke(null, "so-portlet-deployment-context"); if (Validator.isNotNull(portletPropsServletContextName)) { _servletContextName = portletPropsServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portlet properties"); } } if (Validator.isNull(_servletContextName)) { try { String propsUtilServletContextName = PropsUtil.get("so-portlet-deployment-context"); if (Validator.isNotNull(propsUtilServletContextName)) { _servletContextName = propsUtilServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portal properties"); } } } if (Validator.isNull(_servletContextName)) { _servletContextName = "so-portlet"; } return _servletContextName; } }
From source file:com.liferay.socialcoding.service.ClpSerializer.java
License:Open Source License
public static String getServletContextName() { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; }//from www . j a v a 2s. com synchronized (ClpSerializer.class) { if (Validator.isNotNull(_servletContextName)) { return _servletContextName; } try { ClassLoader classLoader = ClpSerializer.class.getClassLoader(); Class<?> portletPropsClass = classLoader.loadClass("com.liferay.util.portlet.PortletProps"); Method getMethod = portletPropsClass.getMethod("get", new Class<?>[] { String.class }); String portletPropsServletContextName = (String) getMethod.invoke(null, "social-coding-portlet-deployment-context"); if (Validator.isNotNull(portletPropsServletContextName)) { _servletContextName = portletPropsServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portlet properties"); } } if (Validator.isNull(_servletContextName)) { try { String propsUtilServletContextName = PropsUtil.get("social-coding-portlet-deployment-context"); if (Validator.isNotNull(propsUtilServletContextName)) { _servletContextName = propsUtilServletContextName; } } catch (Throwable t) { if (_log.isInfoEnabled()) { _log.info("Unable to locate deployment context from portal properties"); } } } if (Validator.isNull(_servletContextName)) { _servletContextName = "social-coding-portlet"; } return _servletContextName; } }