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    import javax.portlet.PortletResponse;
023    
024    /**
025     * Provides an interface responsible for extending the portlet toolbar by adding
026     * more elements.
027     *
028     * <p>
029     * Implementations of this class must be OSGI components that are registered in
030     * the OSGI Registry. The way that this component is registered in the OSGI
031     * Registry must be consistent with the way the {@link
032     * com.liferay.portal.kernel.portlet.toolbar.contributor.locator.PortletToolbarContributorLocator}
033     * implementations search for it in the registry.
034     * </p>
035     *
036     * @author Sergio Gonz??lez
037     */
038    public interface PortletToolbarContributor {
039    
040            /**
041             * Returns menus to be rendered in the portlet toolbar.
042             *
043             * @param  portletRequest the portlet request
044             * @return menus to be rendered in the portlet toolbar
045             */
046            public List<Menu> getPortletTitleMenus(
047                    PortletRequest portletRequest, PortletResponse portletResponse);
048    
049    }