1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.annotation.Isolation;
18  import com.liferay.portal.kernel.annotation.Propagation;
19  import com.liferay.portal.kernel.annotation.Transactional;
20  import com.liferay.portal.kernel.exception.PortalException;
21  import com.liferay.portal.kernel.exception.SystemException;
22  
23  /**
24   * <a href="RoleLocalService.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This interface defines the service. The default implementation is
33   * {@link
34   * com.liferay.portal.service.impl.RoleLocalServiceImpl}}.
35   * Modify methods in that class and rerun ServiceBuilder to populate this class
36   * and all other generated classes.
37   * </p>
38   *
39   * <p>
40   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       RoleLocalServiceUtil
45   * @generated
46   */
47  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
48      PortalException.class, SystemException.class})
49  public interface RoleLocalService {
50      public com.liferay.portal.model.Role addRole(
51          com.liferay.portal.model.Role role)
52          throws com.liferay.portal.kernel.exception.SystemException;
53  
54      public com.liferay.portal.model.Role createRole(long roleId);
55  
56      public void deleteRole(long roleId)
57          throws com.liferay.portal.kernel.exception.PortalException,
58              com.liferay.portal.kernel.exception.SystemException;
59  
60      public void deleteRole(com.liferay.portal.model.Role role)
61          throws com.liferay.portal.kernel.exception.SystemException;
62  
63      public java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException;
66  
67      public java.util.List<Object> dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69          int end) throws com.liferay.portal.kernel.exception.SystemException;
70  
71      public java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end,
74          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
75          throws com.liferay.portal.kernel.exception.SystemException;
76  
77      public int dynamicQueryCount(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
79          throws com.liferay.portal.kernel.exception.SystemException;
80  
81      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
82      public com.liferay.portal.model.Role getRole(long roleId)
83          throws com.liferay.portal.kernel.exception.PortalException,
84              com.liferay.portal.kernel.exception.SystemException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portal.model.Role> getRoles(int start,
88          int end) throws com.liferay.portal.kernel.exception.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public int getRolesCount()
92          throws com.liferay.portal.kernel.exception.SystemException;
93  
94      public com.liferay.portal.model.Role updateRole(
95          com.liferay.portal.model.Role role)
96          throws com.liferay.portal.kernel.exception.SystemException;
97  
98      public com.liferay.portal.model.Role updateRole(
99          com.liferay.portal.model.Role role, boolean merge)
100         throws com.liferay.portal.kernel.exception.SystemException;
101 
102     public com.liferay.portal.model.Role addRole(long userId, long companyId,
103         java.lang.String name,
104         java.util.Map<java.util.Locale, String> titleMap,
105         java.lang.String description, int type)
106         throws com.liferay.portal.kernel.exception.PortalException,
107             com.liferay.portal.kernel.exception.SystemException;
108 
109     public com.liferay.portal.model.Role addRole(long userId, long companyId,
110         java.lang.String name,
111         java.util.Map<java.util.Locale, String> titleMap,
112         java.lang.String description, int type, java.lang.String className,
113         long classPK)
114         throws com.liferay.portal.kernel.exception.PortalException,
115             com.liferay.portal.kernel.exception.SystemException;
116 
117     public void addUserRoles(long userId, long[] roleIds)
118         throws com.liferay.portal.kernel.exception.PortalException,
119             com.liferay.portal.kernel.exception.SystemException;
120 
121     public void checkSystemRoles(long companyId)
122         throws com.liferay.portal.kernel.exception.PortalException,
123             com.liferay.portal.kernel.exception.SystemException;
124 
125     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126     public com.liferay.portal.model.Role getDefaultGroupRole(long groupId)
127         throws com.liferay.portal.kernel.exception.PortalException,
128             com.liferay.portal.kernel.exception.SystemException;
129 
130     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131     public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
132         long groupId)
133         throws com.liferay.portal.kernel.exception.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public java.util.Map<String, java.util.List<String>> getResourceRoles(
137         long companyId, java.lang.String name, int scope,
138         java.lang.String primKey)
139         throws com.liferay.portal.kernel.exception.SystemException;
140 
141     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142     public com.liferay.portal.model.Role getRole(long companyId,
143         java.lang.String name)
144         throws com.liferay.portal.kernel.exception.PortalException,
145             com.liferay.portal.kernel.exception.SystemException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public java.util.List<com.liferay.portal.model.Role> getRoles(
149         long companyId)
150         throws com.liferay.portal.kernel.exception.SystemException;
151 
152     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153     public java.util.List<com.liferay.portal.model.Role> getRoles(
154         long[] roleIds)
155         throws com.liferay.portal.kernel.exception.PortalException,
156             com.liferay.portal.kernel.exception.SystemException;
157 
158     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159     public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
160         java.lang.String subtype)
161         throws com.liferay.portal.kernel.exception.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
165         java.lang.String subtype)
166         throws com.liferay.portal.kernel.exception.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public int getSubtypeRolesCount(java.lang.String subtype)
170         throws com.liferay.portal.kernel.exception.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
174         throws com.liferay.portal.kernel.exception.PortalException,
175             com.liferay.portal.kernel.exception.SystemException;
176 
177     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178     public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
179         long userId, long groupId)
180         throws com.liferay.portal.kernel.exception.SystemException;
181 
182     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183     public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
184         long userId, long groupId)
185         throws com.liferay.portal.kernel.exception.SystemException;
186 
187     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
189         long userId, long groupId)
190         throws com.liferay.portal.kernel.exception.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
194         long userId, long[] groupIds)
195         throws com.liferay.portal.kernel.exception.SystemException;
196 
197     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
199         long userId, java.util.List<com.liferay.portal.model.Group> groups)
200         throws com.liferay.portal.kernel.exception.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public java.util.List<com.liferay.portal.model.Role> getUserRoles(
204         long userId) throws com.liferay.portal.kernel.exception.SystemException;
205 
206     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207     public boolean hasUserRole(long userId, long roleId)
208         throws com.liferay.portal.kernel.exception.SystemException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public boolean hasUserRole(long userId, long companyId,
212         java.lang.String name, boolean inherited)
213         throws com.liferay.portal.kernel.exception.PortalException,
214             com.liferay.portal.kernel.exception.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public boolean hasUserRoles(long userId, long companyId,
218         java.lang.String[] names, boolean inherited)
219         throws com.liferay.portal.kernel.exception.PortalException,
220             com.liferay.portal.kernel.exception.SystemException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public java.util.List<com.liferay.portal.model.Role> search(
224         long companyId, java.lang.String name, java.lang.String description,
225         java.lang.Integer[] types, int start, int end,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.kernel.exception.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public java.util.List<com.liferay.portal.model.Role> search(
231         long companyId, java.lang.String name, java.lang.String description,
232         java.lang.Integer[] types,
233         java.util.LinkedHashMap<String, Object> params, int start, int end,
234         com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.kernel.exception.SystemException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public int searchCount(long companyId, java.lang.String name,
239         java.lang.String description, java.lang.Integer[] types)
240         throws com.liferay.portal.kernel.exception.SystemException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public int searchCount(long companyId, java.lang.String name,
244         java.lang.String description, java.lang.Integer[] types,
245         java.util.LinkedHashMap<String, Object> params)
246         throws com.liferay.portal.kernel.exception.SystemException;
247 
248     public void setUserRoles(long userId, long[] roleIds)
249         throws com.liferay.portal.kernel.exception.PortalException,
250             com.liferay.portal.kernel.exception.SystemException;
251 
252     public void unsetUserRoles(long userId, long[] roleIds)
253         throws com.liferay.portal.kernel.exception.PortalException,
254             com.liferay.portal.kernel.exception.SystemException;
255 
256     public com.liferay.portal.model.Role updateRole(long roleId,
257         java.lang.String name,
258         java.util.Map<java.util.Locale, String> titleMap,
259         java.lang.String description, java.lang.String subtype)
260         throws com.liferay.portal.kernel.exception.PortalException,
261             com.liferay.portal.kernel.exception.SystemException;
262 }