Created
March 8, 2016 00:10
-
-
Save gamerson/8e10d0245b1efcbd438f to your computer and use it in GitHub Desktop.
OverrideEditFolderMVCResourceCommand.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.portlet.PortletException; | |
| import javax.portlet.ResourceRequest; | |
| import javax.portlet.ResourceResponse; | |
| import org.osgi.service.component.annotations.Component; | |
| import com.liferay.document.library.web.constants.DLPortletKeys; | |
| import com.liferay.document.library.web.portlet.action.EditFolderMVCResourceCommand; | |
| import com.liferay.portal.kernel.portlet.bridges.mvc.MVCResourceCommand; | |
| @Component( | |
| property = { | |
| "javax.portlet.name=" + DLPortletKeys.DOCUMENT_LIBRARY, | |
| "javax.portlet.name=" + DLPortletKeys.DOCUMENT_LIBRARY_ADMIN, | |
| "javax.portlet.name=" + DLPortletKeys.MEDIA_GALLERY_DISPLAY, | |
| "mvc.command.name=/document_library/edit_folder", | |
| "service.ranking=:Integer=1000" | |
| }, | |
| service = MVCResourceCommand.class | |
| ) | |
| public class OverrideEditFolderMVCResourceCommand extends EditFolderMVCResourceCommand { | |
| @Override | |
| public boolean serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws PortletException { | |
| // do something then call super | |
| return super.serveResource(resourceRequest, resourceResponse); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment