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.service.permission;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.model.Layout;
019    import com.liferay.portal.kernel.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            public boolean contains(
056                            PermissionChecker permissionChecker, long groupId,
057                            boolean privateLayout, long layoutId, String actionId)
058                    throws PortalException;
059    
060            public boolean contains(
061                            PermissionChecker permissionChecker, long plid, String actionId)
062                    throws PortalException;
063    
064            public boolean containsWithoutViewableGroup(
065                            PermissionChecker permissionChecker, Layout layout,
066                            boolean checkLayoutUpdateable, String actionId)
067                    throws PortalException;
068    
069            public boolean containsWithoutViewableGroup(
070                            PermissionChecker permissionChecker, Layout layout, String actionId)
071                    throws PortalException;
072    
073    }