001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            public boolean contains(
052                            PermissionChecker permissionChecker, Layout layout,
053                            String controlPanelCategory, boolean checkViewableGroup,
054                            String actionId)
055                    throws PortalException, SystemException;
056    
057            public boolean contains(
058                            PermissionChecker permissionChecker, Layout layout,
059                            String controlPanelCategory, String actionId)
060                    throws PortalException, SystemException;
061    
062            public boolean contains(
063                            PermissionChecker permissionChecker, long groupId,
064                            boolean privateLayout, long layoutId, String actionId)
065                    throws PortalException, SystemException;
066    
067            public boolean contains(
068                            PermissionChecker permissionChecker, long groupId,
069                            boolean privateLayout, long layoutId, String controlPanelCategory,
070                            String actionId)
071                    throws PortalException, SystemException;
072    
073            public boolean contains(
074                            PermissionChecker permissionChecker, long plid, String actionId)
075                    throws PortalException, SystemException;
076    
077            public boolean containsWithoutViewableGroup(
078                            PermissionChecker permissionChecker, Layout layout,
079                            String controlPanelCategory, boolean checkLayoutUpdateable,
080                            String actionId)
081                    throws PortalException, SystemException;
082    
083            public boolean containsWithoutViewableGroup(
084                            PermissionChecker permissionChecker, Layout layout,
085                            String controlPanelCategory, String actionId)
086                    throws PortalException, SystemException;
087    
088    }