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.ListUtil;
020
021 import com.liferay.portlet.journal.service.JournalFolderServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
067 public class JournalFolderServiceSoap {
068 public static com.liferay.portlet.journal.model.JournalFolderSoap addFolder(
069 long groupId, long parentFolderId, java.lang.String name,
070 java.lang.String description,
071 com.liferay.portal.service.ServiceContext serviceContext)
072 throws RemoteException {
073 try {
074 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.addFolder(groupId,
075 parentFolderId, name, description, serviceContext);
076
077 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
078 }
079 catch (Exception e) {
080 _log.error(e, e);
081
082 throw new RemoteException(e.getMessage());
083 }
084 }
085
086 public static void deleteFolder(long folderId) throws RemoteException {
087 try {
088 JournalFolderServiceUtil.deleteFolder(folderId);
089 }
090 catch (Exception e) {
091 _log.error(e, e);
092
093 throw new RemoteException(e.getMessage());
094 }
095 }
096
097 public static void deleteFolder(long folderId, boolean includeTrashedEntries)
098 throws RemoteException {
099 try {
100 JournalFolderServiceUtil.deleteFolder(folderId,
101 includeTrashedEntries);
102 }
103 catch (Exception e) {
104 _log.error(e, e);
105
106 throw new RemoteException(e.getMessage());
107 }
108 }
109
110 public static com.liferay.portlet.journal.model.JournalFolderSoap getFolder(
111 long folderId) throws RemoteException {
112 try {
113 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.getFolder(folderId);
114
115 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
116 }
117 catch (Exception e) {
118 _log.error(e, e);
119
120 throw new RemoteException(e.getMessage());
121 }
122 }
123
124 public static java.lang.Long[] getFolderIds(long groupId, long folderId)
125 throws RemoteException {
126 try {
127 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getFolderIds(groupId,
128 folderId);
129
130 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
140 long groupId) throws RemoteException {
141 try {
142 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
143 JournalFolderServiceUtil.getFolders(groupId);
144
145 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
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, long parentFolderId) throws RemoteException {
156 try {
157 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
158 JournalFolderServiceUtil.getFolders(groupId, parentFolderId);
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, int status)
171 throws RemoteException {
172 try {
173 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
174 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
175 status);
176
177 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
178 }
179 catch (Exception e) {
180 _log.error(e, e);
181
182 throw new RemoteException(e.getMessage());
183 }
184 }
185
186 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
187 long groupId, long parentFolderId, int start, int end)
188 throws RemoteException {
189 try {
190 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
191 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
192 start, end);
193
194 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
195 }
196 catch (Exception e) {
197 _log.error(e, e);
198
199 throw new RemoteException(e.getMessage());
200 }
201 }
202
203 public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
204 long groupId, long parentFolderId, int status, int start, int end)
205 throws RemoteException {
206 try {
207 java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
208 JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
209 status, start, end);
210
211 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
212 }
213 catch (Exception e) {
214 _log.error(e, e);
215
216 throw new RemoteException(e.getMessage());
217 }
218 }
219
220 public static int getFoldersAndArticlesCount(long groupId,
221 Long[] folderIds, int status) throws RemoteException {
222 try {
223 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
224 ListUtil.toList(folderIds), status);
225
226 return 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, long folderId)
236 throws RemoteException {
237 try {
238 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
239 folderId);
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 int status) throws RemoteException {
252 try {
253 int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
254 folderId, status);
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 getFoldersCount(long groupId, long parentFolderId)
266 throws RemoteException {
267 try {
268 int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
269 parentFolderId);
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 void getSubfolderIds(Long[] folderIds, long groupId,
281 long folderId) throws RemoteException {
282 try {
283 JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
284 groupId, folderId);
285 }
286 catch (Exception e) {
287 _log.error(e, e);
288
289 throw new RemoteException(e.getMessage());
290 }
291 }
292
293 public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
294 boolean recurse) throws RemoteException {
295 try {
296 java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getSubfolderIds(groupId,
297 folderId, recurse);
298
299 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
300 }
301 catch (Exception e) {
302 _log.error(e, e);
303
304 throw new RemoteException(e.getMessage());
305 }
306 }
307
308 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolder(
309 long folderId, long parentFolderId,
310 com.liferay.portal.service.ServiceContext serviceContext)
311 throws RemoteException {
312 try {
313 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolder(folderId,
314 parentFolderId, serviceContext);
315
316 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
317 }
318 catch (Exception e) {
319 _log.error(e, e);
320
321 throw new RemoteException(e.getMessage());
322 }
323 }
324
325 public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderFromTrash(
326 long folderId, long parentFolderId,
327 com.liferay.portal.service.ServiceContext serviceContext)
328 throws RemoteException {
329 try {
330 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderFromTrash(folderId,
331 parentFolderId, serviceContext);
332
333 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
334 }
335 catch (Exception e) {
336 _log.error(e, e);
337
338 throw new RemoteException(e.getMessage());
339 }
340 }
341
342 public static void moveFolderToTrash(long folderId)
343 throws RemoteException {
344 try {
345 JournalFolderServiceUtil.moveFolderToTrash(folderId);
346 }
347 catch (Exception e) {
348 _log.error(e, e);
349
350 throw new RemoteException(e.getMessage());
351 }
352 }
353
354 public static void restoreFolderFromTrash(long folderId)
355 throws RemoteException {
356 try {
357 JournalFolderServiceUtil.restoreFolderFromTrash(folderId);
358 }
359 catch (Exception e) {
360 _log.error(e, e);
361
362 throw new RemoteException(e.getMessage());
363 }
364 }
365
366 public static com.liferay.portlet.journal.model.JournalFolderSoap updateFolder(
367 long folderId, long parentFolderId, java.lang.String name,
368 java.lang.String description, boolean mergeWithParentFolder,
369 com.liferay.portal.service.ServiceContext serviceContext)
370 throws RemoteException {
371 try {
372 com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(folderId,
373 parentFolderId, name, description, mergeWithParentFolder,
374 serviceContext);
375
376 return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
377 }
378 catch (Exception e) {
379 _log.error(e, e);
380
381 throw new RemoteException(e.getMessage());
382 }
383 }
384
385 private static Log _log = LogFactoryUtil.getLog(JournalFolderServiceSoap.class);
386 }