1
14
15 package com.liferay.portlet.announcements.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.announcements.service.AnnouncementsDeliveryServiceUtil;
25
26
63 public class AnnouncementsDeliveryServiceHttp {
64 public static com.liferay.portlet.announcements.model.AnnouncementsDelivery updateDelivery(
65 HttpPrincipal httpPrincipal, long userId, java.lang.String type,
66 boolean email, boolean sms, boolean website)
67 throws com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException {
69 try {
70 MethodKey methodKey = new MethodKey(AnnouncementsDeliveryServiceUtil.class.getName(),
71 "updateDelivery", _updateDeliveryParameterTypes0);
72
73 MethodHandler methodHandler = new MethodHandler(methodKey, userId,
74 type, email, sms, website);
75
76 Object returnObj = null;
77
78 try {
79 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
80 }
81 catch (Exception e) {
82 if (e instanceof com.liferay.portal.PortalException) {
83 throw (com.liferay.portal.PortalException)e;
84 }
85
86 if (e instanceof com.liferay.portal.SystemException) {
87 throw (com.liferay.portal.SystemException)e;
88 }
89
90 throw new com.liferay.portal.SystemException(e);
91 }
92
93 return (com.liferay.portlet.announcements.model.AnnouncementsDelivery)returnObj;
94 }
95 catch (com.liferay.portal.SystemException se) {
96 _log.error(se, se);
97
98 throw se;
99 }
100 }
101
102 private static Log _log = LogFactoryUtil.getLog(AnnouncementsDeliveryServiceHttp.class);
103 private static final Class<?>[] _updateDeliveryParameterTypes0 = new Class[] {
104 long.class, java.lang.String.class, boolean.class, boolean.class,
105 boolean.class
106 };
107 }