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 getFolder(
112 long folderId) throws RemoteException {
113 try {
114 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.getFolder(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 java.lang.Long[] getFolderIds(long groupId, long folderId)
126 throws RemoteException {
127 try {
128 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getFolderIds(groupId,
129 folderId);
130
131 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
132 }
133 catch (Exception e) {
134 _log.error(e, e);
135
136 throw new RemoteException(e.getMessage());
137 }
138 }
139
140 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
141 long groupId) throws RemoteException {
142 try {
143 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
144 JournalFolderServiceUtil.getFolders(groupId);
145
146 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
147 }
148 catch (Exception e) {
149 _log.error(e, e);
150
151 throw new RemoteException(e.getMessage());
152 }
153 }
154
155 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
156 long groupId, long parentFolderId) throws RemoteException {
157 try {
158 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
159 JournalFolderServiceUtil.getFolders(groupId, parentFolderId);
160
161 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
162 }
163 catch (Exception e) {
164 _log.error(e, e);
165
166 throw new RemoteException(e.getMessage());
167 }
168 }
169
170 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
171 long groupId, long parentFolderId, int status)
172 throws RemoteException {
173 try {
174 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
175 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
176 status);
177
178 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
179 }
180 catch (Exception e) {
181 _log.error(e, e);
182
183 throw new RemoteException(e.getMessage());
184 }
185 }
186
187 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
188 long groupId, long parentFolderId, int start, int end)
189 throws RemoteException {
190 try {
191 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
192 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
193 start, end);
194
195 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
196 }
197 catch (Exception e) {
198 _log.error(e, e);
199
200 throw new RemoteException(e.getMessage());
201 }
202 }
203
204 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
205 long groupId, long parentFolderId, int status, int start, int end)
206 throws RemoteException {
207 try {
208 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
209 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
210 status, start, end);
211
212 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
213 }
214 catch (Exception e) {
215 _log.error(e, e);
216
217 throw new RemoteException(e.getMessage());
218 }
219 }
220
221 public static int getFoldersAndArticlesCount(long groupId,
222 Long[] folderIds, int status) throws RemoteException {
223 try {
224 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
225 ListUtil.toList(folderIds), status);
226
227 return returnValue;
228 }
229 catch (Exception e) {
230 _log.error(e, e);
231
232 throw new RemoteException(e.getMessage());
233 }
234 }
235
236 public static int getFoldersAndArticlesCount(long groupId, long folderId)
237 throws RemoteException {
238 try {
239 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
240 folderId);
241
242 return returnValue;
243 }
244 catch (Exception e) {
245 _log.error(e, e);
246
247 throw new RemoteException(e.getMessage());
248 }
249 }
250
251 public static int getFoldersAndArticlesCount(long groupId, long folderId,
252 int status) throws RemoteException {
253 try {
254 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
255 folderId, status);
256
257 return returnValue;
258 }
259 catch (Exception e) {
260 _log.error(e, e);
261
262 throw new RemoteException(e.getMessage());
263 }
264 }
265
266 public static int getFoldersCount(long groupId, long parentFolderId)
267 throws RemoteException {
268 try {
269 int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
270 parentFolderId);
271
272 return returnValue;
273 }
274 catch (Exception e) {
275 _log.error(e, e);
276
277 throw new RemoteException(e.getMessage());
278 }
279 }
280
281 public static int getFoldersCount(long groupId, long parentFolderId,
282 int status) throws RemoteException {
283 try {
284 int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
285 parentFolderId, status);
286
287 return returnValue;
288 }
289 catch (Exception e) {
290 _log.error(e, e);
291
292 throw new RemoteException(e.getMessage());
293 }
294 }
295
296 public static void getSubfolderIds(Long[] folderIds, long groupId,
297 long folderId) throws RemoteException {
298 try {
299 JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
300 groupId, folderId);
301 }
302 catch (Exception e) {
303 _log.error(e, e);
304
305 throw new RemoteException(e.getMessage());
306 }
307 }
308
309 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
310 boolean recurse) throws RemoteException {
311 try {
312 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getSubfolderIds(groupId,
313 folderId, recurse);
314
315 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
316 }
317 catch (Exception e) {
318 _log.error(e, e);
319
320 throw new RemoteException(e.getMessage());
321 }
322 }
323
324 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolder(
325 long folderId, long parentFolderId,
326 com.liferay.portal.service.ServiceContext serviceContext)
327 throws RemoteException {
328 try {
329 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolder(folderId,
330 parentFolderId, serviceContext);
331
332 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
333 }
334 catch (Exception e) {
335 _log.error(e, e);
336
337 throw new RemoteException(e.getMessage());
338 }
339 }
340
341 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderFromTrash(
342 long folderId, long parentFolderId,
343 com.liferay.portal.service.ServiceContext serviceContext)
344 throws RemoteException {
345 try {
346 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderFromTrash(folderId,
347 parentFolderId, serviceContext);
348
349 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
350 }
351 catch (Exception e) {
352 _log.error(e, e);
353
354 throw new RemoteException(e.getMessage());
355 }
356 }
357
358 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderToTrash(
359 long folderId) throws RemoteException {
360 try {
361 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderToTrash(folderId);
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 void restoreFolderFromTrash(long folderId)
373 throws RemoteException {
374 try {
375 JournalFolderServiceUtil.restoreFolderFromTrash(folderId);
376 }
377 catch (Exception e) {
378 _log.error(e, e);
379
380 throw new RemoteException(e.getMessage());
381 }
382 }
383
384 public static com.liferay.portlet.journal.model.JournalFolderSoap updateFolder(
385 long folderId, long parentFolderId, java.lang.String name,
386 java.lang.String description, boolean mergeWithParentFolder,
387 com.liferay.portal.service.ServiceContext serviceContext)
388 throws RemoteException {
389 try {
390 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(folderId,
391 parentFolderId, name, description, mergeWithParentFolder,
392 serviceContext);
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 private static Log _log = LogFactoryUtil.getLog(JournalFolderServiceSoap.class);
404 }