001
014
015 package com.liferay.portlet.journal.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.journal.service.JournalFeedServiceUtil;
025
026
054 public class JournalFeedServiceHttp {
055 public static com.liferay.portlet.journal.model.JournalFeed addFeed(
056 HttpPrincipal httpPrincipal, long groupId, java.lang.String feedId,
057 boolean autoFeedId, java.lang.String name,
058 java.lang.String description, java.lang.String type,
059 java.lang.String structureId, java.lang.String templateId,
060 java.lang.String rendererTemplateId, int delta,
061 java.lang.String orderByCol, java.lang.String orderByType,
062 java.lang.String targetLayoutFriendlyUrl,
063 java.lang.String targetPortletId, java.lang.String contentField,
064 java.lang.String feedType, double feedVersion,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 try {
069 MethodKey methodKey = new MethodKey(JournalFeedServiceUtil.class,
070 "addFeed", _addFeedParameterTypes0);
071
072 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
073 feedId, autoFeedId, name, description, type, structureId,
074 templateId, rendererTemplateId, delta, orderByCol,
075 orderByType, targetLayoutFriendlyUrl, targetPortletId,
076 contentField, feedType, feedVersion, serviceContext);
077
078 Object returnObj = null;
079
080 try {
081 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
082 }
083 catch (Exception e) {
084 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
085 throw (com.liferay.portal.kernel.exception.PortalException)e;
086 }
087
088 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
089 throw (com.liferay.portal.kernel.exception.SystemException)e;
090 }
091
092 throw new com.liferay.portal.kernel.exception.SystemException(e);
093 }
094
095 return (com.liferay.portlet.journal.model.JournalFeed)returnObj;
096 }
097 catch (com.liferay.portal.kernel.exception.SystemException se) {
098 _log.error(se, se);
099
100 throw se;
101 }
102 }
103
104 public static void deleteFeed(HttpPrincipal httpPrincipal, long groupId,
105 long feedId)
106 throws com.liferay.portal.kernel.exception.PortalException,
107 com.liferay.portal.kernel.exception.SystemException {
108 try {
109 MethodKey methodKey = new MethodKey(JournalFeedServiceUtil.class,
110 "deleteFeed", _deleteFeedParameterTypes1);
111
112 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
113 feedId);
114
115 try {
116 TunnelUtil.invoke(httpPrincipal, methodHandler);
117 }
118 catch (Exception e) {
119 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
120 throw (com.liferay.portal.kernel.exception.PortalException)e;
121 }
122
123 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
124 throw (com.liferay.portal.kernel.exception.SystemException)e;
125 }
126
127 throw new com.liferay.portal.kernel.exception.SystemException(e);
128 }
129 }
130 catch (com.liferay.portal.kernel.exception.SystemException se) {
131 _log.error(se, se);
132
133 throw se;
134 }
135 }
136
137 public static void deleteFeed(HttpPrincipal httpPrincipal, long groupId,
138 java.lang.String feedId)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 try {
142 MethodKey methodKey = new MethodKey(JournalFeedServiceUtil.class,
143 "deleteFeed", _deleteFeedParameterTypes2);
144
145 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
146 feedId);
147
148 try {
149 TunnelUtil.invoke(httpPrincipal, methodHandler);
150 }
151 catch (Exception e) {
152 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
153 throw (com.liferay.portal.kernel.exception.PortalException)e;
154 }
155
156 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
157 throw (com.liferay.portal.kernel.exception.SystemException)e;
158 }
159
160 throw new com.liferay.portal.kernel.exception.SystemException(e);
161 }
162 }
163 catch (com.liferay.portal.kernel.exception.SystemException se) {
164 _log.error(se, se);
165
166 throw se;
167 }
168 }
169
170 public static com.liferay.portlet.journal.model.JournalFeed getFeed(
171 HttpPrincipal httpPrincipal, long groupId, long feedId)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException {
174 try {
175 MethodKey methodKey = new MethodKey(JournalFeedServiceUtil.class,
176 "getFeed", _getFeedParameterTypes3);
177
178 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
179 feedId);
180
181 Object returnObj = null;
182
183 try {
184 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
185 }
186 catch (Exception e) {
187 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
188 throw (com.liferay.portal.kernel.exception.PortalException)e;
189 }
190
191 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
192 throw (com.liferay.portal.kernel.exception.SystemException)e;
193 }
194
195 throw new com.liferay.portal.kernel.exception.SystemException(e);
196 }
197
198 return (com.liferay.portlet.journal.model.JournalFeed)returnObj;
199 }
200 catch (com.liferay.portal.kernel.exception.SystemException se) {
201 _log.error(se, se);
202
203 throw se;
204 }
205 }
206
207 public static com.liferay.portlet.journal.model.JournalFeed getFeed(
208 HttpPrincipal httpPrincipal, long groupId, java.lang.String feedId)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException {
211 try {
212 MethodKey methodKey = new MethodKey(JournalFeedServiceUtil.class,
213 "getFeed", _getFeedParameterTypes4);
214
215 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
216 feedId);
217
218 Object returnObj = null;
219
220 try {
221 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
222 }
223 catch (Exception e) {
224 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
225 throw (com.liferay.portal.kernel.exception.PortalException)e;
226 }
227
228 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
229 throw (com.liferay.portal.kernel.exception.SystemException)e;
230 }
231
232 throw new com.liferay.portal.kernel.exception.SystemException(e);
233 }
234
235 return (com.liferay.portlet.journal.model.JournalFeed)returnObj;
236 }
237 catch (com.liferay.portal.kernel.exception.SystemException se) {
238 _log.error(se, se);
239
240 throw se;
241 }
242 }
243
244 public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
245 HttpPrincipal httpPrincipal, long groupId, java.lang.String feedId,
246 java.lang.String name, java.lang.String description,
247 java.lang.String type, java.lang.String structureId,
248 java.lang.String templateId, java.lang.String rendererTemplateId,
249 int delta, java.lang.String orderByCol, java.lang.String orderByType,
250 java.lang.String targetLayoutFriendlyUrl,
251 java.lang.String targetPortletId, java.lang.String contentField,
252 java.lang.String feedType, double feedVersion,
253 com.liferay.portal.service.ServiceContext serviceContext)
254 throws com.liferay.portal.kernel.exception.PortalException,
255 com.liferay.portal.kernel.exception.SystemException {
256 try {
257 MethodKey methodKey = new MethodKey(JournalFeedServiceUtil.class,
258 "updateFeed", _updateFeedParameterTypes5);
259
260 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
261 feedId, name, description, type, structureId, templateId,
262 rendererTemplateId, delta, orderByCol, orderByType,
263 targetLayoutFriendlyUrl, targetPortletId, contentField,
264 feedType, feedVersion, serviceContext);
265
266 Object returnObj = null;
267
268 try {
269 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
270 }
271 catch (Exception e) {
272 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
273 throw (com.liferay.portal.kernel.exception.PortalException)e;
274 }
275
276 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
277 throw (com.liferay.portal.kernel.exception.SystemException)e;
278 }
279
280 throw new com.liferay.portal.kernel.exception.SystemException(e);
281 }
282
283 return (com.liferay.portlet.journal.model.JournalFeed)returnObj;
284 }
285 catch (com.liferay.portal.kernel.exception.SystemException se) {
286 _log.error(se, se);
287
288 throw se;
289 }
290 }
291
292 private static Log _log = LogFactoryUtil.getLog(JournalFeedServiceHttp.class);
293 private static final Class<?>[] _addFeedParameterTypes0 = new Class[] {
294 long.class, java.lang.String.class, boolean.class,
295 java.lang.String.class, java.lang.String.class,
296 java.lang.String.class, java.lang.String.class,
297 java.lang.String.class, java.lang.String.class, int.class,
298 java.lang.String.class, java.lang.String.class,
299 java.lang.String.class, java.lang.String.class,
300 java.lang.String.class, java.lang.String.class, double.class,
301 com.liferay.portal.service.ServiceContext.class
302 };
303 private static final Class<?>[] _deleteFeedParameterTypes1 = new Class[] {
304 long.class, long.class
305 };
306 private static final Class<?>[] _deleteFeedParameterTypes2 = new Class[] {
307 long.class, java.lang.String.class
308 };
309 private static final Class<?>[] _getFeedParameterTypes3 = new Class[] {
310 long.class, long.class
311 };
312 private static final Class<?>[] _getFeedParameterTypes4 = new Class[] {
313 long.class, java.lang.String.class
314 };
315 private static final Class<?>[] _updateFeedParameterTypes5 = new Class[] {
316 long.class, java.lang.String.class, java.lang.String.class,
317 java.lang.String.class, java.lang.String.class,
318 java.lang.String.class, java.lang.String.class,
319 java.lang.String.class, int.class, java.lang.String.class,
320 java.lang.String.class, java.lang.String.class,
321 java.lang.String.class, java.lang.String.class,
322 java.lang.String.class, double.class,
323 com.liferay.portal.service.ServiceContext.class
324 };
325 }