001
014
015 package com.liferay.portlet.mobiledevicerules.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupServiceUtil;
025
026
054 public class MDRRuleGroupServiceHttp {
055 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup addRuleGroup(
056 HttpPrincipal httpPrincipal, long groupId,
057 java.util.Map<java.util.Locale, java.lang.String> nameMap,
058 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
059 com.liferay.portal.service.ServiceContext serviceContext)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 try {
063 MethodKey methodKey = new MethodKey(MDRRuleGroupServiceUtil.class,
064 "addRuleGroup", _addRuleGroupParameterTypes0);
065
066 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
067 nameMap, descriptionMap, serviceContext);
068
069 Object returnObj = null;
070
071 try {
072 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
073 }
074 catch (Exception e) {
075 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
076 throw (com.liferay.portal.kernel.exception.PortalException)e;
077 }
078
079 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
080 throw (com.liferay.portal.kernel.exception.SystemException)e;
081 }
082
083 throw new com.liferay.portal.kernel.exception.SystemException(e);
084 }
085
086 return (com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup)returnObj;
087 }
088 catch (com.liferay.portal.kernel.exception.SystemException se) {
089 _log.error(se, se);
090
091 throw se;
092 }
093 }
094
095 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup copyRuleGroup(
096 HttpPrincipal httpPrincipal, long ruleGroupId, long groupId,
097 com.liferay.portal.service.ServiceContext serviceContext)
098 throws com.liferay.portal.kernel.exception.PortalException,
099 com.liferay.portal.kernel.exception.SystemException {
100 try {
101 MethodKey methodKey = new MethodKey(MDRRuleGroupServiceUtil.class,
102 "copyRuleGroup", _copyRuleGroupParameterTypes1);
103
104 MethodHandler methodHandler = new MethodHandler(methodKey,
105 ruleGroupId, groupId, serviceContext);
106
107 Object returnObj = null;
108
109 try {
110 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
111 }
112 catch (Exception e) {
113 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
114 throw (com.liferay.portal.kernel.exception.PortalException)e;
115 }
116
117 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
118 throw (com.liferay.portal.kernel.exception.SystemException)e;
119 }
120
121 throw new com.liferay.portal.kernel.exception.SystemException(e);
122 }
123
124 return (com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup)returnObj;
125 }
126 catch (com.liferay.portal.kernel.exception.SystemException se) {
127 _log.error(se, se);
128
129 throw se;
130 }
131 }
132
133 public static void deleteRuleGroup(HttpPrincipal httpPrincipal,
134 long ruleGroupId)
135 throws com.liferay.portal.kernel.exception.PortalException,
136 com.liferay.portal.kernel.exception.SystemException {
137 try {
138 MethodKey methodKey = new MethodKey(MDRRuleGroupServiceUtil.class,
139 "deleteRuleGroup", _deleteRuleGroupParameterTypes2);
140
141 MethodHandler methodHandler = new MethodHandler(methodKey,
142 ruleGroupId);
143
144 try {
145 TunnelUtil.invoke(httpPrincipal, methodHandler);
146 }
147 catch (Exception e) {
148 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
149 throw (com.liferay.portal.kernel.exception.PortalException)e;
150 }
151
152 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
153 throw (com.liferay.portal.kernel.exception.SystemException)e;
154 }
155
156 throw new com.liferay.portal.kernel.exception.SystemException(e);
157 }
158 }
159 catch (com.liferay.portal.kernel.exception.SystemException se) {
160 _log.error(se, se);
161
162 throw se;
163 }
164 }
165
166 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup fetchRuleGroup(
167 HttpPrincipal httpPrincipal, long ruleGroupId)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 try {
171 MethodKey methodKey = new MethodKey(MDRRuleGroupServiceUtil.class,
172 "fetchRuleGroup", _fetchRuleGroupParameterTypes3);
173
174 MethodHandler methodHandler = new MethodHandler(methodKey,
175 ruleGroupId);
176
177 Object returnObj = null;
178
179 try {
180 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
181 }
182 catch (Exception e) {
183 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
184 throw (com.liferay.portal.kernel.exception.PortalException)e;
185 }
186
187 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
188 throw (com.liferay.portal.kernel.exception.SystemException)e;
189 }
190
191 throw new com.liferay.portal.kernel.exception.SystemException(e);
192 }
193
194 return (com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup)returnObj;
195 }
196 catch (com.liferay.portal.kernel.exception.SystemException se) {
197 _log.error(se, se);
198
199 throw se;
200 }
201 }
202
203 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup getRuleGroup(
204 HttpPrincipal httpPrincipal, long ruleGroupId)
205 throws com.liferay.portal.kernel.exception.PortalException,
206 com.liferay.portal.kernel.exception.SystemException {
207 try {
208 MethodKey methodKey = new MethodKey(MDRRuleGroupServiceUtil.class,
209 "getRuleGroup", _getRuleGroupParameterTypes4);
210
211 MethodHandler methodHandler = new MethodHandler(methodKey,
212 ruleGroupId);
213
214 Object returnObj = null;
215
216 try {
217 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
218 }
219 catch (Exception e) {
220 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
221 throw (com.liferay.portal.kernel.exception.PortalException)e;
222 }
223
224 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
225 throw (com.liferay.portal.kernel.exception.SystemException)e;
226 }
227
228 throw new com.liferay.portal.kernel.exception.SystemException(e);
229 }
230
231 return (com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup)returnObj;
232 }
233 catch (com.liferay.portal.kernel.exception.SystemException se) {
234 _log.error(se, se);
235
236 throw se;
237 }
238 }
239
240 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup updateRuleGroup(
241 HttpPrincipal httpPrincipal, long ruleGroupId,
242 java.util.Map<java.util.Locale, java.lang.String> nameMap,
243 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
244 com.liferay.portal.service.ServiceContext serviceContext)
245 throws com.liferay.portal.kernel.exception.PortalException,
246 com.liferay.portal.kernel.exception.SystemException {
247 try {
248 MethodKey methodKey = new MethodKey(MDRRuleGroupServiceUtil.class,
249 "updateRuleGroup", _updateRuleGroupParameterTypes5);
250
251 MethodHandler methodHandler = new MethodHandler(methodKey,
252 ruleGroupId, nameMap, descriptionMap, serviceContext);
253
254 Object returnObj = null;
255
256 try {
257 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
258 }
259 catch (Exception e) {
260 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
261 throw (com.liferay.portal.kernel.exception.PortalException)e;
262 }
263
264 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
265 throw (com.liferay.portal.kernel.exception.SystemException)e;
266 }
267
268 throw new com.liferay.portal.kernel.exception.SystemException(e);
269 }
270
271 return (com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup)returnObj;
272 }
273 catch (com.liferay.portal.kernel.exception.SystemException se) {
274 _log.error(se, se);
275
276 throw se;
277 }
278 }
279
280 private static Log _log = LogFactoryUtil.getLog(MDRRuleGroupServiceHttp.class);
281 private static final Class<?>[] _addRuleGroupParameterTypes0 = new Class[] {
282 long.class, java.util.Map.class, java.util.Map.class,
283 com.liferay.portal.service.ServiceContext.class
284 };
285 private static final Class<?>[] _copyRuleGroupParameterTypes1 = new Class[] {
286 long.class, long.class,
287 com.liferay.portal.service.ServiceContext.class
288 };
289 private static final Class<?>[] _deleteRuleGroupParameterTypes2 = new Class[] {
290 long.class
291 };
292 private static final Class<?>[] _fetchRuleGroupParameterTypes3 = new Class[] {
293 long.class
294 };
295 private static final Class<?>[] _getRuleGroupParameterTypes4 = new Class[] {
296 long.class
297 };
298 private static final Class<?>[] _updateRuleGroupParameterTypes5 = new Class[] {
299 long.class, java.util.Map.class, java.util.Map.class,
300 com.liferay.portal.service.ServiceContext.class
301 };
302 }