001    /**
002     * Copyright (c) 2000-2012 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.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * 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.
023     *
024     * <p>
025     * 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.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see ResourceBlockService
030     * @see com.liferay.portal.service.base.ResourceBlockServiceBaseImpl
031     * @see com.liferay.portal.service.impl.ResourceBlockServiceImpl
032     * @generated
033     */
034    public class ResourceBlockServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceBlockServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static void addCompanyScopePermission(long scopeGroupId,
041                    long companyId, java.lang.String name, long roleId,
042                    java.lang.String actionId)
043                    throws com.liferay.portal.kernel.exception.PortalException,
044                            com.liferay.portal.kernel.exception.SystemException {
045                    getService()
046                            .addCompanyScopePermission(scopeGroupId, companyId, name, roleId,
047                            actionId);
048            }
049    
050            public static void addGroupScopePermission(long scopeGroupId,
051                    long companyId, long groupId, java.lang.String name, long roleId,
052                    java.lang.String actionId)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    getService()
056                            .addGroupScopePermission(scopeGroupId, companyId, groupId, name,
057                            roleId, actionId);
058            }
059    
060            public static void addIndividualScopePermission(long companyId,
061                    long groupId, java.lang.String name, long primKey, long roleId,
062                    java.lang.String actionId)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    getService()
066                            .addIndividualScopePermission(companyId, groupId, name, primKey,
067                            roleId, actionId);
068            }
069    
070            public static void removeAllGroupScopePermissions(long scopeGroupId,
071                    long companyId, java.lang.String name, long roleId,
072                    java.lang.String actionId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    getService()
076                            .removeAllGroupScopePermissions(scopeGroupId, companyId, name,
077                            roleId, actionId);
078            }
079    
080            public static void removeCompanyScopePermission(long scopeGroupId,
081                    long companyId, java.lang.String name, long roleId,
082                    java.lang.String actionId)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException {
085                    getService()
086                            .removeCompanyScopePermission(scopeGroupId, companyId, name,
087                            roleId, actionId);
088            }
089    
090            public static void removeGroupScopePermission(long scopeGroupId,
091                    long companyId, long groupId, java.lang.String name, long roleId,
092                    java.lang.String actionId)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    getService()
096                            .removeGroupScopePermission(scopeGroupId, companyId, groupId, name,
097                            roleId, actionId);
098            }
099    
100            public static void removeIndividualScopePermission(long companyId,
101                    long groupId, java.lang.String name, long primKey, long roleId,
102                    java.lang.String actionId)
103                    throws com.liferay.portal.kernel.exception.PortalException,
104                            com.liferay.portal.kernel.exception.SystemException {
105                    getService()
106                            .removeIndividualScopePermission(companyId, groupId, name, primKey,
107                            roleId, actionId);
108            }
109    
110            public static void setCompanyScopePermissions(long scopeGroupId,
111                    long companyId, java.lang.String name, long roleId,
112                    java.util.List<java.lang.String> actionIds)
113                    throws com.liferay.portal.kernel.exception.PortalException,
114                            com.liferay.portal.kernel.exception.SystemException {
115                    getService()
116                            .setCompanyScopePermissions(scopeGroupId, companyId, name, roleId,
117                            actionIds);
118            }
119    
120            public static void setGroupScopePermissions(long scopeGroupId,
121                    long companyId, long groupId, java.lang.String name, long roleId,
122                    java.util.List<java.lang.String> actionIds)
123                    throws com.liferay.portal.kernel.exception.PortalException,
124                            com.liferay.portal.kernel.exception.SystemException {
125                    getService()
126                            .setGroupScopePermissions(scopeGroupId, companyId, groupId, name,
127                            roleId, actionIds);
128            }
129    
130            public static void setIndividualScopePermissions(long companyId,
131                    long groupId, java.lang.String name, long primKey, long roleId,
132                    java.util.List<java.lang.String> actionIds)
133                    throws com.liferay.portal.kernel.exception.PortalException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    getService()
136                            .setIndividualScopePermissions(companyId, groupId, name, primKey,
137                            roleId, actionIds);
138            }
139    
140            public static void setIndividualScopePermissions(long companyId,
141                    long groupId, java.lang.String name, long primKey,
142                    java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    getService()
146                            .setIndividualScopePermissions(companyId, groupId, name, primKey,
147                            roleIdsToActionIds);
148            }
149    
150            public static ResourceBlockService getService() {
151                    if (_service == null) {
152                            _service = (ResourceBlockService)PortalBeanLocatorUtil.locate(ResourceBlockService.class.getName());
153    
154                            ReferenceRegistry.registerReference(ResourceBlockServiceUtil.class,
155                                    "_service");
156                            MethodCache.remove(ResourceBlockService.class);
157                    }
158    
159                    return _service;
160            }
161    
162            public void setService(ResourceBlockService service) {
163                    MethodCache.remove(ResourceBlockService.class);
164    
165                    _service = service;
166    
167                    ReferenceRegistry.registerReference(ResourceBlockServiceUtil.class,
168                            "_service");
169                    MethodCache.remove(ResourceBlockService.class);
170            }
171    
172            private static ResourceBlockService _service;
173    }