001    /**
002     * Copyright (c) 2000-2013 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.portlet;
016    
017    import com.liferay.portal.model.Group;
018    import com.liferay.portal.model.Portlet;
019    import com.liferay.portal.security.permission.PermissionChecker;
020    import com.liferay.portal.theme.ThemeDisplay;
021    
022    /**
023     * @author Jorge Ferrer
024     */
025    public interface ControlPanelEntry {
026    
027            public boolean hasAccessPermission(
028                            PermissionChecker permissionChecker, Group group, Portlet portlet)
029                    throws Exception;
030    
031            /**
032             * @deprecated As of 6.2.0, with no direct replacement.<p>This method was
033             *             originally defined to determine if a portlet should be
034             *             displayed in the Control Panel. In this version, this method
035             *             should always return <code>false</code> and remains only to
036             *             preserve binary compatibility. This method will be
037             *             permanently removed in a future version.</p><p>In lieu of
038             *             this method, the Control Panel now uses {@link
039             *             #hasAccessPermission} to determine if a portlet should be
040             *             displayed in the Control Panel.</p>
041             */
042            public boolean isVisible(
043                            PermissionChecker permissionChecker, Portlet portlet)
044                    throws Exception;
045    
046            /**
047             * @deprecated As of 6.2.0, with no direct replacement.<p>This method was
048             *             originally defined to determine if a portlet should be
049             *             displayed in the Control Panel. In this version, this method
050             *             should always return <code>false</code> and remains only to
051             *             preserve binary compatibility. This method will be
052             *             permanently removed in a future version.</p><p>In lieu of
053             *             this method, the Control Panel now uses {@link
054             *             #hasAccessPermission} to determine if a portlet should be
055             *             displayed in the Control Panel.</p>
056             */
057            public boolean isVisible(
058                            Portlet portlet, String category, ThemeDisplay themeDisplay)
059                    throws Exception;
060    
061    }