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