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