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