1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.PortalException;
18  import com.liferay.portal.SystemException;
19  import com.liferay.portal.kernel.annotation.Isolation;
20  import com.liferay.portal.kernel.annotation.Propagation;
21  import com.liferay.portal.kernel.annotation.Transactional;
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.SystemException;
53  
54      public com.liferay.portal.model.Role createRole(long roleId);
55  
56      public void deleteRole(long roleId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException;
59  
60      public void deleteRole(com.liferay.portal.model.Role role)
61          throws com.liferay.portal.SystemException;
62  
63      public java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.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.SystemException;
70  
71      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
72      public com.liferay.portal.model.Role getRole(long roleId)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.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.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public int getRolesCount() throws com.liferay.portal.SystemException;
82  
83      public com.liferay.portal.model.Role updateRole(
84          com.liferay.portal.model.Role role)
85          throws com.liferay.portal.SystemException;
86  
87      public com.liferay.portal.model.Role updateRole(
88          com.liferay.portal.model.Role role, boolean merge)
89          throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portal.model.Role addRole(long userId, long companyId,
92          java.lang.String name, java.lang.String description, int type)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException;
95  
96      public com.liferay.portal.model.Role addRole(long userId, long companyId,
97          java.lang.String name, java.lang.String description, int type,
98          java.lang.String className, long classPK)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException;
101 
102     public void addUserRoles(long userId, long[] roleIds)
103         throws com.liferay.portal.SystemException;
104 
105     public void checkSystemRoles(long companyId)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException;
108 
109     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110     public com.liferay.portal.model.Role getGroupRole(long companyId,
111         long groupId)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
117         long groupId) throws com.liferay.portal.SystemException;
118 
119     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120     public java.util.Map<String, java.util.List<String>> getResourceRoles(
121         long companyId, java.lang.String name, int scope,
122         java.lang.String primKey) throws com.liferay.portal.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public com.liferay.portal.model.Role getRole(long companyId,
126         java.lang.String name)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException;
129 
130     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131     public java.util.List<com.liferay.portal.model.Role> getRoles(
132         long companyId) throws com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
136         long userId, long groupId) throws com.liferay.portal.SystemException;
137 
138     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
140         long userId, long groupId) throws com.liferay.portal.SystemException;
141 
142     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
144         long userId, long[] groupIds) throws com.liferay.portal.SystemException;
145 
146     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147     public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
148         long userId, java.util.List<com.liferay.portal.model.Group> groups)
149         throws com.liferay.portal.SystemException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public java.util.List<com.liferay.portal.model.Role> getUserRoles(
153         long userId) throws com.liferay.portal.SystemException;
154 
155     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156     public boolean hasUserRole(long userId, long roleId)
157         throws com.liferay.portal.SystemException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public boolean hasUserRole(long userId, long companyId,
161         java.lang.String name, boolean inherited)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException;
164 
165     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166     public boolean hasUserRoles(long userId, long companyId,
167         java.lang.String[] names, boolean inherited)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public java.util.List<com.liferay.portal.model.Role> search(
173         long companyId, java.lang.String name, java.lang.String description,
174         java.lang.Integer type, int start, int end,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public java.util.List<com.liferay.portal.model.Role> search(
180         long companyId, java.lang.String name, java.lang.String description,
181         java.lang.Integer type, java.util.LinkedHashMap<String, Object> params,
182         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public int searchCount(long companyId, java.lang.String name,
187         java.lang.String description, java.lang.Integer type)
188         throws com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public int searchCount(long companyId, java.lang.String name,
192         java.lang.String description, java.lang.Integer type,
193         java.util.LinkedHashMap<String, Object> params)
194         throws com.liferay.portal.SystemException;
195 
196     public void setUserRoles(long userId, long[] roleIds)
197         throws com.liferay.portal.SystemException;
198 
199     public void unsetUserRoles(long userId, long[] roleIds)
200         throws com.liferay.portal.SystemException;
201 
202     public com.liferay.portal.model.Role updateRole(long roleId,
203         java.lang.String name, java.lang.String description)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException;
206 }