001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the resource block local service. This utility wraps {@link com.liferay.portal.service.impl.ResourceBlockLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * 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.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see ResourceBlockLocalService
030     * @see com.liferay.portal.service.base.ResourceBlockLocalServiceBaseImpl
031     * @see com.liferay.portal.service.impl.ResourceBlockLocalServiceImpl
032     * @generated
033     */
034    public class ResourceBlockLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceBlockLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the resource block to the database. Also notifies the appropriate model listeners.
043            *
044            * @param resourceBlock the resource block
045            * @return the resource block that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portal.model.ResourceBlock addResourceBlock(
049                    com.liferay.portal.model.ResourceBlock resourceBlock)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService().addResourceBlock(resourceBlock);
052            }
053    
054            /**
055            * Creates a new resource block with the primary key. Does not add the resource block to the database.
056            *
057            * @param resourceBlockId the primary key for the new resource block
058            * @return the new resource block
059            */
060            public static com.liferay.portal.model.ResourceBlock createResourceBlock(
061                    long resourceBlockId) {
062                    return getService().createResourceBlock(resourceBlockId);
063            }
064    
065            /**
066            * Deletes the resource block with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param resourceBlockId the primary key of the resource block
069            * @throws PortalException if a resource block with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static void deleteResourceBlock(long resourceBlockId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    getService().deleteResourceBlock(resourceBlockId);
076            }
077    
078            /**
079            * Deletes the resource block from the database. Also notifies the appropriate model listeners.
080            *
081            * @param resourceBlock the resource block
082            * @throws SystemException if a system exception occurred
083            */
084            public static void deleteResourceBlock(
085                    com.liferay.portal.model.ResourceBlock resourceBlock)
086                    throws com.liferay.portal.kernel.exception.SystemException {
087                    getService().deleteResourceBlock(resourceBlock);
088            }
089    
090            /**
091            * Performs a dynamic query on the database and returns the matching rows.
092            *
093            * @param dynamicQuery the dynamic query
094            * @return the matching rows
095            * @throws SystemException if a system exception occurred
096            */
097            @SuppressWarnings("rawtypes")
098            public static java.util.List dynamicQuery(
099                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().dynamicQuery(dynamicQuery);
102            }
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public static java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().dynamicQuery(dynamicQuery, start, end);
122            }
123    
124            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
138            @SuppressWarnings("rawtypes")
139            public static java.util.List dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getService()
145                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146            }
147    
148            /**
149            * Returns the number of rows that match the dynamic query.
150            *
151            * @param dynamicQuery the dynamic query
152            * @return the number of rows that match the dynamic query
153            * @throws SystemException if a system exception occurred
154            */
155            public static long dynamicQueryCount(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getService().dynamicQueryCount(dynamicQuery);
159            }
160    
161            /**
162            * Returns the resource block with the primary key.
163            *
164            * @param resourceBlockId the primary key of the resource block
165            * @return the resource block
166            * @throws PortalException if a resource block with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public static com.liferay.portal.model.ResourceBlock getResourceBlock(
170                    long resourceBlockId)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getService().getResourceBlock(resourceBlockId);
174            }
175    
176            public static com.liferay.portal.model.PersistedModel getPersistedModel(
177                    java.io.Serializable primaryKeyObj)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getService().getPersistedModel(primaryKeyObj);
181            }
182    
183            /**
184            * Returns a range of all the resource blocks.
185            *
186            * <p>
187            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
188            * </p>
189            *
190            * @param start the lower bound of the range of resource blocks
191            * @param end the upper bound of the range of resource blocks (not inclusive)
192            * @return the range of resource blocks
193            * @throws SystemException if a system exception occurred
194            */
195            public static java.util.List<com.liferay.portal.model.ResourceBlock> getResourceBlocks(
196                    int start, int end)
197                    throws com.liferay.portal.kernel.exception.SystemException {
198                    return getService().getResourceBlocks(start, end);
199            }
200    
201            /**
202            * Returns the number of resource blocks.
203            *
204            * @return the number of resource blocks
205            * @throws SystemException if a system exception occurred
206            */
207            public static int getResourceBlocksCount()
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getService().getResourceBlocksCount();
210            }
211    
212            /**
213            * Updates the resource block in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
214            *
215            * @param resourceBlock the resource block
216            * @return the resource block that was updated
217            * @throws SystemException if a system exception occurred
218            */
219            public static com.liferay.portal.model.ResourceBlock updateResourceBlock(
220                    com.liferay.portal.model.ResourceBlock resourceBlock)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getService().updateResourceBlock(resourceBlock);
223            }
224    
225            /**
226            * Updates the resource block in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
227            *
228            * @param resourceBlock the resource block
229            * @param merge whether to merge the resource block with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
230            * @return the resource block that was updated
231            * @throws SystemException if a system exception occurred
232            */
233            public static com.liferay.portal.model.ResourceBlock updateResourceBlock(
234                    com.liferay.portal.model.ResourceBlock resourceBlock, boolean merge)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    return getService().updateResourceBlock(resourceBlock, merge);
237            }
238    
239            /**
240            * Returns the Spring bean ID for this bean.
241            *
242            * @return the Spring bean ID for this bean
243            */
244            public static java.lang.String getBeanIdentifier() {
245                    return getService().getBeanIdentifier();
246            }
247    
248            /**
249            * Sets the Spring bean ID for this bean.
250            *
251            * @param beanIdentifier the Spring bean ID for this bean
252            */
253            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
254                    getService().setBeanIdentifier(beanIdentifier);
255            }
256    
257            public static void addCompanyScopePermission(long companyId,
258                    java.lang.String name, long roleId, java.lang.String actionId)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    getService().addCompanyScopePermission(companyId, name, roleId, actionId);
262            }
263    
264            public static void addCompanyScopePermissions(long companyId,
265                    java.lang.String name, long roleId, long actionIdsLong)
266                    throws com.liferay.portal.kernel.exception.SystemException {
267                    getService()
268                            .addCompanyScopePermissions(companyId, name, roleId, actionIdsLong);
269            }
270    
271            public static void addGroupScopePermission(long companyId, long groupId,
272                    java.lang.String name, long roleId, java.lang.String actionId)
273                    throws com.liferay.portal.kernel.exception.PortalException,
274                            com.liferay.portal.kernel.exception.SystemException {
275                    getService()
276                            .addGroupScopePermission(companyId, groupId, name, roleId, actionId);
277            }
278    
279            public static void addGroupScopePermissions(long companyId, long groupId,
280                    java.lang.String name, long roleId, long actionIdsLong)
281                    throws com.liferay.portal.kernel.exception.SystemException {
282                    getService()
283                            .addGroupScopePermissions(companyId, groupId, name, roleId,
284                            actionIdsLong);
285            }
286    
287            public static void addIndividualScopePermission(long companyId,
288                    long groupId, java.lang.String name, long primKey, long roleId,
289                    java.lang.String actionId)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    getService()
293                            .addIndividualScopePermission(companyId, groupId, name, primKey,
294                            roleId, actionId);
295            }
296    
297            public static void addIndividualScopePermission(long companyId,
298                    long groupId, java.lang.String name,
299                    com.liferay.portal.model.PermissionedModel permissionedModel,
300                    long roleId, java.lang.String actionId)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    getService()
304                            .addIndividualScopePermission(companyId, groupId, name,
305                            permissionedModel, roleId, actionId);
306            }
307    
308            public static void addIndividualScopePermissions(long companyId,
309                    long groupId, java.lang.String name, long primKey, long roleId,
310                    long actionIdsLong)
311                    throws com.liferay.portal.kernel.exception.PortalException,
312                            com.liferay.portal.kernel.exception.SystemException {
313                    getService()
314                            .addIndividualScopePermissions(companyId, groupId, name, primKey,
315                            roleId, actionIdsLong);
316            }
317    
318            public static void addIndividualScopePermissions(long companyId,
319                    long groupId, java.lang.String name,
320                    com.liferay.portal.model.PermissionedModel permissionedModel,
321                    long roleId, long actionIdsLong)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    getService()
324                            .addIndividualScopePermissions(companyId, groupId, name,
325                            permissionedModel, roleId, actionIdsLong);
326            }
327    
328            /**
329            * Adds a resource block if necessary and associates the resource block
330            * permissions with it. The resource block will have an initial reference
331            * count of one.
332            *
333            * @param companyId the primary key of the resource block's company
334            * @param groupId the primary key of the resource block's group
335            * @return the new resource block
336            * @throws SystemException if a system exception occurred
337            */
338            public static com.liferay.portal.model.ResourceBlock addResourceBlock(
339                    long companyId, long groupId, java.lang.String name,
340                    java.lang.String permissionsHash,
341                    com.liferay.portal.model.ResourceBlockPermissionsContainer resourceBlockPermissionsContainer)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getService()
344                                       .addResourceBlock(companyId, groupId, name, permissionsHash,
345                            resourceBlockPermissionsContainer);
346            }
347    
348            public static long getActionId(java.lang.String name,
349                    java.lang.String actionId)
350                    throws com.liferay.portal.kernel.exception.PortalException {
351                    return getService().getActionId(name, actionId);
352            }
353    
354            public static long getActionIds(java.lang.String name,
355                    java.util.List<java.lang.String> actionIds)
356                    throws com.liferay.portal.kernel.exception.PortalException {
357                    return getService().getActionIds(name, actionIds);
358            }
359    
360            public static java.util.List<java.lang.String> getActionIds(
361                    java.lang.String name, long actionIdsLong)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getService().getActionIds(name, actionIdsLong);
364            }
365    
366            public static java.util.List<java.lang.String> getCompanyScopePermissions(
367                    com.liferay.portal.model.ResourceBlock resourceBlock, long roleId)
368                    throws com.liferay.portal.kernel.exception.SystemException {
369                    return getService().getCompanyScopePermissions(resourceBlock, roleId);
370            }
371    
372            public static java.util.List<java.lang.String> getGroupScopePermissions(
373                    com.liferay.portal.model.ResourceBlock resourceBlock, long roleId)
374                    throws com.liferay.portal.kernel.exception.SystemException {
375                    return getService().getGroupScopePermissions(resourceBlock, roleId);
376            }
377    
378            public static com.liferay.portal.model.PermissionedModel getPermissionedModel(
379                    java.lang.String name, long primKey)
380                    throws com.liferay.portal.kernel.exception.PortalException,
381                            com.liferay.portal.kernel.exception.SystemException {
382                    return getService().getPermissionedModel(name, primKey);
383            }
384    
385            public static java.util.List<java.lang.String> getPermissions(
386                    com.liferay.portal.model.ResourceBlock resourceBlock, long roleId)
387                    throws com.liferay.portal.kernel.exception.SystemException {
388                    return getService().getPermissions(resourceBlock, roleId);
389            }
390    
391            /**
392            * Returns the permissions hash of the resource permissions. The permissions
393            * hash is a representation of all the roles with access to the resource
394            * along with the actions they can perform.
395            *
396            * @param resourceBlockPermissionsContainer the resource block permissions
397            * @return the permissions hash of the resource permissions
398            */
399            public static java.lang.String getPermissionsHash(
400                    com.liferay.portal.model.ResourceBlockPermissionsContainer resourceBlockPermissionsContainer) {
401                    return getService().getPermissionsHash(resourceBlockPermissionsContainer);
402            }
403    
404            public static com.liferay.portal.model.ResourceBlock getResourceBlock(
405                    java.lang.String name, long primKey)
406                    throws com.liferay.portal.kernel.exception.PortalException,
407                            com.liferay.portal.kernel.exception.SystemException {
408                    return getService().getResourceBlock(name, primKey);
409            }
410    
411            public static java.util.List<java.lang.Long> getResourceBlockIds(
412                    com.liferay.portal.security.permission.ResourceBlockIdsBag resourceBlockIdsBag,
413                    java.lang.String name, java.lang.String actionId)
414                    throws com.liferay.portal.kernel.exception.PortalException {
415                    return getService()
416                                       .getResourceBlockIds(resourceBlockIdsBag, name, actionId);
417            }
418    
419            public static com.liferay.portal.security.permission.ResourceBlockIdsBag getResourceBlockIdsBag(
420                    long companyId, long groupId, java.lang.String name, long[] roleIds)
421                    throws com.liferay.portal.kernel.exception.SystemException {
422                    return getService()
423                                       .getResourceBlockIdsBag(companyId, groupId, name, roleIds);
424            }
425    
426            public static boolean hasPermission(java.lang.String name, long primKey,
427                    java.lang.String actionId,
428                    com.liferay.portal.security.permission.ResourceBlockIdsBag resourceBlockIdsBag)
429                    throws com.liferay.portal.kernel.exception.PortalException,
430                            com.liferay.portal.kernel.exception.SystemException {
431                    return getService()
432                                       .hasPermission(name, primKey, actionId, resourceBlockIdsBag);
433            }
434    
435            public static boolean hasPermission(java.lang.String name,
436                    com.liferay.portal.model.PermissionedModel permissionedModel,
437                    java.lang.String actionId,
438                    com.liferay.portal.security.permission.ResourceBlockIdsBag resourceBlockIdsBag)
439                    throws com.liferay.portal.kernel.exception.PortalException {
440                    return getService()
441                                       .hasPermission(name, permissionedModel, actionId,
442                            resourceBlockIdsBag);
443            }
444    
445            public static boolean isSupported(java.lang.String name) {
446                    return getService().isSupported(name);
447            }
448    
449            public static void releasePermissionedModelResourceBlock(
450                    com.liferay.portal.model.PermissionedModel permissionedModel)
451                    throws com.liferay.portal.kernel.exception.PortalException,
452                            com.liferay.portal.kernel.exception.SystemException {
453                    getService().releasePermissionedModelResourceBlock(permissionedModel);
454            }
455    
456            public static void releasePermissionedModelResourceBlock(
457                    java.lang.String name, long primKey)
458                    throws com.liferay.portal.kernel.exception.PortalException,
459                            com.liferay.portal.kernel.exception.SystemException {
460                    getService().releasePermissionedModelResourceBlock(name, primKey);
461            }
462    
463            /**
464            * Decrements the reference count of the resource block and updates it in
465            * the database or deletes the resource block if the reference count reaches
466            * zero.
467            *
468            * @param resourceBlockId the primary key of the resource block
469            * @throws SystemException if a system exception occurred
470            */
471            public static void releaseResourceBlock(long resourceBlockId)
472                    throws com.liferay.portal.kernel.exception.PortalException,
473                            com.liferay.portal.kernel.exception.SystemException {
474                    getService().releaseResourceBlock(resourceBlockId);
475            }
476    
477            /**
478            * Decrements the reference count of the resource block and updates it in
479            * the database or deletes the resource block if the reference count reaches
480            * zero.
481            *
482            * @param resourceBlock the resource block
483            * @throws SystemException if a system exception occurred
484            */
485            public static void releaseResourceBlock(
486                    com.liferay.portal.model.ResourceBlock resourceBlock)
487                    throws com.liferay.portal.kernel.exception.SystemException {
488                    getService().releaseResourceBlock(resourceBlock);
489            }
490    
491            public static void removeAllGroupScopePermissions(long companyId,
492                    java.lang.String name, long roleId, long actionIdsLong)
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    getService()
495                            .removeAllGroupScopePermissions(companyId, name, roleId,
496                            actionIdsLong);
497            }
498    
499            public static void removeAllGroupScopePermissions(long companyId,
500                    java.lang.String name, long roleId, java.lang.String actionId)
501                    throws com.liferay.portal.kernel.exception.PortalException,
502                            com.liferay.portal.kernel.exception.SystemException {
503                    getService()
504                            .removeAllGroupScopePermissions(companyId, name, roleId, actionId);
505            }
506    
507            public static void removeCompanyScopePermission(long companyId,
508                    java.lang.String name, long roleId, java.lang.String actionId)
509                    throws com.liferay.portal.kernel.exception.PortalException,
510                            com.liferay.portal.kernel.exception.SystemException {
511                    getService()
512                            .removeCompanyScopePermission(companyId, name, roleId, actionId);
513            }
514    
515            public static void removeCompanyScopePermissions(long companyId,
516                    java.lang.String name, long roleId, long actionIdsLong)
517                    throws com.liferay.portal.kernel.exception.SystemException {
518                    getService()
519                            .removeCompanyScopePermissions(companyId, name, roleId,
520                            actionIdsLong);
521            }
522    
523            public static void removeGroupScopePermission(long companyId, long groupId,
524                    java.lang.String name, long roleId, java.lang.String actionId)
525                    throws com.liferay.portal.kernel.exception.PortalException,
526                            com.liferay.portal.kernel.exception.SystemException {
527                    getService()
528                            .removeGroupScopePermission(companyId, groupId, name, roleId,
529                            actionId);
530            }
531    
532            public static void removeGroupScopePermissions(long companyId,
533                    long groupId, java.lang.String name, long roleId, long actionIdsLong)
534                    throws com.liferay.portal.kernel.exception.SystemException {
535                    getService()
536                            .removeGroupScopePermissions(companyId, groupId, name, roleId,
537                            actionIdsLong);
538            }
539    
540            public static void removeIndividualScopePermission(long companyId,
541                    long groupId, java.lang.String name, long primKey, long roleId,
542                    java.lang.String actionId)
543                    throws com.liferay.portal.kernel.exception.PortalException,
544                            com.liferay.portal.kernel.exception.SystemException {
545                    getService()
546                            .removeIndividualScopePermission(companyId, groupId, name, primKey,
547                            roleId, actionId);
548            }
549    
550            public static void removeIndividualScopePermission(long companyId,
551                    long groupId, java.lang.String name,
552                    com.liferay.portal.model.PermissionedModel permissionedModel,
553                    long roleId, java.lang.String actionId)
554                    throws com.liferay.portal.kernel.exception.PortalException,
555                            com.liferay.portal.kernel.exception.SystemException {
556                    getService()
557                            .removeIndividualScopePermission(companyId, groupId, name,
558                            permissionedModel, roleId, actionId);
559            }
560    
561            public static void removeIndividualScopePermissions(long companyId,
562                    long groupId, java.lang.String name, long primKey, long roleId,
563                    long actionIdsLong)
564                    throws com.liferay.portal.kernel.exception.PortalException,
565                            com.liferay.portal.kernel.exception.SystemException {
566                    getService()
567                            .removeIndividualScopePermissions(companyId, groupId, name,
568                            primKey, roleId, actionIdsLong);
569            }
570    
571            public static void removeIndividualScopePermissions(long companyId,
572                    long groupId, java.lang.String name,
573                    com.liferay.portal.model.PermissionedModel permissionedModel,
574                    long roleId, long actionIdsLong)
575                    throws com.liferay.portal.kernel.exception.SystemException {
576                    getService()
577                            .removeIndividualScopePermissions(companyId, groupId, name,
578                            permissionedModel, roleId, actionIdsLong);
579            }
580    
581            /**
582            * Increments the reference count of the resource block and updates it in
583            * the database.
584            *
585            * @param resourceBlockId the primary key of the resource block
586            * @throws SystemException if a system exception occurred
587            */
588            public static void retainResourceBlock(long resourceBlockId)
589                    throws com.liferay.portal.kernel.exception.PortalException,
590                            com.liferay.portal.kernel.exception.SystemException {
591                    getService().retainResourceBlock(resourceBlockId);
592            }
593    
594            /**
595            * Increments the reference count of the resource block and updates it in
596            * the database.
597            *
598            * @param resourceBlock the resource block
599            * @throws SystemException if a system exception occurred
600            */
601            public static void retainResourceBlock(
602                    com.liferay.portal.model.ResourceBlock resourceBlock)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    getService().retainResourceBlock(resourceBlock);
605            }
606    
607            public static void setCompanyScopePermissions(long companyId,
608                    java.lang.String name, long roleId,
609                    java.util.List<java.lang.String> actionIds)
610                    throws com.liferay.portal.kernel.exception.PortalException,
611                            com.liferay.portal.kernel.exception.SystemException {
612                    getService()
613                            .setCompanyScopePermissions(companyId, name, roleId, actionIds);
614            }
615    
616            public static void setCompanyScopePermissions(long companyId,
617                    java.lang.String name, long roleId, long actionIdsLong)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    getService()
620                            .setCompanyScopePermissions(companyId, name, roleId, actionIdsLong);
621            }
622    
623            public static void setGroupScopePermissions(long companyId, long groupId,
624                    java.lang.String name, long roleId,
625                    java.util.List<java.lang.String> actionIds)
626                    throws com.liferay.portal.kernel.exception.PortalException,
627                            com.liferay.portal.kernel.exception.SystemException {
628                    getService()
629                            .setGroupScopePermissions(companyId, groupId, name, roleId,
630                            actionIds);
631            }
632    
633            public static void setGroupScopePermissions(long companyId, long groupId,
634                    java.lang.String name, long roleId, long actionIdsLong)
635                    throws com.liferay.portal.kernel.exception.SystemException {
636                    getService()
637                            .setGroupScopePermissions(companyId, groupId, name, roleId,
638                            actionIdsLong);
639            }
640    
641            public static void setIndividualScopePermissions(long companyId,
642                    long groupId, java.lang.String name, long primKey, long roleId,
643                    java.util.List<java.lang.String> actionIds)
644                    throws com.liferay.portal.kernel.exception.PortalException,
645                            com.liferay.portal.kernel.exception.SystemException {
646                    getService()
647                            .setIndividualScopePermissions(companyId, groupId, name, primKey,
648                            roleId, actionIds);
649            }
650    
651            public static void setIndividualScopePermissions(long companyId,
652                    long groupId, java.lang.String name, long primKey, long roleId,
653                    long actionIdsLong)
654                    throws com.liferay.portal.kernel.exception.PortalException,
655                            com.liferay.portal.kernel.exception.SystemException {
656                    getService()
657                            .setIndividualScopePermissions(companyId, groupId, name, primKey,
658                            roleId, actionIdsLong);
659            }
660    
661            public static void setIndividualScopePermissions(long companyId,
662                    long groupId, java.lang.String name, long primKey,
663                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
664                    throws com.liferay.portal.kernel.exception.PortalException,
665                            com.liferay.portal.kernel.exception.SystemException {
666                    getService()
667                            .setIndividualScopePermissions(companyId, groupId, name, primKey,
668                            roleIdsToActionIds);
669            }
670    
671            public static void setIndividualScopePermissions(long companyId,
672                    long groupId, java.lang.String name,
673                    com.liferay.portal.model.PermissionedModel permissionedModel,
674                    long roleId, java.util.List<java.lang.String> actionIds)
675                    throws com.liferay.portal.kernel.exception.PortalException,
676                            com.liferay.portal.kernel.exception.SystemException {
677                    getService()
678                            .setIndividualScopePermissions(companyId, groupId, name,
679                            permissionedModel, roleId, actionIds);
680            }
681    
682            public static void setIndividualScopePermissions(long companyId,
683                    long groupId, java.lang.String name,
684                    com.liferay.portal.model.PermissionedModel permissionedModel,
685                    long roleId, long actionIdsLong)
686                    throws com.liferay.portal.kernel.exception.SystemException {
687                    getService()
688                            .setIndividualScopePermissions(companyId, groupId, name,
689                            permissionedModel, roleId, actionIdsLong);
690            }
691    
692            public static void updateCompanyScopePermissions(long companyId,
693                    java.lang.String name, long roleId, long actionIdsLong, int operator)
694                    throws com.liferay.portal.kernel.exception.SystemException {
695                    getService()
696                            .updateCompanyScopePermissions(companyId, name, roleId,
697                            actionIdsLong, operator);
698            }
699    
700            public static void updateGroupScopePermissions(long companyId,
701                    long groupId, java.lang.String name, long roleId, long actionIdsLong,
702                    int operator)
703                    throws com.liferay.portal.kernel.exception.SystemException {
704                    getService()
705                            .updateGroupScopePermissions(companyId, groupId, name, roleId,
706                            actionIdsLong, operator);
707            }
708    
709            public static void updateIndividualScopePermissions(long companyId,
710                    long groupId, java.lang.String name,
711                    com.liferay.portal.model.PermissionedModel permissionedModel,
712                    long roleId, long actionIdsLong, int operator)
713                    throws com.liferay.portal.kernel.exception.SystemException {
714                    getService()
715                            .updateIndividualScopePermissions(companyId, groupId, name,
716                            permissionedModel, roleId, actionIdsLong, operator);
717            }
718    
719            public static com.liferay.portal.model.ResourceBlock updateResourceBlockId(
720                    long companyId, long groupId, java.lang.String name,
721                    com.liferay.portal.model.PermissionedModel permissionedModel,
722                    java.lang.String permissionsHash,
723                    com.liferay.portal.model.ResourceBlockPermissionsContainer resourceBlockPermissionsContainer)
724                    throws com.liferay.portal.kernel.exception.SystemException {
725                    return getService()
726                                       .updateResourceBlockId(companyId, groupId, name,
727                            permissionedModel, permissionsHash,
728                            resourceBlockPermissionsContainer);
729            }
730    
731            public static void verifyResourceBlockId(long companyId,
732                    java.lang.String name, long primKey)
733                    throws com.liferay.portal.kernel.exception.PortalException,
734                            com.liferay.portal.kernel.exception.SystemException {
735                    getService().verifyResourceBlockId(companyId, name, primKey);
736            }
737    
738            public static ResourceBlockLocalService getService() {
739                    if (_service == null) {
740                            _service = (ResourceBlockLocalService)PortalBeanLocatorUtil.locate(ResourceBlockLocalService.class.getName());
741    
742                            ReferenceRegistry.registerReference(ResourceBlockLocalServiceUtil.class,
743                                    "_service");
744                            MethodCache.remove(ResourceBlockLocalService.class);
745                    }
746    
747                    return _service;
748            }
749    
750            public void setService(ResourceBlockLocalService service) {
751                    MethodCache.remove(ResourceBlockLocalService.class);
752    
753                    _service = service;
754    
755                    ReferenceRegistry.registerReference(ResourceBlockLocalServiceUtil.class,
756                            "_service");
757                    MethodCache.remove(ResourceBlockLocalService.class);
758            }
759    
760            private static ResourceBlockLocalService _service;
761    }