001    /**
002     * Copyright (c) 2000-2011 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 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup copyRuleGroup(
061                    com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup ruleGroup,
062                    long groupId, com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    return getService().copyRuleGroup(ruleGroup, groupId, serviceContext);
066            }
067    
068            public static void deleteRuleGroup(long ruleGroupId)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    getService().deleteRuleGroup(ruleGroupId);
072            }
073    
074            public static void deleteRuleGroup(
075                    com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup ruleGroup)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    getService().deleteRuleGroup(ruleGroup);
079            }
080    
081            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup fetchRuleGroup(
082                    long ruleGroupId)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException {
085                    return getService().fetchRuleGroup(ruleGroupId);
086            }
087    
088            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup getRuleGroup(
089                    long ruleGroupId)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getRuleGroup(ruleGroupId);
093            }
094    
095            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup updateRuleGroup(
096                    long ruleGroupId,
097                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
098                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
099                    com.liferay.portal.service.ServiceContext serviceContext)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException {
102                    return getService()
103                                       .updateRuleGroup(ruleGroupId, nameMap, descriptionMap,
104                            serviceContext);
105            }
106    
107            public static MDRRuleGroupService getService() {
108                    if (_service == null) {
109                            _service = (MDRRuleGroupService)PortalBeanLocatorUtil.locate(MDRRuleGroupService.class.getName());
110    
111                            ReferenceRegistry.registerReference(MDRRuleGroupServiceUtil.class,
112                                    "_service");
113                            MethodCache.remove(MDRRuleGroupService.class);
114                    }
115    
116                    return _service;
117            }
118    
119            public void setService(MDRRuleGroupService service) {
120                    MethodCache.remove(MDRRuleGroupService.class);
121    
122                    _service = service;
123    
124                    ReferenceRegistry.registerReference(MDRRuleGroupServiceUtil.class,
125                            "_service");
126                    MethodCache.remove(MDRRuleGroupService.class);
127            }
128    
129            private static MDRRuleGroupService _service;
130    }