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.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for ResourceTypePermission. This utility wraps
024     * {@link com.liferay.portal.service.impl.ResourceTypePermissionLocalServiceImpl} 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 ResourceTypePermissionLocalService
032     * @see com.liferay.portal.service.base.ResourceTypePermissionLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ResourceTypePermissionLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ResourceTypePermissionLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceTypePermissionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the resource type permission to the database. Also notifies the appropriate model listeners.
046            *
047            * @param resourceTypePermission the resource type permission
048            * @return the resource type permission that was added
049            * @throws SystemException if a system exception occurred
050            */
051            public static com.liferay.portal.model.ResourceTypePermission addResourceTypePermission(
052                    com.liferay.portal.model.ResourceTypePermission resourceTypePermission)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService().addResourceTypePermission(resourceTypePermission);
055            }
056    
057            /**
058            * Creates a new resource type permission with the primary key. Does not add the resource type permission to the database.
059            *
060            * @param resourceTypePermissionId the primary key for the new resource type permission
061            * @return the new resource type permission
062            */
063            public static com.liferay.portal.model.ResourceTypePermission createResourceTypePermission(
064                    long resourceTypePermissionId) {
065                    return getService()
066                                       .createResourceTypePermission(resourceTypePermissionId);
067            }
068    
069            /**
070            * Deletes the resource type permission with the primary key from the database. Also notifies the appropriate model listeners.
071            *
072            * @param resourceTypePermissionId the primary key of the resource type permission
073            * @return the resource type permission that was removed
074            * @throws PortalException if a resource type permission with the primary key could not be found
075            * @throws SystemException if a system exception occurred
076            */
077            public static com.liferay.portal.model.ResourceTypePermission deleteResourceTypePermission(
078                    long resourceTypePermissionId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return getService()
082                                       .deleteResourceTypePermission(resourceTypePermissionId);
083            }
084    
085            /**
086            * Deletes the resource type permission from the database. Also notifies the appropriate model listeners.
087            *
088            * @param resourceTypePermission the resource type permission
089            * @return the resource type permission that was removed
090            * @throws SystemException if a system exception occurred
091            */
092            public static com.liferay.portal.model.ResourceTypePermission deleteResourceTypePermission(
093                    com.liferay.portal.model.ResourceTypePermission resourceTypePermission)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getService().deleteResourceTypePermission(resourceTypePermission);
096            }
097    
098            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
099                    return getService().dynamicQuery();
100            }
101    
102            /**
103            * Performs a dynamic query on the database and returns the matching rows.
104            *
105            * @param dynamicQuery the dynamic query
106            * @return the matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public static java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().dynamicQuery(dynamicQuery);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns a range of the matching rows.
118            *
119            * <p>
120            * 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.ResourceTypePermissionModelImpl}. 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.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @return the range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public static java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end) throws com.liferay.portal.kernel.exception.SystemException {
133                    return getService().dynamicQuery(dynamicQuery, start, end);
134            }
135    
136            /**
137            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
138            *
139            * <p>
140            * 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.ResourceTypePermissionModelImpl}. 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.
141            * </p>
142            *
143            * @param dynamicQuery the dynamic query
144            * @param start the lower bound of the range of model instances
145            * @param end the upper bound of the range of model instances (not inclusive)
146            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
147            * @return the ordered range of matching rows
148            * @throws SystemException if a system exception occurred
149            */
150            @SuppressWarnings("rawtypes")
151            public static java.util.List dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end,
154                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService()
157                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
158            }
159    
160            /**
161            * Returns the number of rows that match the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @return the number of rows that match the dynamic query
165            * @throws SystemException if a system exception occurred
166            */
167            public static long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService().dynamicQueryCount(dynamicQuery);
171            }
172    
173            /**
174            * Returns the number of rows that match the dynamic query.
175            *
176            * @param dynamicQuery the dynamic query
177            * @param projection the projection to apply to the query
178            * @return the number of rows that match the dynamic query
179            * @throws SystemException if a system exception occurred
180            */
181            public static long dynamicQueryCount(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
183                    com.liferay.portal.kernel.dao.orm.Projection projection)
184                    throws com.liferay.portal.kernel.exception.SystemException {
185                    return getService().dynamicQueryCount(dynamicQuery, projection);
186            }
187    
188            public static com.liferay.portal.model.ResourceTypePermission fetchResourceTypePermission(
189                    long resourceTypePermissionId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getService().fetchResourceTypePermission(resourceTypePermissionId);
192            }
193    
194            /**
195            * Returns the resource type permission with the primary key.
196            *
197            * @param resourceTypePermissionId the primary key of the resource type permission
198            * @return the resource type permission
199            * @throws PortalException if a resource type permission with the primary key could not be found
200            * @throws SystemException if a system exception occurred
201            */
202            public static com.liferay.portal.model.ResourceTypePermission getResourceTypePermission(
203                    long resourceTypePermissionId)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    return getService().getResourceTypePermission(resourceTypePermissionId);
207            }
208    
209            public static com.liferay.portal.model.PersistedModel getPersistedModel(
210                    java.io.Serializable primaryKeyObj)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    return getService().getPersistedModel(primaryKeyObj);
214            }
215    
216            /**
217            * Returns a range of all the resource type permissions.
218            *
219            * <p>
220            * 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.ResourceTypePermissionModelImpl}. 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.
221            * </p>
222            *
223            * @param start the lower bound of the range of resource type permissions
224            * @param end the upper bound of the range of resource type permissions (not inclusive)
225            * @return the range of resource type permissions
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portal.model.ResourceTypePermission> getResourceTypePermissions(
229                    int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getService().getResourceTypePermissions(start, end);
232            }
233    
234            /**
235            * Returns the number of resource type permissions.
236            *
237            * @return the number of resource type permissions
238            * @throws SystemException if a system exception occurred
239            */
240            public static int getResourceTypePermissionsCount()
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getService().getResourceTypePermissionsCount();
243            }
244    
245            /**
246            * Updates the resource type permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
247            *
248            * @param resourceTypePermission the resource type permission
249            * @return the resource type permission that was updated
250            * @throws SystemException if a system exception occurred
251            */
252            public static com.liferay.portal.model.ResourceTypePermission updateResourceTypePermission(
253                    com.liferay.portal.model.ResourceTypePermission resourceTypePermission)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getService().updateResourceTypePermission(resourceTypePermission);
256            }
257    
258            /**
259            * Returns the Spring bean ID for this bean.
260            *
261            * @return the Spring bean ID for this bean
262            */
263            public static java.lang.String getBeanIdentifier() {
264                    return getService().getBeanIdentifier();
265            }
266    
267            /**
268            * Sets the Spring bean ID for this bean.
269            *
270            * @param beanIdentifier the Spring bean ID for this bean
271            */
272            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
273                    getService().setBeanIdentifier(beanIdentifier);
274            }
275    
276            public static long getCompanyScopeActionIds(long companyId,
277                    java.lang.String name, long roleId)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    return getService().getCompanyScopeActionIds(companyId, name, roleId);
280            }
281    
282            public static long getGroupScopeActionIds(long companyId, long groupId,
283                    java.lang.String name, long roleId)
284                    throws com.liferay.portal.kernel.exception.SystemException {
285                    return getService()
286                                       .getGroupScopeActionIds(companyId, groupId, name, roleId);
287            }
288    
289            public static java.util.List<com.liferay.portal.model.ResourceTypePermission> getGroupScopeResourceTypePermissions(
290                    long companyId, java.lang.String name, long roleId)
291                    throws com.liferay.portal.kernel.exception.SystemException {
292                    return getService()
293                                       .getGroupScopeResourceTypePermissions(companyId, name, roleId);
294            }
295    
296            public static com.liferay.portal.model.ResourceBlockPermissionsContainer getResourceBlockPermissionsContainer(
297                    long companyId, long groupId, java.lang.String name)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getService()
300                                       .getResourceBlockPermissionsContainer(companyId, groupId,
301                            name);
302            }
303    
304            public static java.util.List<com.liferay.portal.model.ResourceTypePermission> getRoleResourceTypePermissions(
305                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
306                    return getService().getRoleResourceTypePermissions(roleId);
307            }
308    
309            public static boolean hasCompanyScopePermission(long companyId,
310                    java.lang.String name, long roleId, java.lang.String actionId)
311                    throws com.liferay.portal.kernel.exception.PortalException,
312                            com.liferay.portal.kernel.exception.SystemException {
313                    return getService()
314                                       .hasCompanyScopePermission(companyId, name, roleId, actionId);
315            }
316    
317            public static boolean hasEitherScopePermission(long companyId,
318                    java.lang.String name, long roleId, java.lang.String actionId)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    return getService()
322                                       .hasEitherScopePermission(companyId, name, roleId, actionId);
323            }
324    
325            public static boolean hasGroupScopePermission(long companyId, long groupId,
326                    java.lang.String name, long roleId, java.lang.String actionId)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException {
329                    return getService()
330                                       .hasGroupScopePermission(companyId, groupId, name, roleId,
331                            actionId);
332            }
333    
334            public static void updateCompanyScopeResourceTypePermissions(
335                    long companyId, java.lang.String name, long roleId, long actionIdsLong,
336                    long operator)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    getService()
339                            .updateCompanyScopeResourceTypePermissions(companyId, name, roleId,
340                            actionIdsLong, operator);
341            }
342    
343            public static void updateGroupScopeResourceTypePermissions(long companyId,
344                    long groupId, java.lang.String name, long roleId, long actionIdsLong,
345                    long operator)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    getService()
348                            .updateGroupScopeResourceTypePermissions(companyId, groupId, name,
349                            roleId, actionIdsLong, operator);
350            }
351    
352            public static ResourceTypePermissionLocalService getService() {
353                    if (_service == null) {
354                            _service = (ResourceTypePermissionLocalService)PortalBeanLocatorUtil.locate(ResourceTypePermissionLocalService.class.getName());
355    
356                            ReferenceRegistry.registerReference(ResourceTypePermissionLocalServiceUtil.class,
357                                    "_service");
358                    }
359    
360                    return _service;
361            }
362    
363            /**
364             * @deprecated As of 6.2.0
365             */
366            public void setService(ResourceTypePermissionLocalService service) {
367            }
368    
369            private static ResourceTypePermissionLocalService _service;
370    }