001    /**
002     * Copyright (c) 2000-2011 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.model.Portlet;
021    import com.liferay.portal.security.permission.PermissionChecker;
022    
023    import java.util.Collection;
024    
025    /**
026     * @author Brian Wing Shun Chan
027     * @author Raymond Augé
028     */
029    public interface PortletPermission {
030    
031            public void check(
032                            PermissionChecker permissionChecker, Layout layout,
033                            String portletId, String actionId)
034                    throws PortalException, SystemException;
035    
036            public void check(
037                            PermissionChecker permissionChecker, Layout layout,
038                            String portletId, String actionId, boolean strict)
039                    throws PortalException, SystemException;
040    
041            public void check(
042                            PermissionChecker permissionChecker, long groupId, Layout layout,
043                            String portletId, String actionId)
044                    throws PortalException, SystemException;
045    
046            public void check(
047                            PermissionChecker permissionChecker, long groupId, Layout layout,
048                            String portletId, String actionId, boolean strict)
049                    throws PortalException, SystemException;
050    
051            public void check(
052                            PermissionChecker permissionChecker, long groupId, long plid,
053                            String portletId, String actionId)
054                    throws PortalException, SystemException;
055    
056            public void check(
057                            PermissionChecker permissionChecker, long groupId, long plid,
058                            String portletId, String actionId, boolean strict)
059                    throws PortalException, SystemException;
060    
061            public void check(
062                            PermissionChecker permissionChecker, long plid, String portletId,
063                            String actionId)
064                    throws PortalException, SystemException;
065    
066            public void check(
067                            PermissionChecker permissionChecker, long plid, String portletId,
068                            String actionId, boolean strict)
069                    throws PortalException, SystemException;
070    
071            public void check(
072                            PermissionChecker permissionChecker, String portletId,
073                            String actionId)
074                    throws PortalException, SystemException;
075    
076            public boolean contains(
077                            PermissionChecker permissionChecker, Layout layout, Portlet portlet,
078                            String actionId)
079                    throws PortalException, SystemException;
080    
081            public boolean contains(
082                            PermissionChecker permissionChecker, Layout layout, Portlet portlet,
083                            String actionId, boolean strict)
084                    throws PortalException, SystemException;
085    
086            public boolean contains(
087                            PermissionChecker permissionChecker, Layout layout,
088                            String portletId, String actionId)
089                    throws PortalException, SystemException;
090    
091            public boolean contains(
092                            PermissionChecker permissionChecker, Layout layout,
093                            String portletId, String actionId, boolean strict)
094                    throws PortalException, SystemException;
095    
096            public boolean contains(
097                            PermissionChecker permissionChecker, long groupId, Layout layout,
098                            Portlet portlet, String actionId)
099                    throws PortalException, SystemException;
100    
101            public boolean contains(
102                            PermissionChecker permissionChecker, long groupId, Layout layout,
103                            Portlet portlet, String actionId, boolean strict)
104                    throws PortalException, SystemException;
105    
106            public boolean contains(
107                            PermissionChecker permissionChecker, long groupId, Layout layout,
108                            String portletId, String actionId)
109                    throws PortalException, SystemException;
110    
111            public boolean contains(
112                            PermissionChecker permissionChecker, long groupId, Layout layout,
113                            String portletId, String actionId, boolean strict)
114                    throws PortalException, SystemException;
115    
116            public boolean contains(
117                    PermissionChecker permissionChecker, long groupId, long plid,
118                    Collection<Portlet> portlets, String actionId);
119    
120            public boolean contains(
121                            PermissionChecker permissionChecker, long groupId, long plid,
122                            Portlet portlet, String actionId, boolean strict)
123                    throws PortalException, SystemException;
124    
125            public boolean contains(
126                            PermissionChecker permissionChecker, long groupId, long plid,
127                            String portletId, String actionId, boolean strict)
128                    throws PortalException, SystemException;
129    
130            public boolean contains(
131                            PermissionChecker permissionChecker, long plid, Portlet portlet,
132                            String actionId)
133                    throws PortalException, SystemException;
134    
135            public boolean contains(
136                            PermissionChecker permissionChecker, long plid, Portlet portlet,
137                            String actionId, boolean strict)
138                    throws PortalException, SystemException;
139    
140            public boolean contains(
141                            PermissionChecker permissionChecker, long plid, String portletId,
142                            String actionId)
143                    throws PortalException, SystemException;
144    
145            public boolean contains(
146                            PermissionChecker permissionChecker, long plid, String portletId,
147                            String actionId, boolean strict)
148                    throws PortalException, SystemException;
149    
150            public boolean contains(
151                            PermissionChecker permissionChecker, String portletId,
152                            String actionId)
153                    throws PortalException, SystemException;
154    
155            public String getPrimaryKey(long plid, String portletId);
156    
157            public boolean hasLayoutManagerPermission(
158                    String portletId, String actionId);
159    
160    }