001
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
034 public class MDRRuleServiceUtil {
035
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 }