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