001    /**
002     * Copyright (c) 2000-2010 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;
016    
017    import com.liferay.portal.kernel.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * The interface for the permission remote service.
025     *
026     * <p>
027     * Never modify or reference this interface directly. Always use {@link PermissionServiceUtil} to access the permission remote service. Add custom service methods to {@link com.liferay.portal.service.impl.PermissionServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
028     * </p>
029     *
030     * <p>
031     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see PermissionServiceUtil
036     * @see com.liferay.portal.service.base.PermissionServiceBaseImpl
037     * @see com.liferay.portal.service.impl.PermissionServiceImpl
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface PermissionService {
043            public void checkPermission(long groupId, long resourceId)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException;
046    
047            public void checkPermission(long groupId, java.lang.String name,
048                    long primKey)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException;
051    
052            public void checkPermission(long groupId, java.lang.String name,
053                    java.lang.String primKey)
054                    throws com.liferay.portal.kernel.exception.PortalException,
055                            com.liferay.portal.kernel.exception.SystemException;
056    
057            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
058            public boolean hasGroupPermission(long groupId, java.lang.String actionId,
059                    long resourceId)
060                    throws com.liferay.portal.kernel.exception.SystemException;
061    
062            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
063            public boolean hasUserPermission(long userId, java.lang.String actionId,
064                    long resourceId)
065                    throws com.liferay.portal.kernel.exception.SystemException;
066    
067            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
068            public boolean hasUserPermissions(long userId, long groupId,
069                    java.util.List<com.liferay.portal.model.Resource> resources,
070                    java.lang.String actionId,
071                    com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException;
074    
075            public void setGroupPermissions(long groupId, java.lang.String[] actionIds,
076                    long resourceId)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException;
079    
080            public void setGroupPermissions(java.lang.String className,
081                    java.lang.String classPK, long groupId, java.lang.String[] actionIds,
082                    long resourceId)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException;
085    
086            public void setOrgGroupPermissions(long organizationId, long groupId,
087                    java.lang.String[] actionIds, long resourceId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException;
090    
091            public void setRolePermission(long roleId, long groupId,
092                    java.lang.String name, int scope, java.lang.String primKey,
093                    java.lang.String actionId)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException;
096    
097            public void setRolePermissions(long roleId, long groupId,
098                    java.lang.String[] actionIds, long resourceId)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.SystemException;
101    
102            public void setUserPermissions(long userId, long groupId,
103                    java.lang.String[] actionIds, long resourceId)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException;
106    
107            public void unsetRolePermission(long roleId, long groupId, long permissionId)
108                    throws com.liferay.portal.kernel.exception.PortalException,
109                            com.liferay.portal.kernel.exception.SystemException;
110    
111            public void unsetRolePermission(long roleId, long groupId,
112                    java.lang.String name, int scope, java.lang.String primKey,
113                    java.lang.String actionId)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException;
116    
117            public void unsetRolePermissions(long roleId, long groupId,
118                    java.lang.String name, int scope, java.lang.String actionId)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException;
121    
122            public void unsetUserPermissions(long userId, long groupId,
123                    java.lang.String[] actionIds, long resourceId)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException;
126    }