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.portal.service.permission;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.model.Layout;
020    import com.liferay.portal.security.permission.PermissionChecker;
021    
022    /**
023     * @author Charles May
024     * @author Brian Wing Shun Chan
025     * @author Raymond Aug??
026     */
027    public interface LayoutPermission {
028    
029            public void check(
030                            PermissionChecker permissionChecker, Layout layout, String actionId)
031                    throws PortalException, SystemException;
032    
033            public void check(
034                            PermissionChecker permissionChecker, long groupId,
035                            boolean privateLayout, long layoutId, String actionId)
036                    throws PortalException, SystemException;
037    
038            public void check(
039                            PermissionChecker permissionChecker, long plid, String actionId)
040                    throws PortalException, SystemException;
041    
042            public boolean contains(
043                            PermissionChecker permissionChecker, Layout layout,
044                            boolean checkViewableGroup, String actionId)
045                    throws PortalException, SystemException;
046    
047            public boolean contains(
048                            PermissionChecker permissionChecker, Layout layout, String actionId)
049                    throws PortalException, SystemException;
050    
051            /**
052             * @deprecated As of 6.2.0, replaced by {@link #contains(PermissionChecker,
053             *             Layout, boolean, String)}
054             */
055            public boolean contains(
056                            PermissionChecker permissionChecker, Layout layout,
057                            String controlPanelCategory, boolean checkViewableGroup,
058                            String actionId)
059                    throws PortalException, SystemException;
060    
061            /**
062             * @deprecated As of 6.2.0, replaced by {@link #contains(PermissionChecker,
063             *             Layout, String)}
064             */
065            public boolean contains(
066                            PermissionChecker permissionChecker, Layout layout,
067                            String controlPanelCategory, String actionId)
068                    throws PortalException, SystemException;
069    
070            public boolean contains(
071                            PermissionChecker permissionChecker, long groupId,
072                            boolean privateLayout, long layoutId, String actionId)
073                    throws PortalException, SystemException;
074    
075            /**
076             * @deprecated As of 6.2.0, replaced by {@link #contains(PermissionChecker,
077             *             long, boolean, long, String)}
078             */
079            public boolean contains(
080                            PermissionChecker permissionChecker, long groupId,
081                            boolean privateLayout, long layoutId, String controlPanelCategory,
082                            String actionId)
083                    throws PortalException, SystemException;
084    
085            public boolean contains(
086                            PermissionChecker permissionChecker, long plid, String actionId)
087                    throws PortalException, SystemException;
088    
089            public boolean containsWithoutViewableGroup(
090                            PermissionChecker permissionChecker, Layout layout,
091                            boolean checkLayoutUpdateable, String actionId)
092                    throws PortalException, SystemException;
093    
094            public boolean containsWithoutViewableGroup(
095                            PermissionChecker permissionChecker, Layout layout, String actionId)
096                    throws PortalException, SystemException;
097    
098            /**
099             * @deprecated As of 6.2.0, replaced by {@link
100             *             #containsWithoutViewableGroup(PermissionChecker, Layout,
101             *             boolean, String)}
102             */
103            public boolean containsWithoutViewableGroup(
104                            PermissionChecker permissionChecker, Layout layout,
105                            String controlPanelCategory, boolean checkLayoutUpdateable,
106                            String actionId)
107                    throws PortalException, SystemException;
108    
109            /**
110             * @deprecated As of 6.2.0, replaced by {@link
111             *             #containsWithoutViewableGroup(PermissionChecker, Layout,
112             *             String)}
113             */
114            public boolean containsWithoutViewableGroup(
115                            PermissionChecker permissionChecker, Layout layout,
116                            String controlPanelCategory, String actionId)
117                    throws PortalException, SystemException;
118    
119    }