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 user group role remote service. This utility wraps {@link com.liferay.portal.service.impl.UserGroupRoleServiceImpl} 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 UserGroupRoleService
030     * @see com.liferay.portal.service.base.UserGroupRoleServiceBaseImpl
031     * @see com.liferay.portal.service.impl.UserGroupRoleServiceImpl
032     * @generated
033     */
034    public class UserGroupRoleServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupRoleServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static void addUserGroupRoles(long userId, long groupId,
041                    long[] roleIds)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    getService().addUserGroupRoles(userId, groupId, roleIds);
045            }
046    
047            public static void addUserGroupRoles(long[] userIds, long groupId,
048                    long roleId)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    getService().addUserGroupRoles(userIds, groupId, roleId);
052            }
053    
054            public static void deleteUserGroupRoles(long userId, long groupId,
055                    long[] roleIds)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    getService().deleteUserGroupRoles(userId, groupId, roleIds);
059            }
060    
061            public static void deleteUserGroupRoles(long[] userIds, long groupId,
062                    long roleId)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    getService().deleteUserGroupRoles(userIds, groupId, roleId);
066            }
067    
068            public static UserGroupRoleService getService() {
069                    if (_service == null) {
070                            _service = (UserGroupRoleService)PortalBeanLocatorUtil.locate(UserGroupRoleService.class.getName());
071    
072                            ReferenceRegistry.registerReference(UserGroupRoleServiceUtil.class,
073                                    "_service");
074                            MethodCache.remove(UserGroupRoleService.class);
075                    }
076    
077                    return _service;
078            }
079    
080            public void setService(UserGroupRoleService service) {
081                    MethodCache.remove(UserGroupRoleService.class);
082    
083                    _service = service;
084    
085                    ReferenceRegistry.registerReference(UserGroupRoleServiceUtil.class,
086                            "_service");
087                    MethodCache.remove(UserGroupRoleService.class);
088            }
089    
090            private static UserGroupRoleService _service;
091    }