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.security.permission;
016    
017    import com.liferay.portal.model.Group;
018    import com.liferay.portal.model.Organization;
019    import com.liferay.portal.model.Role;
020    
021    import java.util.List;
022    
023    /**
024     * @author Brian Wing Shun Chan
025     */
026    public interface PermissionCheckerBag extends UserPermissionCheckerBag {
027    
028            /**
029             * @deprecated As of 7.0.0, replaced by {@link
030             *             UserPermissionCheckerBag#getGroups()}
031             */
032            public List<Group> getGroups();
033    
034            public long[] getRoleIds();
035    
036            public List<Role> getRoles();
037    
038            /**
039             * @deprecated As of 7.0.0, replaced by {@link
040             *             UserPermissionCheckerBag#getUserGroups()}
041             */
042            public List<Group> getUserGroups();
043    
044            /**
045             * @deprecated As of 7.0.0, replaced by {@link
046             *             UserPermissionCheckerBag#getUserOrgGroups()}
047             */
048            public List<Group> getUserOrgGroups();
049    
050            /**
051             * @deprecated As of 7.0.0, replaced by {@link
052             *             UserPermissionCheckerBag#getUserOrgs()}
053             */
054            public List<Organization> getUserOrgs();
055    
056            /**
057             * @deprecated As of 7.0.0, replaced by {@link
058             *             UserPermissionCheckerBag#getUserUserGroupGroups()}
059             */
060            public List<Group> getUserUserGroupGroups();
061    
062            /**
063             * @deprecated As of 6.1.0, renamed to {@link
064             *             #isGroupAdmin(PermissionChecker, Group)}
065             */
066            public boolean isCommunityAdmin(
067                            PermissionChecker permissionChecker, Group group)
068                    throws Exception;
069    
070            /**
071             * @deprecated As of 6.1.0, renamed to {@link
072             *             #isGroupOwner(PermissionChecker, Group)}
073             */
074            public boolean isCommunityOwner(
075                            PermissionChecker permissionChecker, Group group)
076                    throws Exception;
077    
078            public boolean isContentReviewer(
079                            PermissionChecker permissionChecker, Group group)
080                    throws Exception;
081    
082            public boolean isGroupAdmin(
083                            PermissionChecker permissionChecker, Group group)
084                    throws Exception;
085    
086            public boolean isGroupMember(
087                            PermissionChecker permissionChecker, Group group)
088                    throws Exception;
089    
090            public boolean isGroupOwner(
091                            PermissionChecker permissionChecker, Group group)
092                    throws Exception;
093    
094            public boolean isOrganizationAdmin(
095                            PermissionChecker permissionChecker, Organization organization)
096                    throws Exception;
097    
098            public boolean isOrganizationOwner(
099                            PermissionChecker permissionChecker, Organization organization)
100                    throws Exception;
101    
102    }