001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class ResourceLocalServiceUtil {
037
044 public static com.liferay.portal.model.Resource addResource(
045 com.liferay.portal.model.Resource resource)
046 throws com.liferay.portal.kernel.exception.SystemException {
047 return getService().addResource(resource);
048 }
049
050
056 public static com.liferay.portal.model.Resource createResource(
057 long resourceId) {
058 return getService().createResource(resourceId);
059 }
060
061
068 public static void deleteResource(long resourceId)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 getService().deleteResource(resourceId);
072 }
073
074
080 public static void deleteResource(
081 com.liferay.portal.model.Resource resource)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 getService().deleteResource(resource);
084 }
085
086
093 @SuppressWarnings("rawtypes")
094 public static java.util.List dynamicQuery(
095 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
096 throws com.liferay.portal.kernel.exception.SystemException {
097 return getService().dynamicQuery(dynamicQuery);
098 }
099
100
113 @SuppressWarnings("rawtypes")
114 public static java.util.List dynamicQuery(
115 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
116 int end) throws com.liferay.portal.kernel.exception.SystemException {
117 return getService().dynamicQuery(dynamicQuery, start, end);
118 }
119
120
134 @SuppressWarnings("rawtypes")
135 public static java.util.List dynamicQuery(
136 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
137 int end,
138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139 throws com.liferay.portal.kernel.exception.SystemException {
140 return getService()
141 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
142 }
143
144
151 public static long dynamicQueryCount(
152 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
153 throws com.liferay.portal.kernel.exception.SystemException {
154 return getService().dynamicQueryCount(dynamicQuery);
155 }
156
157
165 public static com.liferay.portal.model.Resource getResource(long resourceId)
166 throws com.liferay.portal.kernel.exception.PortalException,
167 com.liferay.portal.kernel.exception.SystemException {
168 return getService().getResource(resourceId);
169 }
170
171
183 public static java.util.List<com.liferay.portal.model.Resource> getResources(
184 int start, int end)
185 throws com.liferay.portal.kernel.exception.SystemException {
186 return getService().getResources(start, end);
187 }
188
189
195 public static int getResourcesCount()
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return getService().getResourcesCount();
198 }
199
200
207 public static com.liferay.portal.model.Resource updateResource(
208 com.liferay.portal.model.Resource resource)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getService().updateResource(resource);
211 }
212
213
221 public static com.liferay.portal.model.Resource updateResource(
222 com.liferay.portal.model.Resource resource, boolean merge)
223 throws com.liferay.portal.kernel.exception.SystemException {
224 return getService().updateResource(resource, merge);
225 }
226
227 public static void addModelResources(long companyId, long groupId,
228 long userId, java.lang.String name, long primKey,
229 java.lang.String[] communityPermissions,
230 java.lang.String[] guestPermissions)
231 throws com.liferay.portal.kernel.exception.PortalException,
232 com.liferay.portal.kernel.exception.SystemException {
233 getService()
234 .addModelResources(companyId, groupId, userId, name, primKey,
235 communityPermissions, guestPermissions);
236 }
237
238 public static void addModelResources(long companyId, long groupId,
239 long userId, java.lang.String name, java.lang.String primKey,
240 java.lang.String[] communityPermissions,
241 java.lang.String[] guestPermissions)
242 throws com.liferay.portal.kernel.exception.PortalException,
243 com.liferay.portal.kernel.exception.SystemException {
244 getService()
245 .addModelResources(companyId, groupId, userId, name, primKey,
246 communityPermissions, guestPermissions);
247 }
248
249 public static com.liferay.portal.model.Resource addResource(
250 long companyId, java.lang.String name, int scope,
251 java.lang.String primKey)
252 throws com.liferay.portal.kernel.exception.SystemException {
253 return getService().addResource(companyId, name, scope, primKey);
254 }
255
256 public static void addResources(long companyId, long groupId,
257 java.lang.String name, boolean portletActions)
258 throws com.liferay.portal.kernel.exception.PortalException,
259 com.liferay.portal.kernel.exception.SystemException {
260 getService().addResources(companyId, groupId, name, portletActions);
261 }
262
263 public static void addResources(long companyId, long groupId, long userId,
264 java.lang.String name, long primKey, boolean portletActions,
265 boolean addCommunityPermissions, boolean addGuestPermissions)
266 throws com.liferay.portal.kernel.exception.PortalException,
267 com.liferay.portal.kernel.exception.SystemException {
268 getService()
269 .addResources(companyId, groupId, userId, name, primKey,
270 portletActions, addCommunityPermissions, addGuestPermissions);
271 }
272
273 public static void addResources(long companyId, long groupId, long userId,
274 java.lang.String name, java.lang.String primKey,
275 boolean portletActions, boolean addCommunityPermissions,
276 boolean addGuestPermissions)
277 throws com.liferay.portal.kernel.exception.PortalException,
278 com.liferay.portal.kernel.exception.SystemException {
279 getService()
280 .addResources(companyId, groupId, userId, name, primKey,
281 portletActions, addCommunityPermissions, addGuestPermissions);
282 }
283
284 public static void deleteResource(long companyId, java.lang.String name,
285 int scope, long primKey)
286 throws com.liferay.portal.kernel.exception.PortalException,
287 com.liferay.portal.kernel.exception.SystemException {
288 getService().deleteResource(companyId, name, scope, primKey);
289 }
290
291 public static void deleteResource(long companyId, java.lang.String name,
292 int scope, java.lang.String primKey)
293 throws com.liferay.portal.kernel.exception.PortalException,
294 com.liferay.portal.kernel.exception.SystemException {
295 getService().deleteResource(companyId, name, scope, primKey);
296 }
297
298 public static void deleteResources(java.lang.String name)
299 throws com.liferay.portal.kernel.exception.SystemException {
300 getService().deleteResources(name);
301 }
302
303 public static long getLatestResourceId()
304 throws com.liferay.portal.kernel.exception.SystemException {
305 return getService().getLatestResourceId();
306 }
307
308 public static com.liferay.portal.model.Resource getResource(
309 long companyId, java.lang.String name, int scope,
310 java.lang.String primKey)
311 throws com.liferay.portal.kernel.exception.PortalException,
312 com.liferay.portal.kernel.exception.SystemException {
313 return getService().getResource(companyId, name, scope, primKey);
314 }
315
316 public static java.util.List<com.liferay.portal.model.Resource> getResources()
317 throws com.liferay.portal.kernel.exception.SystemException {
318 return getService().getResources();
319 }
320
321 public static void updateResources(long companyId, java.lang.String name,
322 int scope, java.lang.String primKey, java.lang.String newPrimKey)
323 throws com.liferay.portal.kernel.exception.PortalException,
324 com.liferay.portal.kernel.exception.SystemException {
325 getService().updateResources(companyId, name, scope, primKey, newPrimKey);
326 }
327
328 public static void updateResources(long companyId, long groupId,
329 java.lang.String name, long primKey,
330 java.lang.String[] communityPermissions,
331 java.lang.String[] guestPermissions)
332 throws com.liferay.portal.kernel.exception.PortalException,
333 com.liferay.portal.kernel.exception.SystemException {
334 getService()
335 .updateResources(companyId, groupId, name, primKey,
336 communityPermissions, guestPermissions);
337 }
338
339 public static void updateResources(long companyId, long groupId,
340 java.lang.String name, java.lang.String primKey,
341 java.lang.String[] communityPermissions,
342 java.lang.String[] guestPermissions)
343 throws com.liferay.portal.kernel.exception.PortalException,
344 com.liferay.portal.kernel.exception.SystemException {
345 getService()
346 .updateResources(companyId, groupId, name, primKey,
347 communityPermissions, guestPermissions);
348 }
349
350 public static ResourceLocalService getService() {
351 if (_service == null) {
352 _service = (ResourceLocalService)PortalBeanLocatorUtil.locate(ResourceLocalService.class.getName());
353 }
354
355 return _service;
356 }
357
358 public void setService(ResourceLocalService service) {
359 _service = service;
360 }
361
362 private static ResourceLocalService _service;
363 }