001    /**
002     * Copyright (c) 2000-present 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.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for ResourceBlockPermission. This utility wraps
024     * {@link com.liferay.portal.service.impl.ResourceBlockPermissionLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ResourceBlockPermissionLocalService
032     * @see com.liferay.portal.service.base.ResourceBlockPermissionLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ResourceBlockPermissionLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ResourceBlockPermissionLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceBlockPermissionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the resource block permission to the database. Also notifies the appropriate model listeners.
046            *
047            * @param resourceBlockPermission the resource block permission
048            * @return the resource block permission that was added
049            */
050            public static com.liferay.portal.model.ResourceBlockPermission addResourceBlockPermission(
051                    com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) {
052                    return getService().addResourceBlockPermission(resourceBlockPermission);
053            }
054    
055            public static void addResourceBlockPermissions(long resourceBlockId,
056                    com.liferay.portal.model.ResourceBlockPermissionsContainer resourceBlockPermissionsContainer) {
057                    getService()
058                            .addResourceBlockPermissions(resourceBlockId,
059                            resourceBlockPermissionsContainer);
060            }
061    
062            /**
063            * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database.
064            *
065            * @param resourceBlockPermissionId the primary key for the new resource block permission
066            * @return the new resource block permission
067            */
068            public static com.liferay.portal.model.ResourceBlockPermission createResourceBlockPermission(
069                    long resourceBlockPermissionId) {
070                    return getService()
071                                       .createResourceBlockPermission(resourceBlockPermissionId);
072            }
073    
074            /**
075            * @throws PortalException
076            */
077            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
078                    com.liferay.portal.model.PersistedModel persistedModel)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    return getService().deletePersistedModel(persistedModel);
081            }
082    
083            /**
084            * Deletes the resource block permission from the database. Also notifies the appropriate model listeners.
085            *
086            * @param resourceBlockPermission the resource block permission
087            * @return the resource block permission that was removed
088            */
089            public static com.liferay.portal.model.ResourceBlockPermission deleteResourceBlockPermission(
090                    com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) {
091                    return getService()
092                                       .deleteResourceBlockPermission(resourceBlockPermission);
093            }
094    
095            /**
096            * Deletes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners.
097            *
098            * @param resourceBlockPermissionId the primary key of the resource block permission
099            * @return the resource block permission that was removed
100            * @throws PortalException if a resource block permission with the primary key could not be found
101            */
102            public static com.liferay.portal.model.ResourceBlockPermission deleteResourceBlockPermission(
103                    long resourceBlockPermissionId)
104                    throws com.liferay.portal.kernel.exception.PortalException {
105                    return getService()
106                                       .deleteResourceBlockPermission(resourceBlockPermissionId);
107            }
108    
109            public static void deleteResourceBlockPermissions(long resourceBlockId) {
110                    getService().deleteResourceBlockPermissions(resourceBlockId);
111            }
112    
113            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
114                    return getService().dynamicQuery();
115            }
116    
117            /**
118            * Performs a dynamic query on the database and returns the matching rows.
119            *
120            * @param dynamicQuery the dynamic query
121            * @return the matching rows
122            */
123            public static <T> java.util.List<T> dynamicQuery(
124                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
125                    return getService().dynamicQuery(dynamicQuery);
126            }
127    
128            /**
129            * Performs a dynamic query on the database and returns a 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.ResourceBlockPermissionModelImpl}. 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            * @return the range of matching rows
139            */
140            public static <T> java.util.List<T> dynamicQuery(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
142                    int end) {
143                    return getService().dynamicQuery(dynamicQuery, start, end);
144            }
145    
146            /**
147            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
148            *
149            * <p>
150            * 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.ResourceBlockPermissionModelImpl}. 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.
151            * </p>
152            *
153            * @param dynamicQuery the dynamic query
154            * @param start the lower bound of the range of model instances
155            * @param end the upper bound of the range of model instances (not inclusive)
156            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
157            * @return the ordered range of matching rows
158            */
159            public static <T> java.util.List<T> dynamicQuery(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
161                    int end,
162                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
163                    return getService()
164                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
165            }
166    
167            /**
168            * Returns the number of rows matching the dynamic query.
169            *
170            * @param dynamicQuery the dynamic query
171            * @return the number of rows matching the dynamic query
172            */
173            public static long dynamicQueryCount(
174                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
175                    return getService().dynamicQueryCount(dynamicQuery);
176            }
177    
178            /**
179            * Returns the number of rows matching the dynamic query.
180            *
181            * @param dynamicQuery the dynamic query
182            * @param projection the projection to apply to the query
183            * @return the number of rows matching the dynamic query
184            */
185            public static long dynamicQueryCount(
186                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
187                    com.liferay.portal.kernel.dao.orm.Projection projection) {
188                    return getService().dynamicQueryCount(dynamicQuery, projection);
189            }
190    
191            public static com.liferay.portal.model.ResourceBlockPermission fetchResourceBlockPermission(
192                    long resourceBlockPermissionId) {
193                    return getService()
194                                       .fetchResourceBlockPermission(resourceBlockPermissionId);
195            }
196    
197            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
198                    return getService().getActionableDynamicQuery();
199            }
200    
201            public static java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourceBlockPermissionActionIds(
202                    java.lang.String name, long primKey,
203                    java.util.List<java.lang.String> actionIds)
204                    throws com.liferay.portal.kernel.exception.PortalException {
205                    return getService()
206                                       .getAvailableResourceBlockPermissionActionIds(name, primKey,
207                            actionIds);
208            }
209    
210            /**
211            * @deprecated As of 7.0.0, replaced by {@link
212            #getAvailableResourceBlockPermissionActionIds(String, long,
213            List)}
214            */
215            @Deprecated
216            public static java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourceBlockPermissionActionIds(
217                    long[] roleIds, java.lang.String name, long primKey,
218                    java.util.List<java.lang.String> actionIds)
219                    throws com.liferay.portal.kernel.exception.PortalException {
220                    return getService()
221                                       .getAvailableResourceBlockPermissionActionIds(roleIds, name,
222                            primKey, actionIds);
223            }
224    
225            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
226                    return getService().getIndexableActionableDynamicQuery();
227            }
228    
229            /**
230            * Returns the OSGi service identifier.
231            *
232            * @return the OSGi service identifier
233            */
234            public static java.lang.String getOSGiServiceIdentifier() {
235                    return getService().getOSGiServiceIdentifier();
236            }
237    
238            public static com.liferay.portal.model.PersistedModel getPersistedModel(
239                    java.io.Serializable primaryKeyObj)
240                    throws com.liferay.portal.kernel.exception.PortalException {
241                    return getService().getPersistedModel(primaryKeyObj);
242            }
243    
244            /**
245            * Returns the resource block permission with the primary key.
246            *
247            * @param resourceBlockPermissionId the primary key of the resource block permission
248            * @return the resource block permission
249            * @throws PortalException if a resource block permission with the primary key could not be found
250            */
251            public static com.liferay.portal.model.ResourceBlockPermission getResourceBlockPermission(
252                    long resourceBlockPermissionId)
253                    throws com.liferay.portal.kernel.exception.PortalException {
254                    return getService().getResourceBlockPermission(resourceBlockPermissionId);
255            }
256    
257            /**
258            * Returns a range of all the resource block permissions.
259            *
260            * <p>
261            * 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.ResourceBlockPermissionModelImpl}. 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.
262            * </p>
263            *
264            * @param start the lower bound of the range of resource block permissions
265            * @param end the upper bound of the range of resource block permissions (not inclusive)
266            * @return the range of resource block permissions
267            */
268            public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> getResourceBlockPermissions(
269                    int start, int end) {
270                    return getService().getResourceBlockPermissions(start, end);
271            }
272    
273            public static com.liferay.portal.model.ResourceBlockPermissionsContainer getResourceBlockPermissionsContainer(
274                    long resourceBlockId) {
275                    return getService().getResourceBlockPermissionsContainer(resourceBlockId);
276            }
277    
278            /**
279            * Returns the number of resource block permissions.
280            *
281            * @return the number of resource block permissions
282            */
283            public static int getResourceBlockPermissionsCount() {
284                    return getService().getResourceBlockPermissionsCount();
285            }
286    
287            public static int getResourceBlockPermissionsCount(long resourceBlockId,
288                    long roleId) {
289                    return getService()
290                                       .getResourceBlockPermissionsCount(resourceBlockId, roleId);
291            }
292    
293            public static void updateResourceBlockPermission(long resourceBlockId,
294                    long roleId, long actionIdsLong, int operator) {
295                    getService()
296                            .updateResourceBlockPermission(resourceBlockId, roleId,
297                            actionIdsLong, operator);
298            }
299    
300            /**
301            * Updates the resource block permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
302            *
303            * @param resourceBlockPermission the resource block permission
304            * @return the resource block permission that was updated
305            */
306            public static com.liferay.portal.model.ResourceBlockPermission updateResourceBlockPermission(
307                    com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) {
308                    return getService()
309                                       .updateResourceBlockPermission(resourceBlockPermission);
310            }
311    
312            public static ResourceBlockPermissionLocalService getService() {
313                    if (_service == null) {
314                            _service = (ResourceBlockPermissionLocalService)PortalBeanLocatorUtil.locate(ResourceBlockPermissionLocalService.class.getName());
315    
316                            ReferenceRegistry.registerReference(ResourceBlockPermissionLocalServiceUtil.class,
317                                    "_service");
318                    }
319    
320                    return _service;
321            }
322    
323            private static ResourceBlockPermissionLocalService _service;
324    }