1
22
23 package com.liferay.portlet.messageboards.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.LongWrapper;
28 import com.liferay.portal.kernel.util.MethodWrapper;
29 import com.liferay.portal.security.auth.HttpPrincipal;
30 import com.liferay.portal.service.http.TunnelUtil;
31
32 import com.liferay.portlet.messageboards.service.MBMessageFlagServiceUtil;
33
34
71 public class MBMessageFlagServiceHttp {
72 public static void addAnswerFlag(HttpPrincipal httpPrincipal, long messageId)
73 throws com.liferay.portal.PortalException,
74 com.liferay.portal.SystemException {
75 try {
76 Object paramObj0 = new LongWrapper(messageId);
77
78 MethodWrapper methodWrapper = new MethodWrapper(MBMessageFlagServiceUtil.class.getName(),
79 "addAnswerFlag", new Object[] { paramObj0 });
80
81 try {
82 TunnelUtil.invoke(httpPrincipal, methodWrapper);
83 }
84 catch (Exception e) {
85 if (e instanceof com.liferay.portal.PortalException) {
86 throw (com.liferay.portal.PortalException)e;
87 }
88
89 if (e instanceof com.liferay.portal.SystemException) {
90 throw (com.liferay.portal.SystemException)e;
91 }
92
93 throw new com.liferay.portal.SystemException(e);
94 }
95 }
96 catch (com.liferay.portal.SystemException se) {
97 _log.error(se, se);
98
99 throw se;
100 }
101 }
102
103 public static void deleteAnswerFlag(HttpPrincipal httpPrincipal,
104 long messageId)
105 throws com.liferay.portal.PortalException,
106 com.liferay.portal.SystemException {
107 try {
108 Object paramObj0 = new LongWrapper(messageId);
109
110 MethodWrapper methodWrapper = new MethodWrapper(MBMessageFlagServiceUtil.class.getName(),
111 "deleteAnswerFlag", new Object[] { paramObj0 });
112
113 try {
114 TunnelUtil.invoke(httpPrincipal, methodWrapper);
115 }
116 catch (Exception e) {
117 if (e instanceof com.liferay.portal.PortalException) {
118 throw (com.liferay.portal.PortalException)e;
119 }
120
121 if (e instanceof com.liferay.portal.SystemException) {
122 throw (com.liferay.portal.SystemException)e;
123 }
124
125 throw new com.liferay.portal.SystemException(e);
126 }
127 }
128 catch (com.liferay.portal.SystemException se) {
129 _log.error(se, se);
130
131 throw se;
132 }
133 }
134
135 private static Log _log = LogFactoryUtil.getLog(MBMessageFlagServiceHttp.class);
136 }