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.portlet.mobiledevicerules.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 m d r rule group remote service. This utility wraps {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupServiceImpl} 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 Edward C. Han
029     * @see MDRRuleGroupService
030     * @see com.liferay.portlet.mobiledevicerules.service.base.MDRRuleGroupServiceBaseImpl
031     * @see com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupServiceImpl
032     * @generated
033     */
034    public class MDRRuleGroupServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup addRuleGroup(
041                    long groupId,
042                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
043                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
044                    com.liferay.portal.service.ServiceContext serviceContext)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    return getService()
048                                       .addRuleGroup(groupId, nameMap, descriptionMap,
049                            serviceContext);
050            }
051    
052            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup copyRuleGroup(
053                    long ruleGroupId, long groupId,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService().copyRuleGroup(ruleGroupId, groupId, serviceContext);
058            }
059    
060            public static void deleteRuleGroup(long ruleGroupId)
061                    throws com.liferay.portal.kernel.exception.PortalException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    getService().deleteRuleGroup(ruleGroupId);
064            }
065    
066            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup fetchRuleGroup(
067                    long ruleGroupId)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    return getService().fetchRuleGroup(ruleGroupId);
071            }
072    
073            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup getRuleGroup(
074                    long ruleGroupId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    return getService().getRuleGroup(ruleGroupId);
078            }
079    
080            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup updateRuleGroup(
081                    long ruleGroupId,
082                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
083                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
084                    com.liferay.portal.service.ServiceContext serviceContext)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService()
088                                       .updateRuleGroup(ruleGroupId, nameMap, descriptionMap,
089                            serviceContext);
090            }
091    
092            public static MDRRuleGroupService getService() {
093                    if (_service == null) {
094                            _service = (MDRRuleGroupService)PortalBeanLocatorUtil.locate(MDRRuleGroupService.class.getName());
095    
096                            ReferenceRegistry.registerReference(MDRRuleGroupServiceUtil.class,
097                                    "_service");
098                            MethodCache.remove(MDRRuleGroupService.class);
099                    }
100    
101                    return _service;
102            }
103    
104            public void setService(MDRRuleGroupService service) {
105                    MethodCache.remove(MDRRuleGroupService.class);
106    
107                    _service = service;
108    
109                    ReferenceRegistry.registerReference(MDRRuleGroupServiceUtil.class,
110                            "_service");
111                    MethodCache.remove(MDRRuleGroupService.class);
112            }
113    
114            private static MDRRuleGroupService _service;
115    }