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 remote service. This utility wraps {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleServiceImpl} 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 MDRRuleService
030     * @see com.liferay.portlet.mobiledevicerules.service.base.MDRRuleServiceBaseImpl
031     * @see com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleServiceImpl
032     * @generated
033     */
034    public class MDRRuleServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.mobiledevicerules.model.MDRRule addRule(
041                    long ruleGroupId,
042                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
043                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
044                    java.lang.String type, java.lang.String typeSettings,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    return getService()
049                                       .addRule(ruleGroupId, nameMap, descriptionMap, type,
050                            typeSettings, serviceContext);
051            }
052    
053            public static com.liferay.portlet.mobiledevicerules.model.MDRRule addRule(
054                    long ruleGroupId,
055                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
056                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
057                    java.lang.String type,
058                    com.liferay.portal.kernel.util.UnicodeProperties typeSettings,
059                    com.liferay.portal.service.ServiceContext serviceContext)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService()
063                                       .addRule(ruleGroupId, nameMap, descriptionMap, type,
064                            typeSettings, serviceContext);
065            }
066    
067            public static void deleteRule(long ruleId)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    getService().deleteRule(ruleId);
071            }
072    
073            public static com.liferay.portlet.mobiledevicerules.model.MDRRule fetchRule(
074                    long ruleId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    return getService().fetchRule(ruleId);
078            }
079    
080            public static com.liferay.portlet.mobiledevicerules.model.MDRRule getRule(
081                    long ruleId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    return getService().getRule(ruleId);
085            }
086    
087            public static com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
088                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
089                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
090                    java.lang.String type, java.lang.String typeSettings,
091                    com.liferay.portal.service.ServiceContext serviceContext)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    return getService()
095                                       .updateRule(ruleId, nameMap, descriptionMap, type,
096                            typeSettings, serviceContext);
097            }
098    
099            public static com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
100                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
101                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
102                    java.lang.String type,
103                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    return getService()
108                                       .updateRule(ruleId, nameMap, descriptionMap, type,
109                            typeSettingsProperties, serviceContext);
110            }
111    
112            public static MDRRuleService getService() {
113                    if (_service == null) {
114                            _service = (MDRRuleService)PortalBeanLocatorUtil.locate(MDRRuleService.class.getName());
115    
116                            ReferenceRegistry.registerReference(MDRRuleServiceUtil.class,
117                                    "_service");
118                            MethodCache.remove(MDRRuleService.class);
119                    }
120    
121                    return _service;
122            }
123    
124            public void setService(MDRRuleService service) {
125                    MethodCache.remove(MDRRuleService.class);
126    
127                    _service = service;
128    
129                    ReferenceRegistry.registerReference(MDRRuleServiceUtil.class, "_service");
130                    MethodCache.remove(MDRRuleService.class);
131            }
132    
133            private static MDRRuleService _service;
134    }