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 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 com.liferay.portlet.mobiledevicerules.model.MDRAction fetchAction(
074                    long actionId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    return getService().fetchAction(actionId);
078            }
079    
080            public static com.liferay.portlet.mobiledevicerules.model.MDRAction getAction(
081                    long actionId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    return getService().getAction(actionId);
085            }
086    
087            public static com.liferay.portlet.mobiledevicerules.model.MDRAction updateAction(
088                    long actionId,
089                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
090                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
091                    java.lang.String type, java.lang.String typeSettings,
092                    com.liferay.portal.service.ServiceContext serviceContext)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    return getService()
096                                       .updateAction(actionId, nameMap, descriptionMap, type,
097                            typeSettings, serviceContext);
098            }
099    
100            public static com.liferay.portlet.mobiledevicerules.model.MDRAction updateAction(
101                    long actionId,
102                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
103                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
104                    java.lang.String type,
105                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    return getService()
110                                       .updateAction(actionId, nameMap, descriptionMap, type,
111                            typeSettingsProperties, serviceContext);
112            }
113    
114            public static MDRActionService getService() {
115                    if (_service == null) {
116                            _service = (MDRActionService)PortalBeanLocatorUtil.locate(MDRActionService.class.getName());
117    
118                            ReferenceRegistry.registerReference(MDRActionServiceUtil.class,
119                                    "_service");
120                            MethodCache.remove(MDRActionService.class);
121                    }
122    
123                    return _service;
124            }
125    
126            public void setService(MDRActionService service) {
127                    MethodCache.remove(MDRActionService.class);
128    
129                    _service = service;
130    
131                    ReferenceRegistry.registerReference(MDRActionServiceUtil.class,
132                            "_service");
133                    MethodCache.remove(MDRActionService.class);
134            }
135    
136            private static MDRActionService _service;
137    }