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 action remote service. This utility wraps {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRActionServiceImpl} 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 MDRActionService
030     * @see com.liferay.portlet.mobiledevicerules.service.base.MDRActionServiceBaseImpl
031     * @see com.liferay.portlet.mobiledevicerules.service.impl.MDRActionServiceImpl
032     * @generated
033     */
034    public class MDRActionServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRActionServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.mobiledevicerules.model.MDRAction addAction(
041                    long ruleGroupInstanceId,
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                                       .addAction(ruleGroupInstanceId, nameMap, descriptionMap,
050                            type, typeSettings, serviceContext);
051            }
052    
053            public static com.liferay.portlet.mobiledevicerules.model.MDRAction addAction(
054                    long ruleGroupInstanceId,
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 typeSettingsProperties,
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                                       .addAction(ruleGroupInstanceId, nameMap, descriptionMap,
064                            type, typeSettingsProperties, serviceContext);
065            }
066    
067            public static void deleteAction(long actionId)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    getService().deleteAction(actionId);
071            }
072    
073            public static void deleteAction(
074                    com.liferay.portlet.mobiledevicerules.model.MDRAction action)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    getService().deleteAction(action);
078            }
079    
080            public static com.liferay.portlet.mobiledevicerules.model.MDRAction fetchAction(
081                    long actionId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    return getService().fetchAction(actionId);
085            }
086    
087            public static com.liferay.portlet.mobiledevicerules.model.MDRAction getAction(
088                    long actionId)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService().getAction(actionId);
092            }
093    
094            public static com.liferay.portlet.mobiledevicerules.model.MDRAction updateAction(
095                    long actionId,
096                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
097                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
098                    java.lang.String type, java.lang.String typeSettings,
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                                       .updateAction(actionId, nameMap, descriptionMap, type,
104                            typeSettings, serviceContext);
105            }
106    
107            public static com.liferay.portlet.mobiledevicerules.model.MDRAction updateAction(
108                    long actionId,
109                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
110                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
111                    java.lang.String type,
112                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
113                    com.liferay.portal.service.ServiceContext serviceContext)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    return getService()
117                                       .updateAction(actionId, nameMap, descriptionMap, type,
118                            typeSettingsProperties, serviceContext);
119            }
120    
121            public static MDRActionService getService() {
122                    if (_service == null) {
123                            _service = (MDRActionService)PortalBeanLocatorUtil.locate(MDRActionService.class.getName());
124    
125                            ReferenceRegistry.registerReference(MDRActionServiceUtil.class,
126                                    "_service");
127                            MethodCache.remove(MDRActionService.class);
128                    }
129    
130                    return _service;
131            }
132    
133            public void setService(MDRActionService service) {
134                    MethodCache.remove(MDRActionService.class);
135    
136                    _service = service;
137    
138                    ReferenceRegistry.registerReference(MDRActionServiceUtil.class,
139                            "_service");
140                    MethodCache.remove(MDRActionService.class);
141            }
142    
143            private static MDRActionService _service;
144    }