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

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

Introduction

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

Prototype

String MESSAGE_BOARDS_TREE_WALKER_CATEGORY

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

Click Source Link

Usage

From source file:com.liferay.message.boards.web.internal.trash.MBThreadTrashRenderer.java

License:Open Source License

@Override
public boolean include(HttpServletRequest request, HttpServletResponse response, String template)
        throws Exception {

    MBMessageDisplay messageDisplay = MBMessageServiceUtil.getMessageDisplay(_rootMessage.getMessageId(),
            WorkflowConstants.STATUS_ANY);

    request.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE_DISPLAY, messageDisplay);

    MBTreeWalker treeWalker = messageDisplay.getTreeWalker();

    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker);

    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, messageDisplay.getCategory());
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, treeWalker.getRoot());
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, Integer.valueOf(0));
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.FALSE);
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, _rootMessage);
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, messageDisplay.getThread());

    return super.include(request, response, template);
}

From source file:com.liferay.message.boards.web.trash.MBThreadTrashRenderer.java

License:Open Source License

@Override
public boolean include(HttpServletRequest request, HttpServletResponse response, String template)
        throws Exception {

    MBMessageDisplay messageDisplay = MBMessageServiceUtil.getMessageDisplay(_rootMessage.getMessageId(),
            WorkflowConstants.STATUS_ANY);

    request.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE_DISPLAY, messageDisplay);

    MBTreeWalker treeWalker = messageDisplay.getTreeWalker();

    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker);
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, messageDisplay.getCategory());
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, treeWalker.getRoot());
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, Integer.valueOf(0));
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.FALSE);
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, _rootMessage);
    request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, messageDisplay.getThread());

    return super.include(request, response, template);
}