001    /**
002     * Copyright (c) 2000-2013 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for ResourcePermission. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see ResourcePermissionLocalServiceUtil
034     * @see com.liferay.portal.service.base.ResourcePermissionLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface ResourcePermissionLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link ResourcePermissionLocalServiceUtil} to access the resource permission local service. Add custom service methods to {@link com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048    
049            /**
050            * Adds the resource permission to the database. Also notifies the appropriate model listeners.
051            *
052            * @param resourcePermission the resource permission
053            * @return the resource permission that was added
054            * @throws SystemException if a system exception occurred
055            */
056            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
057            public com.liferay.portal.model.ResourcePermission addResourcePermission(
058                    com.liferay.portal.model.ResourcePermission resourcePermission)
059                    throws com.liferay.portal.kernel.exception.SystemException;
060    
061            /**
062            * Creates a new resource permission with the primary key. Does not add the resource permission to the database.
063            *
064            * @param resourcePermissionId the primary key for the new resource permission
065            * @return the new resource permission
066            */
067            public com.liferay.portal.model.ResourcePermission createResourcePermission(
068                    long resourcePermissionId);
069    
070            /**
071            * Deletes the resource permission with the primary key from the database. Also notifies the appropriate model listeners.
072            *
073            * @param resourcePermissionId the primary key of the resource permission
074            * @return the resource permission that was removed
075            * @throws PortalException if a resource permission with the primary key could not be found
076            * @throws SystemException if a system exception occurred
077            */
078            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
079            public com.liferay.portal.model.ResourcePermission deleteResourcePermission(
080                    long resourcePermissionId)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * Deletes the resource permission from the database. Also notifies the appropriate model listeners.
086            *
087            * @param resourcePermission the resource permission
088            * @return the resource permission that was removed
089            * @throws SystemException if a system exception occurred
090            */
091            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
092            public com.liferay.portal.model.ResourcePermission deleteResourcePermission(
093                    com.liferay.portal.model.ResourcePermission resourcePermission)
094                    throws com.liferay.portal.kernel.exception.SystemException;
095    
096            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
097    
098            /**
099            * Performs a dynamic query on the database and returns the matching rows.
100            *
101            * @param dynamicQuery the dynamic query
102            * @return the matching rows
103            * @throws SystemException if a system exception occurred
104            */
105            @SuppressWarnings("rawtypes")
106            public java.util.List dynamicQuery(
107                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
108                    throws com.liferay.portal.kernel.exception.SystemException;
109    
110            /**
111            * Performs a dynamic query on the database and returns a range of the matching rows.
112            *
113            * <p>
114            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ResourcePermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
115            * </p>
116            *
117            * @param dynamicQuery the dynamic query
118            * @param start the lower bound of the range of model instances
119            * @param end the upper bound of the range of model instances (not inclusive)
120            * @return the range of matching rows
121            * @throws SystemException if a system exception occurred
122            */
123            @SuppressWarnings("rawtypes")
124            public java.util.List dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126                    int end) throws com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
130            *
131            * <p>
132            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ResourcePermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
133            * </p>
134            *
135            * @param dynamicQuery the dynamic query
136            * @param start the lower bound of the range of model instances
137            * @param end the upper bound of the range of model instances (not inclusive)
138            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
139            * @return the ordered range of matching rows
140            * @throws SystemException if a system exception occurred
141            */
142            @SuppressWarnings("rawtypes")
143            public java.util.List dynamicQuery(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
145                    int end,
146                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147                    throws com.liferay.portal.kernel.exception.SystemException;
148    
149            /**
150            * Returns the number of rows that match the dynamic query.
151            *
152            * @param dynamicQuery the dynamic query
153            * @return the number of rows that match the dynamic query
154            * @throws SystemException if a system exception occurred
155            */
156            public long dynamicQueryCount(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158                    throws com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Returns the number of rows that match the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @param projection the projection to apply to the query
165            * @return the number of rows that match the dynamic query
166            * @throws SystemException if a system exception occurred
167            */
168            public long dynamicQueryCount(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
170                    com.liferay.portal.kernel.dao.orm.Projection projection)
171                    throws com.liferay.portal.kernel.exception.SystemException;
172    
173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174            public com.liferay.portal.model.ResourcePermission fetchResourcePermission(
175                    long resourcePermissionId)
176                    throws com.liferay.portal.kernel.exception.SystemException;
177    
178            /**
179            * Returns the resource permission with the primary key.
180            *
181            * @param resourcePermissionId the primary key of the resource permission
182            * @return the resource permission
183            * @throws PortalException if a resource permission with the primary key could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public com.liferay.portal.model.ResourcePermission getResourcePermission(
188                    long resourcePermissionId)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException;
191    
192            @Override
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public com.liferay.portal.model.PersistedModel getPersistedModel(
195                    java.io.Serializable primaryKeyObj)
196                    throws com.liferay.portal.kernel.exception.PortalException,
197                            com.liferay.portal.kernel.exception.SystemException;
198    
199            /**
200            * Returns a range of all the resource permissions.
201            *
202            * <p>
203            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ResourcePermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
204            * </p>
205            *
206            * @param start the lower bound of the range of resource permissions
207            * @param end the upper bound of the range of resource permissions (not inclusive)
208            * @return the range of resource permissions
209            * @throws SystemException if a system exception occurred
210            */
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
213                    int start, int end)
214                    throws com.liferay.portal.kernel.exception.SystemException;
215    
216            /**
217            * Returns the number of resource permissions.
218            *
219            * @return the number of resource permissions
220            * @throws SystemException if a system exception occurred
221            */
222            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223            public int getResourcePermissionsCount()
224                    throws com.liferay.portal.kernel.exception.SystemException;
225    
226            /**
227            * Updates the resource permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
228            *
229            * @param resourcePermission the resource permission
230            * @return the resource permission that was updated
231            * @throws SystemException if a system exception occurred
232            */
233            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
234            public com.liferay.portal.model.ResourcePermission updateResourcePermission(
235                    com.liferay.portal.model.ResourcePermission resourcePermission)
236                    throws com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * Returns the Spring bean ID for this bean.
240            *
241            * @return the Spring bean ID for this bean
242            */
243            public java.lang.String getBeanIdentifier();
244    
245            /**
246            * Sets the Spring bean ID for this bean.
247            *
248            * @param beanIdentifier the Spring bean ID for this bean
249            */
250            public void setBeanIdentifier(java.lang.String beanIdentifier);
251    
252            /**
253            * Grants the role permission at the scope to perform the action on
254            * resources of the type. Existing actions are retained.
255            *
256            * <p>
257            * This method cannot be used to grant individual scope permissions, but is
258            * only intended for adding permissions at the company, group, and
259            * group-template scopes. For example, this method could be used to grant a
260            * company scope permission to edit message board posts.
261            * </p>
262            *
263            * <p>
264            * If a company scope permission is granted to resources that the role
265            * already had group scope permissions to, the group scope permissions are
266            * deleted. Likewise, if a group scope permission is granted to resources
267            * that the role already had company scope permissions to, the company scope
268            * permissions are deleted. Be aware that this latter behavior can result in
269            * an overall reduction in permissions for the role.
270            * </p>
271            *
272            * <p>
273            * Depending on the scope, the value of <code>primKey</code> will have
274            * different meanings. For more information, see {@link
275            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
276            * </p>
277            *
278            * @param companyId the primary key of the company
279            * @param name the resource's name, which can be either a class name or a
280            portlet ID
281            * @param scope the scope. This method only supports company, group, and
282            group-template scope.
283            * @param primKey the primary key
284            * @param roleId the primary key of the role
285            * @param actionId the action ID
286            * @throws PortalException if scope was set to individual scope or if a role
287            with the primary key or a resource action with the name and
288            action ID could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public void addResourcePermission(long companyId, java.lang.String name,
292                    int scope, java.lang.String primKey, long roleId,
293                    java.lang.String actionId)
294                    throws com.liferay.portal.kernel.exception.PortalException,
295                            com.liferay.portal.kernel.exception.SystemException;
296    
297            /**
298            * Grants the role permissions at the scope to perform the actions on all
299            * resources of the type. Existing actions are retained.
300            *
301            * <p>
302            * This method should only be used to add default permissions to existing
303            * resources en masse during upgrades or while verifying permissions. For
304            * example, this method could be used to grant site members individual scope
305            * permissions to view all blog posts.
306            * </p>
307            *
308            * @param resourceName the resource's name, which can be either a class
309            name or a portlet ID
310            * @param roleName the role's name
311            * @param scope the scope
312            * @param resourceActionBitwiseValue the bitwise IDs of the actions
313            * @throws SystemException if a system exception occurred
314            */
315            public void addResourcePermissions(java.lang.String resourceName,
316                    java.lang.String roleName, int scope, long resourceActionBitwiseValue)
317                    throws com.liferay.portal.kernel.exception.SystemException;
318    
319            /**
320            * Deletes all resource permissions at the scope to resources of the type.
321            * This method should not be confused with any of the
322            * <code>removeResourcePermission</code> methods, as its purpose is very
323            * different. This method should only be used for deleting resource
324            * permissions that refer to a resource when that resource is deleted. For
325            * example this method could be used to delete all individual scope
326            * permissions to a blog post when it is deleted.
327            *
328            * <p>
329            * Depending on the scope, the value of <code>primKey</code> will have
330            * different meanings. For more information, see {@link
331            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
332            * </p>
333            *
334            * @param companyId the primary key of the company
335            * @param name the resource's name, which can be either a class name or a
336            portlet ID
337            * @param scope the scope
338            * @param primKey the primary key
339            * @throws PortalException if a portal exception occurred
340            * @throws SystemException if a system exception occurred
341            */
342            public void deleteResourcePermissions(long companyId,
343                    java.lang.String name, int scope, long primKey)
344                    throws com.liferay.portal.kernel.exception.PortalException,
345                            com.liferay.portal.kernel.exception.SystemException;
346    
347            /**
348            * Deletes all resource permissions at the scope to resources of the type.
349            * This method should not be confused with any of the
350            * <code>removeResourcePermission</code> methods, as its purpose is very
351            * different. This method should only be used for deleting resource
352            * permissions that refer to a resource when that resource is deleted. For
353            * example this method could be used to delete all individual scope
354            * permissions to a blog post when it is deleted.
355            *
356            * <p>
357            * Depending on the scope, the value of <code>primKey</code> will have
358            * different meanings. For more information, see {@link
359            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
360            * </p>
361            *
362            * @param companyId the primary key of the company
363            * @param name the resource's name, which can be either a class name or a
364            portlet ID
365            * @param scope the scope
366            * @param primKey the primary key
367            * @throws PortalException if a portal exception occurred
368            * @throws SystemException if a system exception occurred
369            */
370            public void deleteResourcePermissions(long companyId,
371                    java.lang.String name, int scope, java.lang.String primKey)
372                    throws com.liferay.portal.kernel.exception.PortalException,
373                            com.liferay.portal.kernel.exception.SystemException;
374    
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public com.liferay.portal.model.ResourcePermission fetchResourcePermission(
377                    long companyId, java.lang.String name, int scope,
378                    java.lang.String primKey, long roleId)
379                    throws com.liferay.portal.kernel.exception.SystemException;
380    
381            /**
382            * Returns the intersection of action IDs the role has permission at the
383            * scope to perform on resources of the type.
384            *
385            * @param companyId he primary key of the company
386            * @param name the resource's name, which can be either a class name or a
387            portlet ID
388            * @param scope the scope
389            * @param primKey the primary key
390            * @param roleId the primary key of the role
391            * @param actionIds the action IDs
392            * @return the intersection of action IDs the role has permission at the
393            scope to perform on resources of the type
394            * @throws PortalException if a resouce action could not be found for any
395            one of the actions on the resource
396            * @throws SystemException if a system exception occurred
397            */
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public java.util.List<java.lang.String> getAvailableResourcePermissionActionIds(
400                    long companyId, java.lang.String name, int scope,
401                    java.lang.String primKey, long roleId,
402                    java.util.Collection<java.lang.String> actionIds)
403                    throws com.liferay.portal.kernel.exception.PortalException,
404                            com.liferay.portal.kernel.exception.SystemException;
405    
406            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
407            public java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourcePermissionActionIds(
408                    long companyId, java.lang.String name, int scope,
409                    java.lang.String primKey, long[] roleIds,
410                    java.util.Collection<java.lang.String> actionIds)
411                    throws com.liferay.portal.kernel.exception.PortalException,
412                            com.liferay.portal.kernel.exception.SystemException;
413    
414            /**
415            * Returns the resource permission for the role at the scope to perform the
416            * actions on resources of the type.
417            *
418            * @param companyId the primary key of the company
419            * @param name the resource's name, which can be either a class name or a
420            portlet ID
421            * @param scope the scope
422            * @param primKey the primary key
423            * @param roleId the primary key of the role
424            * @return the resource permission for the role at the scope to perform the
425            actions on resources of the type
426            * @throws PortalException if no matching resources could be found
427            * @throws SystemException if a system exception occurred
428            */
429            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
430            public com.liferay.portal.model.ResourcePermission getResourcePermission(
431                    long companyId, java.lang.String name, int scope,
432                    java.lang.String primKey, long roleId)
433                    throws com.liferay.portal.kernel.exception.PortalException,
434                            com.liferay.portal.kernel.exception.SystemException;
435    
436            /**
437            * Returns all the resource permissions at the scope of the type.
438            *
439            * @param companyId the primary key of the company
440            * @param name the resource's name, which can be either a class name or a
441            portlet ID
442            * @param scope the scope
443            * @param primKey the primary key
444            * @return the resource permissions at the scope of the type
445            * @throws SystemException if a system exception occurred
446            */
447            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
448            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourcePermissions(
449                    long companyId, java.lang.String name, int scope,
450                    java.lang.String primKey)
451                    throws com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * Returns the number of resource permissions at the scope of the type.
455            *
456            * @param companyId the primary key of the company
457            * @param name the resource's name, which can be either a class name or a
458            portlet ID
459            * @param scope the scope
460            * @param primKey the primary key
461            * @return the number of resource permissions at the scope of the type
462            * @throws SystemException if a system exception occurred
463            */
464            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
465            public int getResourcePermissionsCount(long companyId,
466                    java.lang.String name, int scope, java.lang.String primKey)
467                    throws com.liferay.portal.kernel.exception.SystemException;
468    
469            /**
470            * Returns the resource permissions that apply to the resource.
471            *
472            * @param companyId the primary key of the resource's company
473            * @param groupId the primary key of the resource's group
474            * @param name the resource's name, which can be either a class name or a
475            portlet ID
476            * @param primKey the primary key of the resource
477            * @return the resource permissions associated with the resource
478            * @throws SystemException if a system exception occurred
479            */
480            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
481            public java.util.List<com.liferay.portal.model.ResourcePermission> getResourceResourcePermissions(
482                    long companyId, long groupId, java.lang.String name,
483                    java.lang.String primKey)
484                    throws com.liferay.portal.kernel.exception.SystemException;
485    
486            /**
487            * Returns all the resource permissions for the role.
488            *
489            * @param roleId the primary key of the role
490            * @return the resource permissions for the role
491            * @throws SystemException if a system exception occurred
492            */
493            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
494            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
495                    long roleId) throws com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * Returns a range of all the resource permissions for the role at the
499            * scopes.
500            *
501            * <p>
502            * Useful when paginating results. Returns a maximum of <code>end -
503            * start</code> instances. <code>start</code> and <code>end</code> are not
504            * primary keys, they are indexes in the result set. Thus, <code>0</code>
505            * refers to the first result in the set. Setting both <code>start</code>
506            * and <code>end</code> to {@link
507            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
508            * result set.
509            * </p>
510            *
511            * @param roleId the primary key of the role
512            * @param scopes the scopes
513            * @param start the lower bound of the range of results
514            * @param end the upper bound of the range of results (not inclusive)
515            * @return the range of resource permissions for the role at the scopes
516            * @throws SystemException if a system exception occurred
517            */
518            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
519            public java.util.List<com.liferay.portal.model.ResourcePermission> getRoleResourcePermissions(
520                    long roleId, int[] scopes, int start, int end)
521                    throws com.liferay.portal.kernel.exception.SystemException;
522    
523            /**
524            * Returns all the resource permissions where scope = any &#63;.
525            *
526            * <p>
527            * Useful when paginating results. Returns a maximum of <code>end -
528            * start</code> instances. <code>start</code> and <code>end</code> are not
529            * primary keys, they are indexes in the result set. Thus, <code>0</code>
530            * refers to the first result in the set. Setting both <code>start</code>
531            * and <code>end</code> to {@link
532            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
533            * result set.
534            * </p>
535            *
536            * @param scopes the scopes
537            * @return the resource permissions where scope = any &#63;
538            * @throws SystemException if a system exception occurred
539            */
540            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
541            public java.util.List<com.liferay.portal.model.ResourcePermission> getScopeResourcePermissions(
542                    int[] scopes)
543                    throws com.liferay.portal.kernel.exception.SystemException;
544    
545            /**
546            * Returns <code>true</code> if the resource permission grants permission to
547            * perform the resource action. Note that this method does not ensure that
548            * the resource permission refers to the same type of resource as the
549            * resource action.
550            *
551            * @param resourcePermission the resource permission
552            * @param resourceAction the resource action
553            * @return <code>true</code> if the resource permission grants permission to
554            perform the resource action
555            */
556            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
557            public boolean hasActionId(
558                    com.liferay.portal.model.ResourcePermission resourcePermission,
559                    com.liferay.portal.model.ResourceAction resourceAction);
560    
561            /**
562            * Returns <code>true</code> if the roles have permission at the scope to
563            * perform the action on the resources.
564            *
565            * <p>
566            * Depending on the scope, the value of <code>primKey</code> will have
567            * different meanings. For more information, see {@link
568            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
569            * </p>
570            *
571            * @param resources the resources
572            * @param roleIds the primary keys of the roles
573            * @param actionId the action ID
574            * @return <code>true</code> if any one of the roles has permission to
575            perform the action on any one of the resources;
576            <code>false</code> otherwise
577            * @throws PortalException if any one of the roles with the primary keys
578            could not be found or if a resource action with the name and
579            action ID could not be found
580            * @throws SystemException if a system exception occurred
581            */
582            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
583            public boolean hasResourcePermission(
584                    java.util.List<com.liferay.portal.model.Resource> resources,
585                    long[] roleIds, java.lang.String actionId)
586                    throws com.liferay.portal.kernel.exception.PortalException,
587                            com.liferay.portal.kernel.exception.SystemException;
588    
589            /**
590            * Returns <code>true</code> if the role has permission at the scope to
591            * perform the action on resources of the type.
592            *
593            * <p>
594            * Depending on the scope, the value of <code>primKey</code> will have
595            * different meanings. For more information, see {@link
596            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
597            * </p>
598            *
599            * @param companyId the primary key of the company
600            * @param name the resource's name, which can be either a class name or a
601            portlet ID
602            * @param scope the scope
603            * @param primKey the primary key
604            * @param roleId the primary key of the role
605            * @param actionId the action ID
606            * @return <code>true</code> if the role has permission to perform the
607            action on the resource; <code>false</code> otherwise
608            * @throws PortalException if a role with the primary key or a resource
609            action with the name and action ID could not be found
610            * @throws SystemException if a system exception occurred
611            */
612            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
613            public boolean hasResourcePermission(long companyId, java.lang.String name,
614                    int scope, java.lang.String primKey, long roleId,
615                    java.lang.String actionId)
616                    throws com.liferay.portal.kernel.exception.PortalException,
617                            com.liferay.portal.kernel.exception.SystemException;
618    
619            /**
620            * Returns <code>true</code> if the roles have permission at the scope to
621            * perform the action on resources of the type.
622            *
623            * <p>
624            * Depending on the scope, the value of <code>primKey</code> will have
625            * different meanings. For more information, see {@link
626            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
627            * </p>
628            *
629            * @param companyId the primary key of the company
630            * @param name the resource's name, which can be either a class name or a
631            portlet ID
632            * @param scope the scope
633            * @param primKey the primary key
634            * @param roleIds the primary keys of the roles
635            * @param actionId the action ID
636            * @return <code>true</code> if any one of the roles has permission to
637            perform the action on the resource; <code>false</code> otherwise
638            * @throws PortalException if any one of the roles with the primary keys
639            could not be found or if a resource action with the name and
640            action ID could not be found
641            * @throws SystemException if a system exception occurred
642            */
643            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
644            public boolean hasResourcePermission(long companyId, java.lang.String name,
645                    int scope, java.lang.String primKey, long[] roleIds,
646                    java.lang.String actionId)
647                    throws com.liferay.portal.kernel.exception.PortalException,
648                            com.liferay.portal.kernel.exception.SystemException;
649    
650            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
651            public boolean[] hasResourcePermissions(long companyId,
652                    java.lang.String name, int scope, java.lang.String primKey,
653                    long[] roleIds, java.lang.String actionId)
654                    throws com.liferay.portal.kernel.exception.PortalException,
655                            com.liferay.portal.kernel.exception.SystemException;
656    
657            /**
658            * Returns <code>true</code> if the role has permission at the scope to
659            * perform the action on the resource.
660            *
661            * <p>
662            * Depending on the scope, the value of <code>primKey</code> will have
663            * different meanings. For more information, see {@link
664            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
665            * </p>
666            *
667            * @param companyId the primary key of the company
668            * @param name the resource's name, which can be either a class name or a
669            portlet ID
670            * @param scope the scope
671            * @param roleId the primary key of the role
672            * @param actionId the action ID
673            * @return <code>true</code> if the role has permission to perform the
674            action on the resource; <code>false</code> otherwise
675            * @throws PortalException if a role with the primary key or a resource
676            action with the name and action ID could not be found
677            * @throws SystemException if a system exception occurred
678            */
679            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
680            public boolean hasScopeResourcePermission(long companyId,
681                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
682                    throws com.liferay.portal.kernel.exception.PortalException,
683                            com.liferay.portal.kernel.exception.SystemException;
684    
685            /**
686            * Reassigns all the resource permissions from the source role to the
687            * destination role, and deletes the source role.
688            *
689            * @param fromRoleId the primary key of the source role
690            * @param toRoleId the primary key of the destination role
691            * @throws PortalException if a role with the primary key could not be found
692            * @throws SystemException if a system exception occurred
693            */
694            public void mergePermissions(long fromRoleId, long toRoleId)
695                    throws com.liferay.portal.kernel.exception.PortalException,
696                            com.liferay.portal.kernel.exception.SystemException;
697    
698            /**
699            * Grants the role default permissions to all the resources of the type and
700            * at the scope stored in the resource permission, deletes the resource
701            * permission, and deletes the resource permission's role if it has no
702            * permissions remaining.
703            *
704            * @param resourcePermissionId the primary key of the resource permission
705            * @param toRoleId the primary key of the role
706            * @throws PortalException if a resource permission or role with the primary
707            key could not be found
708            * @throws SystemException if a system exception occurred
709            */
710            public void reassignPermissions(long resourcePermissionId, long toRoleId)
711                    throws com.liferay.portal.kernel.exception.PortalException,
712                            com.liferay.portal.kernel.exception.SystemException;
713    
714            /**
715            * Revokes permission at the scope from the role to perform the action on
716            * resources of the type. For example, this method could be used to revoke a
717            * group scope permission to edit blog posts.
718            *
719            * <p>
720            * Depending on the scope, the value of <code>primKey</code> will have
721            * different meanings. For more information, see {@link
722            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
723            * </p>
724            *
725            * @param companyId the primary key of the company
726            * @param name the resource's name, which can be either a class name or a
727            portlet ID
728            * @param scope the scope
729            * @param primKey the primary key
730            * @param roleId the primary key of the role
731            * @param actionId the action ID
732            * @throws PortalException if a role with the primary key or a resource
733            action with the name and action ID could not be found
734            * @throws SystemException if a system exception occurred
735            */
736            public void removeResourcePermission(long companyId, java.lang.String name,
737                    int scope, java.lang.String primKey, long roleId,
738                    java.lang.String actionId)
739                    throws com.liferay.portal.kernel.exception.PortalException,
740                            com.liferay.portal.kernel.exception.SystemException;
741    
742            /**
743            * Revokes all permissions at the scope from the role to perform the action
744            * on resources of the type. For example, this method could be used to
745            * revoke all individual scope permissions to edit blog posts from site
746            * members.
747            *
748            * @param companyId the primary key of the company
749            * @param name the resource's name, which can be either a class name or a
750            portlet ID
751            * @param scope the scope
752            * @param roleId the primary key of the role
753            * @param actionId the action ID
754            * @throws PortalException if a role with the primary key or a resource
755            action with the name and action ID could not be found
756            * @throws SystemException if a system exception occurred
757            */
758            public void removeResourcePermissions(long companyId,
759                    java.lang.String name, int scope, long roleId, java.lang.String actionId)
760                    throws com.liferay.portal.kernel.exception.PortalException,
761                            com.liferay.portal.kernel.exception.SystemException;
762    
763            /**
764            * Updates the role's permissions at the scope, setting the actions that can
765            * be performed on resources of the type, also setting the owner of any
766            * newly created resource permissions. Existing actions are replaced.
767            *
768            * <p>
769            * This method can be used to set permissions at any scope, but it is
770            * generally only used at the individual scope. For example, it could be
771            * used to set the guest permissions on a blog post.
772            * </p>
773            *
774            * <p>
775            * Depending on the scope, the value of <code>primKey</code> will have
776            * different meanings. For more information, see {@link
777            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
778            * </p>
779            *
780            * @param companyId the primary key of the company
781            * @param name the resource's name, which can be either a class name or a
782            portlet ID
783            * @param scope the scope
784            * @param primKey the primary key
785            * @param roleId the primary key of the role
786            * @param ownerId the primary key of the owner (generally the user that
787            created the resource)
788            * @param actionIds the action IDs of the actions
789            * @throws PortalException if a role with the primary key or a resource
790            action with the name and action ID could not be found
791            * @throws SystemException if a system exception occurred
792            */
793            public void setOwnerResourcePermissions(long companyId,
794                    java.lang.String name, int scope, java.lang.String primKey,
795                    long roleId, long ownerId, java.lang.String[] actionIds)
796                    throws com.liferay.portal.kernel.exception.PortalException,
797                            com.liferay.portal.kernel.exception.SystemException;
798    
799            /**
800            * Updates the role's permissions at the scope, setting the actions that can
801            * be performed on resources of the type. Existing actions are replaced.
802            *
803            * <p>
804            * This method can be used to set permissions at any scope, but it is
805            * generally only used at the individual scope. For example, it could be
806            * used to set the guest permissions on a blog post.
807            * </p>
808            *
809            * <p>
810            * Depending on the scope, the value of <code>primKey</code> will have
811            * different meanings. For more information, see {@link
812            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
813            * </p>
814            *
815            * @param companyId the primary key of the company
816            * @param name the resource's name, which can be either a class name or a
817            portlet ID
818            * @param scope the scope
819            * @param primKey the primary key
820            * @param roleId the primary key of the role
821            * @param actionIds the action IDs of the actions
822            * @throws PortalException if a role with the primary key or a resource
823            action with the name and action ID could not be found
824            * @throws SystemException if a system exception occurred
825            */
826            public void setResourcePermissions(long companyId, java.lang.String name,
827                    int scope, java.lang.String primKey, long roleId,
828                    java.lang.String[] actionIds)
829                    throws com.liferay.portal.kernel.exception.PortalException,
830                            com.liferay.portal.kernel.exception.SystemException;
831    
832            /**
833            * Updates the role's permissions at the scope, setting the actions that can
834            * be performed on resources of the type. Existing actions are replaced.
835            *
836            * <p>
837            * This method can be used to set permissions at any scope, but it is
838            * generally only used at the individual scope. For example, it could be
839            * used to set the guest permissions on a blog post.
840            * </p>
841            *
842            * <p>
843            * Depending on the scope, the value of <code>primKey</code> will have
844            * different meanings. For more information, see {@link
845            * com.liferay.portal.model.impl.ResourcePermissionImpl}.
846            * </p>
847            *
848            * @param companyId the primary key of the company
849            * @param name the resource's name, which can be either a class name or a
850            portlet ID
851            * @param scope the scope
852            * @param primKey the primary key
853            * @param roleIdsToActionIds a map of role IDs to action IDs of the actions
854            * @throws PortalException if a role with the primary key or a resource
855            action with the name and action ID could not be found
856            * @throws SystemException if a system exception occurred
857            */
858            public void setResourcePermissions(long companyId, java.lang.String name,
859                    int scope, java.lang.String primKey,
860                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
861                    throws com.liferay.portal.kernel.exception.PortalException,
862                            com.liferay.portal.kernel.exception.SystemException;
863    }