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