001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.kernel.portlet.toolbar.contributor; 016 017 import com.liferay.portal.kernel.servlet.taglib.ui.Menu; 018 019 import java.util.List; 020 021 import javax.portlet.PortletRequest; 022 023 /** 024 * Provides an interface responsible for extending the portlet toolbar by adding 025 * more elements. 026 * 027 * <p> 028 * Implementations of this class must be OSGI components that are registered in 029 * the OSGI Registry. The way that this component is registered in the OSGI 030 * Registry must be consistent with the way the {@link 031 * com.liferay.portal.kernel.portlet.toolbar.contributor.locator.PortletToolbarContributorLocator} 032 * implementations search for it in the registry. 033 * </p> 034 * 035 * @author Sergio Gonz??lez 036 */ 037 public interface PortletToolbarContributor { 038 039 /** 040 * Returns menus to be rendered in the portlet toolbar. 041 * 042 * @param portletRequest the portlet request 043 * @return menus to be rendered in the portlet toolbar 044 */ 045 public List<Menu> getPortletTitleMenus(PortletRequest portletRequest); 046 047 }