Example usage for com.liferay.portal.kernel.template TemplateHandler getDefaultTemplateKey

List of usage examples for com.liferay.portal.kernel.template TemplateHandler getDefaultTemplateKey

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.template TemplateHandler getDefaultTemplateKey.

Prototype

public String getDefaultTemplateKey();

Source Link

Document

Returns the key of the template handler's default template.

Usage

From source file:com.liferay.portlet.display.template.internal.PortletDisplayTemplateImpl.java

License:Open Source License

@Override
public DDMTemplate getDefaultPortletDisplayTemplateDDMTemplate(long groupId, long classNameId) {

    TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(classNameId);

    if ((templateHandler == null) || (templateHandler.getDefaultTemplateKey() == null)) {

        return null;
    }//  ww w.jav a  2s . c o  m

    return getPortletDisplayTemplateDDMTemplate(groupId, classNameId,
            getDisplayStyle(templateHandler.getDefaultTemplateKey()));
}