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 remote service utility for ResourceBlock. This utility wraps
024     * {@link com.liferay.portal.service.impl.ResourceBlockServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ResourceBlockService
032     * @see com.liferay.portal.service.base.ResourceBlockServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ResourceBlockServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ResourceBlockServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceBlockServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            public static void addCompanyScopePermission(long scopeGroupId,
063                    long companyId, java.lang.String name, long roleId,
064                    java.lang.String actionId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    getService()
068                            .addCompanyScopePermission(scopeGroupId, companyId, name, roleId,
069                            actionId);
070            }
071    
072            public static void addGroupScopePermission(long scopeGroupId,
073                    long companyId, long groupId, java.lang.String name, long roleId,
074                    java.lang.String actionId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    getService()
078                            .addGroupScopePermission(scopeGroupId, companyId, groupId, name,
079                            roleId, actionId);
080            }
081    
082            public static void addIndividualScopePermission(long companyId,
083                    long groupId, java.lang.String name, long primKey, long roleId,
084                    java.lang.String actionId)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    getService()
088                            .addIndividualScopePermission(companyId, groupId, name, primKey,
089                            roleId, actionId);
090            }
091    
092            public static void removeAllGroupScopePermissions(long scopeGroupId,
093                    long companyId, java.lang.String name, long roleId,
094                    java.lang.String actionId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    getService()
098                            .removeAllGroupScopePermissions(scopeGroupId, companyId, name,
099                            roleId, actionId);
100            }
101    
102            public static void removeCompanyScopePermission(long scopeGroupId,
103                    long companyId, java.lang.String name, long roleId,
104                    java.lang.String actionId)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    getService()
108                            .removeCompanyScopePermission(scopeGroupId, companyId, name,
109                            roleId, actionId);
110            }
111    
112            public static void removeGroupScopePermission(long scopeGroupId,
113                    long companyId, long groupId, java.lang.String name, long roleId,
114                    java.lang.String actionId)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException {
117                    getService()
118                            .removeGroupScopePermission(scopeGroupId, companyId, groupId, name,
119                            roleId, actionId);
120            }
121    
122            public static void removeIndividualScopePermission(long companyId,
123                    long groupId, java.lang.String name, long primKey, long roleId,
124                    java.lang.String actionId)
125                    throws com.liferay.portal.kernel.exception.PortalException,
126                            com.liferay.portal.kernel.exception.SystemException {
127                    getService()
128                            .removeIndividualScopePermission(companyId, groupId, name, primKey,
129                            roleId, actionId);
130            }
131    
132            public static void setCompanyScopePermissions(long scopeGroupId,
133                    long companyId, java.lang.String name, long roleId,
134                    java.util.List<java.lang.String> actionIds)
135                    throws com.liferay.portal.kernel.exception.PortalException,
136                            com.liferay.portal.kernel.exception.SystemException {
137                    getService()
138                            .setCompanyScopePermissions(scopeGroupId, companyId, name, roleId,
139                            actionIds);
140            }
141    
142            public static void setGroupScopePermissions(long scopeGroupId,
143                    long companyId, long groupId, java.lang.String name, long roleId,
144                    java.util.List<java.lang.String> actionIds)
145                    throws com.liferay.portal.kernel.exception.PortalException,
146                            com.liferay.portal.kernel.exception.SystemException {
147                    getService()
148                            .setGroupScopePermissions(scopeGroupId, companyId, groupId, name,
149                            roleId, actionIds);
150            }
151    
152            public static void setIndividualScopePermissions(long companyId,
153                    long groupId, java.lang.String name, long primKey, long roleId,
154                    java.util.List<java.lang.String> actionIds)
155                    throws com.liferay.portal.kernel.exception.PortalException,
156                            com.liferay.portal.kernel.exception.SystemException {
157                    getService()
158                            .setIndividualScopePermissions(companyId, groupId, name, primKey,
159                            roleId, actionIds);
160            }
161    
162            public static void setIndividualScopePermissions(long companyId,
163                    long groupId, java.lang.String name, long primKey,
164                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    getService()
168                            .setIndividualScopePermissions(companyId, groupId, name, primKey,
169                            roleIdsToActionIds);
170            }
171    
172            public static ResourceBlockService getService() {
173                    if (_service == null) {
174                            _service = (ResourceBlockService)PortalBeanLocatorUtil.locate(ResourceBlockService.class.getName());
175    
176                            ReferenceRegistry.registerReference(ResourceBlockServiceUtil.class,
177                                    "_service");
178                    }
179    
180                    return _service;
181            }
182    
183            /**
184             * @deprecated As of 6.2.0
185             */
186            public void setService(ResourceBlockService service) {
187            }
188    
189            private static ResourceBlockService _service;
190    }