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

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

Introduction

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

Prototype

String DOCUMENT_LIBRARY_FILE_SHORTCUT

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

Click Source Link

Usage

From source file:com.liferay.document.library.web.internal.portlet.action.EditFileShortcutMVCRenderCommand.java

License:Open Source License

@Override
public String render(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException {

    try {// w w  w. j  a  v  a  2s  . c o  m
        FileShortcut fileShortcut = ActionUtil.getFileShortcut(renderRequest);

        renderRequest.setAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_SHORTCUT, fileShortcut);
    } catch (Exception e) {
        if (e instanceof NoSuchFileShortcutException || e instanceof PrincipalException) {

            SessionErrors.add(renderRequest, e.getClass());

            return "/document_library/error.jsp";
        } else {
            throw new PortletException(e);
        }
    }

    return "/document_library/edit_file_shortcut.jsp";
}