Example usage for com.liferay.portal.kernel.model Portlet getTemplateHandlerClass

List of usage examples for com.liferay.portal.kernel.model Portlet getTemplateHandlerClass

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model Portlet getTemplateHandlerClass.

Prototype

public String getTemplateHandlerClass();

Source Link

Document

Returns the name of the template handler class of the portlet.

Usage

From source file:com.liferay.portlet.display.template.exportimport.portlet.preferences.processor.PortletDisplayTemplateExportCapability.java

License:Open Source License

protected String getDisplayStyle(PortletDataContext portletDataContext, String portletId,
        PortletPreferences portletPreferences) {

    try {/*from w  w  w  .  jav  a  2 s  . co  m*/
        Portlet portlet = _portletLocalService.getPortletById(portletDataContext.getCompanyId(), portletId);

        if (Validator.isNotNull(portlet.getTemplateHandlerClass())) {
            return portletPreferences.getValue("displayStyle", null);
        }
    } catch (Exception e) {
    }

    return null;
}

From source file:com.liferay.portlet.display.template.exportimport.portlet.preferences.processor.PortletDisplayTemplateExportCapability.java

License:Open Source License

protected long getDisplayStyleGroupId(PortletDataContext portletDataContext, String portletId,
        PortletPreferences portletPreferences) {

    try {/*from   w ww  .  j  av a2 s .c o  m*/
        Portlet portlet = _portletLocalService.getPortletById(portletDataContext.getCompanyId(), portletId);

        if (Validator.isNotNull(portlet.getTemplateHandlerClass())) {
            return GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null));
        }
    } catch (Exception e) {
    }

    return 0;
}