001
014
015 package com.liferay.portlet.journal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.ListUtil;
022
023 import com.liferay.portlet.journal.service.JournalFolderServiceUtil;
024
025 import java.rmi.RemoteException;
026
027
067 @ProviderType
068 public class JournalFolderServiceSoap {
069 public static com.liferay.portlet.journal.model.JournalFolderSoap addFolder(
070 long groupId, long parentFolderId, java.lang.String name,
071 java.lang.String description,
072 com.liferay.portal.service.ServiceContext serviceContext)
073 throws RemoteException {
074 try {
075 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.addFolder(groupId,
076 parentFolderId, name, description, serviceContext);
077
078 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
079 }
080 catch (Exception e) {
081 _log.error(e, e);
082
083 throw new RemoteException(e.getMessage());
084 }
085 }
086
087 public static void deleteFolder(long folderId) throws RemoteException {
088 try {
089 JournalFolderServiceUtil.deleteFolder(folderId);
090 }
091 catch (Exception e) {
092 _log.error(e, e);
093
094 throw new RemoteException(e.getMessage());
095 }
096 }
097
098 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
099 throws RemoteException {
100 try {
101 JournalFolderServiceUtil.deleteFolder(folderId,
102 includeTrashedEntries);
103 }
104 catch (Exception e) {
105 _log.error(e, e);
106
107 throw new RemoteException(e.getMessage());
108 }
109 }
110
111 public static com.liferay.portlet.journal.model.JournalFolderSoap fetchFolder(
112 long folderId) throws RemoteException {
113 try {
114 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.fetchFolder(folderId);
115
116 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
117 }
118 catch (Exception e) {
119 _log.error(e, e);
120
121 throw new RemoteException(e.getMessage());
122 }
123 }
124
125 public static com.liferay.portlet.journal.model.JournalFolderSoap getFolder(
126 long folderId) throws RemoteException {
127 try {
128 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.getFolder(folderId);
129
130 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static java.lang.Long[] getFolderIds(long groupId, long folderId)
140 throws RemoteException {
141 try {
142 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getFolderIds(groupId,
143 folderId);
144
145 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
155 long groupId) throws RemoteException {
156 try {
157 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
158 JournalFolderServiceUtil.getFolders(groupId);
159
160 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
161 }
162 catch (Exception e) {
163 _log.error(e, e);
164
165 throw new RemoteException(e.getMessage());
166 }
167 }
168
169 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
170 long groupId, long parentFolderId) throws RemoteException {
171 try {
172 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
173 JournalFolderServiceUtil.getFolders(groupId, parentFolderId);
174
175 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
176 }
177 catch (Exception e) {
178 _log.error(e, e);
179
180 throw new RemoteException(e.getMessage());
181 }
182 }
183
184 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
185 long groupId, long parentFolderId, int status)
186 throws RemoteException {
187 try {
188 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
189 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
190 status);
191
192 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
193 }
194 catch (Exception e) {
195 _log.error(e, e);
196
197 throw new RemoteException(e.getMessage());
198 }
199 }
200
201 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
202 long groupId, long parentFolderId, int start, int end)
203 throws RemoteException {
204 try {
205 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
206 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
207 start, end);
208
209 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
210 }
211 catch (Exception e) {
212 _log.error(e, e);
213
214 throw new RemoteException(e.getMessage());
215 }
216 }
217
218 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
219 long groupId, long parentFolderId, int status, int start, int end)
220 throws RemoteException {
221 try {
222 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
223 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
224 status, start, end);
225
226 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
227 }
228 catch (Exception e) {
229 _log.error(e, e);
230
231 throw new RemoteException(e.getMessage());
232 }
233 }
234
235 public static int getFoldersAndArticlesCount(long groupId,
236 Long[] folderIds, int status) throws RemoteException {
237 try {
238 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
239 ListUtil.toList(folderIds), status);
240
241 return returnValue;
242 }
243 catch (Exception e) {
244 _log.error(e, e);
245
246 throw new RemoteException(e.getMessage());
247 }
248 }
249
250 public static int getFoldersAndArticlesCount(long groupId, long folderId)
251 throws RemoteException {
252 try {
253 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
254 folderId);
255
256 return returnValue;
257 }
258 catch (Exception e) {
259 _log.error(e, e);
260
261 throw new RemoteException(e.getMessage());
262 }
263 }
264
265 public static int getFoldersAndArticlesCount(long groupId, long folderId,
266 int status) throws RemoteException {
267 try {
268 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
269 folderId, status);
270
271 return returnValue;
272 }
273 catch (Exception e) {
274 _log.error(e, e);
275
276 throw new RemoteException(e.getMessage());
277 }
278 }
279
280 public static int getFoldersCount(long groupId, long parentFolderId)
281 throws RemoteException {
282 try {
283 int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
284 parentFolderId);
285
286 return returnValue;
287 }
288 catch (Exception e) {
289 _log.error(e, e);
290
291 throw new RemoteException(e.getMessage());
292 }
293 }
294
295 public static int getFoldersCount(long groupId, long parentFolderId,
296 int status) throws RemoteException {
297 try {
298 int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
299 parentFolderId, status);
300
301 return returnValue;
302 }
303 catch (Exception e) {
304 _log.error(e, e);
305
306 throw new RemoteException(e.getMessage());
307 }
308 }
309
310
314 public static void getSubfolderIds(Long[] folderIds, long groupId,
315 long folderId) throws RemoteException {
316 try {
317 JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
318 groupId, folderId);
319 }
320 catch (Exception e) {
321 _log.error(e, e);
322
323 throw new RemoteException(e.getMessage());
324 }
325 }
326
327 public static void getSubfolderIds(Long[] folderIds, long groupId,
328 long folderId, boolean recurse) throws RemoteException {
329 try {
330 JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
331 groupId, folderId, recurse);
332 }
333 catch (Exception e) {
334 _log.error(e, e);
335
336 throw new RemoteException(e.getMessage());
337 }
338 }
339
340 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
341 boolean recurse) throws RemoteException {
342 try {
343 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getSubfolderIds(groupId,
344 folderId, recurse);
345
346 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
347 }
348 catch (Exception e) {
349 _log.error(e, e);
350
351 throw new RemoteException(e.getMessage());
352 }
353 }
354
355 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolder(
356 long folderId, long parentFolderId,
357 com.liferay.portal.service.ServiceContext serviceContext)
358 throws RemoteException {
359 try {
360 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolder(folderId,
361 parentFolderId, serviceContext);
362
363 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
364 }
365 catch (Exception e) {
366 _log.error(e, e);
367
368 throw new RemoteException(e.getMessage());
369 }
370 }
371
372 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderFromTrash(
373 long folderId, long parentFolderId,
374 com.liferay.portal.service.ServiceContext serviceContext)
375 throws RemoteException {
376 try {
377 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderFromTrash(folderId,
378 parentFolderId, serviceContext);
379
380 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
381 }
382 catch (Exception e) {
383 _log.error(e, e);
384
385 throw new RemoteException(e.getMessage());
386 }
387 }
388
389 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderToTrash(
390 long folderId) throws RemoteException {
391 try {
392 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderToTrash(folderId);
393
394 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
395 }
396 catch (Exception e) {
397 _log.error(e, e);
398
399 throw new RemoteException(e.getMessage());
400 }
401 }
402
403 public static void restoreFolderFromTrash(long folderId)
404 throws RemoteException {
405 try {
406 JournalFolderServiceUtil.restoreFolderFromTrash(folderId);
407 }
408 catch (Exception e) {
409 _log.error(e, e);
410
411 throw new RemoteException(e.getMessage());
412 }
413 }
414
415 public static com.liferay.portlet.journal.model.JournalFolderSoap updateFolder(
416 long folderId, long parentFolderId, java.lang.String name,
417 java.lang.String description, boolean mergeWithParentFolder,
418 com.liferay.portal.service.ServiceContext serviceContext)
419 throws RemoteException {
420 try {
421 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(folderId,
422 parentFolderId, name, description, mergeWithParentFolder,
423 serviceContext);
424
425 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
426 }
427 catch (Exception e) {
428 _log.error(e, e);
429
430 throw new RemoteException(e.getMessage());
431 }
432 }
433
434 private static Log _log = LogFactoryUtil.getLog(JournalFolderServiceSoap.class);
435 }