1
19
20 package com.liferay.portal.service.http;
21
22 import com.liferay.portal.kernel.log.Log;
23 import com.liferay.portal.kernel.log.LogFactoryUtil;
24 import com.liferay.portal.service.PermissionServiceUtil;
25
26 import java.rmi.RemoteException;
27
28
79 public class PermissionServiceSoap {
80 public static void checkPermission(long groupId, java.lang.String name,
81 java.lang.String primKey) throws RemoteException {
82 try {
83 PermissionServiceUtil.checkPermission(groupId, name, primKey);
84 }
85 catch (Exception e) {
86 _log.error(e, e);
87
88 throw new RemoteException(e.getMessage());
89 }
90 }
91
92 public static boolean hasGroupPermission(long groupId,
93 java.lang.String actionId, long resourceId) throws RemoteException {
94 try {
95 boolean returnValue = PermissionServiceUtil.hasGroupPermission(groupId,
96 actionId, resourceId);
97
98 return returnValue;
99 }
100 catch (Exception e) {
101 _log.error(e, e);
102
103 throw new RemoteException(e.getMessage());
104 }
105 }
106
107 public static boolean hasUserPermission(long userId,
108 java.lang.String actionId, long resourceId) throws RemoteException {
109 try {
110 boolean returnValue = PermissionServiceUtil.hasUserPermission(userId,
111 actionId, resourceId);
112
113 return returnValue;
114 }
115 catch (Exception e) {
116 _log.error(e, e);
117
118 throw new RemoteException(e.getMessage());
119 }
120 }
121
122 public static boolean hasUserPermissions(long userId, long groupId,
123 java.lang.String actionId, long[] resourceIds,
124 com.liferay.portal.security.permission.PermissionCheckerBag permissionCheckerBag)
125 throws RemoteException {
126 try {
127 boolean returnValue = PermissionServiceUtil.hasUserPermissions(userId,
128 groupId, actionId, resourceIds, permissionCheckerBag);
129
130 return returnValue;
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static void setGroupPermissions(long groupId,
140 java.lang.String[] actionIds, long resourceId)
141 throws RemoteException {
142 try {
143 PermissionServiceUtil.setGroupPermissions(groupId, actionIds,
144 resourceId);
145 }
146 catch (Exception e) {
147 _log.error(e, e);
148
149 throw new RemoteException(e.getMessage());
150 }
151 }
152
153 public static void setGroupPermissions(java.lang.String className,
154 java.lang.String classPK, long groupId, java.lang.String[] actionIds,
155 long resourceId) throws RemoteException {
156 try {
157 PermissionServiceUtil.setGroupPermissions(className, classPK,
158 groupId, actionIds, resourceId);
159 }
160 catch (Exception e) {
161 _log.error(e, e);
162
163 throw new RemoteException(e.getMessage());
164 }
165 }
166
167 public static void setOrgGroupPermissions(long organizationId,
168 long groupId, java.lang.String[] actionIds, long resourceId)
169 throws RemoteException {
170 try {
171 PermissionServiceUtil.setOrgGroupPermissions(organizationId,
172 groupId, actionIds, resourceId);
173 }
174 catch (Exception e) {
175 _log.error(e, e);
176
177 throw new RemoteException(e.getMessage());
178 }
179 }
180
181 public static void setRolePermission(long roleId, long groupId,
182 java.lang.String name, int scope, java.lang.String primKey,
183 java.lang.String actionId) throws RemoteException {
184 try {
185 PermissionServiceUtil.setRolePermission(roleId, groupId, name,
186 scope, primKey, actionId);
187 }
188 catch (Exception e) {
189 _log.error(e, e);
190
191 throw new RemoteException(e.getMessage());
192 }
193 }
194
195 public static void setRolePermissions(long roleId, long groupId,
196 java.lang.String[] actionIds, long resourceId)
197 throws RemoteException {
198 try {
199 PermissionServiceUtil.setRolePermissions(roleId, groupId,
200 actionIds, resourceId);
201 }
202 catch (Exception e) {
203 _log.error(e, e);
204
205 throw new RemoteException(e.getMessage());
206 }
207 }
208
209 public static void setUserPermissions(long userId, long groupId,
210 java.lang.String[] actionIds, long resourceId)
211 throws RemoteException {
212 try {
213 PermissionServiceUtil.setUserPermissions(userId, groupId,
214 actionIds, resourceId);
215 }
216 catch (Exception e) {
217 _log.error(e, e);
218
219 throw new RemoteException(e.getMessage());
220 }
221 }
222
223 public static void unsetRolePermission(long roleId, long groupId,
224 long permissionId) throws RemoteException {
225 try {
226 PermissionServiceUtil.unsetRolePermission(roleId, groupId,
227 permissionId);
228 }
229 catch (Exception e) {
230 _log.error(e, e);
231
232 throw new RemoteException(e.getMessage());
233 }
234 }
235
236 public static void unsetRolePermission(long roleId, long groupId,
237 java.lang.String name, int scope, java.lang.String primKey,
238 java.lang.String actionId) throws RemoteException {
239 try {
240 PermissionServiceUtil.unsetRolePermission(roleId, groupId, name,
241 scope, primKey, actionId);
242 }
243 catch (Exception e) {
244 _log.error(e, e);
245
246 throw new RemoteException(e.getMessage());
247 }
248 }
249
250 public static void unsetRolePermissions(long roleId, long groupId,
251 java.lang.String name, int scope, java.lang.String actionId)
252 throws RemoteException {
253 try {
254 PermissionServiceUtil.unsetRolePermissions(roleId, groupId, name,
255 scope, actionId);
256 }
257 catch (Exception e) {
258 _log.error(e, e);
259
260 throw new RemoteException(e.getMessage());
261 }
262 }
263
264 public static void unsetUserPermissions(long userId, long groupId,
265 java.lang.String[] actionIds, long resourceId)
266 throws RemoteException {
267 try {
268 PermissionServiceUtil.unsetUserPermissions(userId, groupId,
269 actionIds, resourceId);
270 }
271 catch (Exception e) {
272 _log.error(e, e);
273
274 throw new RemoteException(e.getMessage());
275 }
276 }
277
278 private static Log _log = LogFactoryUtil.getLog(PermissionServiceSoap.class);
279 }