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.JournalTemplateServiceUtil;
025
026
056 public class JournalTemplateServiceHttp {
057 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
058 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
059 boolean autoTemplateId, java.lang.String structureId,
060 java.lang.String name, java.lang.String description,
061 java.lang.String xsl, boolean formatXsl, java.lang.String langType,
062 boolean cacheable,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 try {
067 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
068 "addTemplate", _addTemplateParameterTypes0);
069
070 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
071 templateId, autoTemplateId, structureId, name, description,
072 xsl, formatXsl, langType, cacheable, serviceContext);
073
074 Object returnObj = null;
075
076 try {
077 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
078 }
079 catch (Exception e) {
080 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
081 throw (com.liferay.portal.kernel.exception.PortalException)e;
082 }
083
084 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
085 throw (com.liferay.portal.kernel.exception.SystemException)e;
086 }
087
088 throw new com.liferay.portal.kernel.exception.SystemException(e);
089 }
090
091 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
092 }
093 catch (com.liferay.portal.kernel.exception.SystemException se) {
094 _log.error(se, se);
095
096 throw se;
097 }
098 }
099
100 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
101 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
102 boolean autoTemplateId, java.lang.String structureId,
103 java.lang.String name, java.lang.String description,
104 java.lang.String xsl, boolean formatXsl, java.lang.String langType,
105 boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
106 java.io.File smallFile,
107 com.liferay.portal.service.ServiceContext serviceContext)
108 throws com.liferay.portal.kernel.exception.PortalException,
109 com.liferay.portal.kernel.exception.SystemException {
110 try {
111 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
112 "addTemplate", _addTemplateParameterTypes1);
113
114 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
115 templateId, autoTemplateId, structureId, name, description,
116 xsl, formatXsl, langType, cacheable, smallImage,
117 smallImageURL, smallFile, serviceContext);
118
119 Object returnObj = null;
120
121 try {
122 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
123 }
124 catch (Exception e) {
125 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
126 throw (com.liferay.portal.kernel.exception.PortalException)e;
127 }
128
129 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
130 throw (com.liferay.portal.kernel.exception.SystemException)e;
131 }
132
133 throw new com.liferay.portal.kernel.exception.SystemException(e);
134 }
135
136 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
137 }
138 catch (com.liferay.portal.kernel.exception.SystemException se) {
139 _log.error(se, se);
140
141 throw se;
142 }
143 }
144
145 public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
146 HttpPrincipal httpPrincipal, long groupId,
147 java.lang.String oldTemplateId, java.lang.String newTemplateId,
148 boolean autoTemplateId)
149 throws com.liferay.portal.kernel.exception.PortalException,
150 com.liferay.portal.kernel.exception.SystemException {
151 try {
152 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
153 "copyTemplate", _copyTemplateParameterTypes2);
154
155 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
156 oldTemplateId, newTemplateId, autoTemplateId);
157
158 Object returnObj = null;
159
160 try {
161 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
162 }
163 catch (Exception e) {
164 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
165 throw (com.liferay.portal.kernel.exception.PortalException)e;
166 }
167
168 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
169 throw (com.liferay.portal.kernel.exception.SystemException)e;
170 }
171
172 throw new com.liferay.portal.kernel.exception.SystemException(e);
173 }
174
175 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
176 }
177 catch (com.liferay.portal.kernel.exception.SystemException se) {
178 _log.error(se, se);
179
180 throw se;
181 }
182 }
183
184 public static void deleteTemplate(HttpPrincipal httpPrincipal,
185 long groupId, java.lang.String templateId)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 try {
189 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
190 "deleteTemplate", _deleteTemplateParameterTypes3);
191
192 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
193 templateId);
194
195 try {
196 TunnelUtil.invoke(httpPrincipal, methodHandler);
197 }
198 catch (Exception e) {
199 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
200 throw (com.liferay.portal.kernel.exception.PortalException)e;
201 }
202
203 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
204 throw (com.liferay.portal.kernel.exception.SystemException)e;
205 }
206
207 throw new com.liferay.portal.kernel.exception.SystemException(e);
208 }
209 }
210 catch (com.liferay.portal.kernel.exception.SystemException se) {
211 _log.error(se, se);
212
213 throw se;
214 }
215 }
216
217 public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
218 HttpPrincipal httpPrincipal, long groupId, java.lang.String structureId)
219 throws com.liferay.portal.kernel.exception.PortalException,
220 com.liferay.portal.kernel.exception.SystemException {
221 try {
222 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
223 "getStructureTemplates",
224 _getStructureTemplatesParameterTypes4);
225
226 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
227 structureId);
228
229 Object returnObj = null;
230
231 try {
232 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
233 }
234 catch (Exception e) {
235 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
236 throw (com.liferay.portal.kernel.exception.PortalException)e;
237 }
238
239 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
240 throw (com.liferay.portal.kernel.exception.SystemException)e;
241 }
242
243 throw new com.liferay.portal.kernel.exception.SystemException(e);
244 }
245
246 return (java.util.List<com.liferay.portlet.journal.model.JournalTemplate>)returnObj;
247 }
248 catch (com.liferay.portal.kernel.exception.SystemException se) {
249 _log.error(se, se);
250
251 throw se;
252 }
253 }
254
255 public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
256 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId)
257 throws com.liferay.portal.kernel.exception.PortalException,
258 com.liferay.portal.kernel.exception.SystemException {
259 try {
260 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
261 "getTemplate", _getTemplateParameterTypes5);
262
263 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
264 templateId);
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.JournalTemplate)returnObj;
284 }
285 catch (com.liferay.portal.kernel.exception.SystemException se) {
286 _log.error(se, se);
287
288 throw se;
289 }
290 }
291
292 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
293 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
294 java.lang.String structureId, java.lang.String name,
295 java.lang.String description, java.lang.String xsl, boolean formatXsl,
296 java.lang.String langType, boolean cacheable,
297 com.liferay.portal.service.ServiceContext serviceContext)
298 throws com.liferay.portal.kernel.exception.PortalException,
299 com.liferay.portal.kernel.exception.SystemException {
300 try {
301 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
302 "updateTemplate", _updateTemplateParameterTypes6);
303
304 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
305 templateId, structureId, name, description, xsl, formatXsl,
306 langType, cacheable, serviceContext);
307
308 Object returnObj = null;
309
310 try {
311 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
312 }
313 catch (Exception e) {
314 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
315 throw (com.liferay.portal.kernel.exception.PortalException)e;
316 }
317
318 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
319 throw (com.liferay.portal.kernel.exception.SystemException)e;
320 }
321
322 throw new com.liferay.portal.kernel.exception.SystemException(e);
323 }
324
325 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
326 }
327 catch (com.liferay.portal.kernel.exception.SystemException se) {
328 _log.error(se, se);
329
330 throw se;
331 }
332 }
333
334 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
335 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
336 java.lang.String structureId, java.lang.String name,
337 java.lang.String description, java.lang.String xsl, boolean formatXsl,
338 java.lang.String langType, boolean cacheable, boolean smallImage,
339 java.lang.String smallImageURL, java.io.File smallFile,
340 com.liferay.portal.service.ServiceContext serviceContext)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 try {
344 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
345 "updateTemplate", _updateTemplateParameterTypes7);
346
347 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
348 templateId, structureId, name, description, xsl, formatXsl,
349 langType, cacheable, smallImage, smallImageURL, smallFile,
350 serviceContext);
351
352 Object returnObj = null;
353
354 try {
355 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
356 }
357 catch (Exception e) {
358 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
359 throw (com.liferay.portal.kernel.exception.PortalException)e;
360 }
361
362 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
363 throw (com.liferay.portal.kernel.exception.SystemException)e;
364 }
365
366 throw new com.liferay.portal.kernel.exception.SystemException(e);
367 }
368
369 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
370 }
371 catch (com.liferay.portal.kernel.exception.SystemException se) {
372 _log.error(se, se);
373
374 throw se;
375 }
376 }
377
378 private static Log _log = LogFactoryUtil.getLog(JournalTemplateServiceHttp.class);
379 private static final Class<?>[] _addTemplateParameterTypes0 = new Class[] {
380 long.class, java.lang.String.class, boolean.class,
381 java.lang.String.class, java.lang.String.class,
382 java.lang.String.class, java.lang.String.class, boolean.class,
383 java.lang.String.class, boolean.class,
384 com.liferay.portal.service.ServiceContext.class
385 };
386 private static final Class<?>[] _addTemplateParameterTypes1 = new Class[] {
387 long.class, java.lang.String.class, boolean.class,
388 java.lang.String.class, java.lang.String.class,
389 java.lang.String.class, java.lang.String.class, boolean.class,
390 java.lang.String.class, boolean.class, boolean.class,
391 java.lang.String.class, java.io.File.class,
392 com.liferay.portal.service.ServiceContext.class
393 };
394 private static final Class<?>[] _copyTemplateParameterTypes2 = new Class[] {
395 long.class, java.lang.String.class, java.lang.String.class,
396 boolean.class
397 };
398 private static final Class<?>[] _deleteTemplateParameterTypes3 = new Class[] {
399 long.class, java.lang.String.class
400 };
401 private static final Class<?>[] _getStructureTemplatesParameterTypes4 = new Class[] {
402 long.class, java.lang.String.class
403 };
404 private static final Class<?>[] _getTemplateParameterTypes5 = new Class[] {
405 long.class, java.lang.String.class
406 };
407 private static final Class<?>[] _updateTemplateParameterTypes6 = new Class[] {
408 long.class, java.lang.String.class, java.lang.String.class,
409 java.lang.String.class, java.lang.String.class,
410 java.lang.String.class, boolean.class, java.lang.String.class,
411 boolean.class, com.liferay.portal.service.ServiceContext.class
412 };
413 private static final Class<?>[] _updateTemplateParameterTypes7 = new Class[] {
414 long.class, java.lang.String.class, java.lang.String.class,
415 java.lang.String.class, java.lang.String.class,
416 java.lang.String.class, boolean.class, java.lang.String.class,
417 boolean.class, boolean.class, java.lang.String.class,
418 java.io.File.class, com.liferay.portal.service.ServiceContext.class
419 };
420 }