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      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
72      public com.liferay.portal.model.Role getRole(long roleId)
73          throws com.liferay.portal.kernel.exception.PortalException,
74              com.liferay.portal.kernel.exception.SystemException;
75  
76      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
77      public java.util.List<com.liferay.portal.model.Role> getRoles(int start,
78          int end) throws com.liferay.portal.kernel.exception.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public int getRolesCount()
82          throws com.liferay.portal.kernel.exception.SystemException;
83  
84      public com.liferay.portal.model.Role updateRole(
85          com.liferay.portal.model.Role role)
86          throws com.liferay.portal.kernel.exception.SystemException;
87  
88      public com.liferay.portal.model.Role updateRole(
89          com.liferay.portal.model.Role role, boolean merge)
90          throws com.liferay.portal.kernel.exception.SystemException;
91  
92      public com.liferay.portal.model.Role addRole(long userId, long companyId,
93          java.lang.String name,
94          java.util.Map<java.util.Locale, String> titleMap,
95          java.lang.String description, int type)
96          throws com.liferay.portal.kernel.exception.PortalException,
97              com.liferay.portal.kernel.exception.SystemException;
98  
99      public com.liferay.portal.model.Role addRole(long userId, long companyId,
100         java.lang.String name,
101         java.util.Map<java.util.Locale, String> titleMap,
102         java.lang.String description, int type, java.lang.String className,
103         long classPK)
104         throws com.liferay.portal.kernel.exception.PortalException,
105             com.liferay.portal.kernel.exception.SystemException;
106 
107     public void addUserRoles(long userId, long[] roleIds)
108         throws com.liferay.portal.kernel.exception.PortalException,
109             com.liferay.portal.kernel.exception.SystemException;
110 
111     public void checkSystemRoles(long companyId)
112         throws com.liferay.portal.kernel.exception.PortalException,
113             com.liferay.portal.kernel.exception.SystemException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public com.liferay.portal.model.Role getGroupRole(long companyId,
117         long groupId)
118         throws com.liferay.portal.kernel.exception.PortalException,
119             com.liferay.portal.kernel.exception.SystemException;
120 
121     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122     public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
123         long groupId)
124         throws com.liferay.portal.kernel.exception.SystemException;
125 
126     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127     public java.util.Map<String, java.util.List<String>> getResourceRoles(
128         long companyId, java.lang.String name, int scope,
129         java.lang.String primKey)
130         throws com.liferay.portal.kernel.exception.SystemException;
131 
132     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133     public com.liferay.portal.model.Role getRole(long companyId,
134         java.lang.String name)
135         throws com.liferay.portal.kernel.exception.PortalException,
136             com.liferay.portal.kernel.exception.SystemException;
137 
138     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139     public java.util.List<com.liferay.portal.model.Role> getRoles(
140         long companyId)
141         throws com.liferay.portal.kernel.exception.SystemException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public java.util.List<com.liferay.portal.model.Role> getRoles(
145         long[] roleIds)
146         throws com.liferay.portal.kernel.exception.PortalException,
147             com.liferay.portal.kernel.exception.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
151         java.lang.String subtype)
152         throws com.liferay.portal.kernel.exception.SystemException;
153 
154     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155     public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
156         java.lang.String subtype)
157         throws com.liferay.portal.kernel.exception.SystemException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public int getSubtypeRolesCount(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> getUserGroupGroupRoles(
165         long userId, long groupId)
166         throws com.liferay.portal.kernel.exception.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
170         long userId, long groupId)
171         throws com.liferay.portal.kernel.exception.SystemException;
172 
173     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
175         long userId, long groupId)
176         throws com.liferay.portal.kernel.exception.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
180         long userId, long[] groupIds)
181         throws com.liferay.portal.kernel.exception.SystemException;
182 
183     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
185         long userId, java.util.List<com.liferay.portal.model.Group> groups)
186         throws com.liferay.portal.kernel.exception.SystemException;
187 
188     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189     public java.util.List<com.liferay.portal.model.Role> getUserRoles(
190         long userId) throws com.liferay.portal.kernel.exception.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public boolean hasUserRole(long userId, long roleId)
194         throws com.liferay.portal.kernel.exception.SystemException;
195 
196     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197     public boolean hasUserRole(long userId, long companyId,
198         java.lang.String name, boolean inherited)
199         throws com.liferay.portal.kernel.exception.PortalException,
200             com.liferay.portal.kernel.exception.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public boolean hasUserRoles(long userId, long companyId,
204         java.lang.String[] names, boolean inherited)
205         throws com.liferay.portal.kernel.exception.PortalException,
206             com.liferay.portal.kernel.exception.SystemException;
207 
208     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209     public java.util.List<com.liferay.portal.model.Role> search(
210         long companyId, java.lang.String name, java.lang.String description,
211         java.lang.Integer type, int start, int end,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.kernel.exception.SystemException;
214 
215     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216     public java.util.List<com.liferay.portal.model.Role> search(
217         long companyId, java.lang.String name, java.lang.String description,
218         java.lang.Integer type, java.util.LinkedHashMap<String, Object> params,
219         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.kernel.exception.SystemException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public int searchCount(long companyId, java.lang.String name,
224         java.lang.String description, java.lang.Integer type)
225         throws com.liferay.portal.kernel.exception.SystemException;
226 
227     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228     public int searchCount(long companyId, java.lang.String name,
229         java.lang.String description, java.lang.Integer type,
230         java.util.LinkedHashMap<String, Object> params)
231         throws com.liferay.portal.kernel.exception.SystemException;
232 
233     public void setUserRoles(long userId, long[] roleIds)
234         throws com.liferay.portal.kernel.exception.PortalException,
235             com.liferay.portal.kernel.exception.SystemException;
236 
237     public void unsetUserRoles(long userId, long[] roleIds)
238         throws com.liferay.portal.kernel.exception.PortalException,
239             com.liferay.portal.kernel.exception.SystemException;
240 
241     public com.liferay.portal.model.Role updateRole(long roleId,
242         java.lang.String name,
243         java.util.Map<java.util.Locale, String> titleMap,
244         java.lang.String description, java.lang.String subtype)
245         throws com.liferay.portal.kernel.exception.PortalException,
246             com.liferay.portal.kernel.exception.SystemException;
247 }