Example usage for com.liferay.portal.kernel.util WebKeys JOURNAL_RECENT_DYNAMIC_DATA_MAPPING_TEMPLATES

List of usage examples for com.liferay.portal.kernel.util WebKeys JOURNAL_RECENT_DYNAMIC_DATA_MAPPING_TEMPLATES

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util WebKeys JOURNAL_RECENT_DYNAMIC_DATA_MAPPING_TEMPLATES.

Prototype

String JOURNAL_RECENT_DYNAMIC_DATA_MAPPING_TEMPLATES

To view the source code for com.liferay.portal.kernel.util WebKeys JOURNAL_RECENT_DYNAMIC_DATA_MAPPING_TEMPLATES.

Click Source Link

Usage

From source file:com.liferay.journal.util.impl.JournalUtil.java

License:Open Source License

public static Stack<DDMTemplate> getRecentDDMTemplates(PortletRequest portletRequest) {

    PortletSession portletSession = portletRequest.getPortletSession();

    Stack<DDMTemplate> recentDDMTemplates = (Stack<DDMTemplate>) portletSession
            .getAttribute(WebKeys.JOURNAL_RECENT_DYNAMIC_DATA_MAPPING_TEMPLATES);

    if (recentDDMTemplates == null) {
        recentDDMTemplates = new FiniteUniqueStack<>(MAX_STACK_SIZE);

        portletSession.setAttribute(WebKeys.JOURNAL_RECENT_DYNAMIC_DATA_MAPPING_TEMPLATES, recentDDMTemplates);
    }//w  ww .j  a v  a2 s  .c  om

    return recentDDMTemplates;
}