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;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
020    import com.liferay.portal.kernel.transaction.Isolation;
021    import com.liferay.portal.kernel.transaction.Propagation;
022    import com.liferay.portal.kernel.transaction.Transactional;
023    
024    /**
025     * The interface for the role remote service.
026     *
027     * <p>
028     * 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.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see RoleServiceUtil
033     * @see com.liferay.portal.service.base.RoleServiceBaseImpl
034     * @see com.liferay.portal.service.impl.RoleServiceImpl
035     * @generated
036     */
037    @JSONWebService
038    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
039            PortalException.class, SystemException.class})
040    public interface RoleService {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify or reference this interface directly. Always use {@link RoleServiceUtil} to access the role remote service. Add custom service methods to {@link com.liferay.portal.service.impl.RoleServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
045             */
046            public com.liferay.portal.model.Role addRole(java.lang.String name,
047                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
048                    java.lang.String description, int type)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException;
051    
052            public void addUserRoles(long userId, long[] roleIds)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException;
055    
056            public void deleteRole(long roleId)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException;
059    
060            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
061            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
062                    long groupId)
063                    throws com.liferay.portal.kernel.exception.SystemException;
064    
065            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public com.liferay.portal.model.Role getRole(long roleId)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException;
069    
070            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071            public com.liferay.portal.model.Role getRole(long companyId,
072                    java.lang.String name)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
078                    long userId, long groupId)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
082            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
083                    long userId, long groupId)
084                    throws com.liferay.portal.kernel.exception.SystemException;
085    
086            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
088                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
089                    throws com.liferay.portal.kernel.exception.SystemException;
090    
091            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
092            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
093                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
094    
095            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
096            public boolean hasUserRole(long userId, long companyId,
097                    java.lang.String name, boolean inherited)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException;
100    
101            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102            public boolean hasUserRoles(long userId, long companyId,
103                    java.lang.String[] names, boolean inherited)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException;
106    
107            public void unsetUserRoles(long userId, long[] roleIds)
108                    throws com.liferay.portal.kernel.exception.PortalException,
109                            com.liferay.portal.kernel.exception.SystemException;
110    
111            public com.liferay.portal.model.Role updateRole(long roleId,
112                    java.lang.String name,
113                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
114                    java.lang.String description, java.lang.String subtype)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException;
117    }