001
014
015 package com.liferay.portlet.documentlibrary.action;
016
017 import com.liferay.portal.kernel.repository.model.Folder;
018 import com.liferay.portal.struts.FindAction;
019 import com.liferay.portal.util.PortletKeys;
020 import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
021
022 import javax.servlet.http.HttpServletRequest;
023
024
027 public class FindFolderAction extends FindAction {
028
029 @Override
030 protected long getGroupId(long primaryKey) throws Exception {
031 Folder folder = DLAppLocalServiceUtil.getFolder(primaryKey);
032
033 return folder.getRepositoryId();
034 }
035
036 @Override
037 protected String getPrimaryKeyParameterName() {
038 return "folderId";
039 }
040
041 @Override
042 protected String getStrutsAction(
043 HttpServletRequest request, String portletId) {
044
045 return "/document_library/view";
046 }
047
048 @Override
049 protected String[] initPortletIds() {
050 return new String[] {
051 PortletKeys.DOCUMENT_LIBRARY, PortletKeys.DOCUMENT_LIBRARY_DISPLAY,
052 PortletKeys.MEDIA_GALLERY_DISPLAY};
053 }
054
055 }