001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.documentlibrary.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.documentlibrary.service.DLAppServiceUtil; 024 025 import java.rmi.RemoteException; 026 027 /** 028 * Provides the SOAP utility for the 029 * {@link DLAppServiceUtil} service utility. The 030 * static methods of this class calls the same methods of the service utility. 031 * However, the signatures are different because it is difficult for SOAP to 032 * support certain types. 033 * 034 * <p> 035 * The benefits of using the SOAP utility is that it is cross platform 036 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 037 * even Perl, to call the generated services. One drawback of SOAP is that it is 038 * slow because it needs to serialize all calls into a text format (XML). 039 * </p> 040 * 041 * <p> 042 * You can see a list of services at http://localhost:8080/api/axis. Set the 043 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 044 * security. 045 * </p> 046 * 047 * <p> 048 * The SOAP utility is only generated for remote services. 049 * </p> 050 * 051 * @author Brian Wing Shun Chan 052 * @see DLAppServiceHttp 053 * @see DLAppServiceUtil 054 * @generated 055 */ 056 @ProviderType 057 public class DLAppServiceSoap { 058 /** 059 * Adds a file entry and associated metadata. It is created based on a byte 060 * array. 061 * 062 * <p> 063 * This method takes two file names, the <code>sourceFileName</code> and the 064 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 065 * name of the actual file being uploaded. The <code>title</code> 066 * corresponds to a name the client wishes to assign this file after it has 067 * been uploaded to the portal. If it is <code>null</code>, the <code> 068 * sourceFileName</code> will be used. 069 * </p> 070 * 071 * @param repositoryId the primary key of the repository 072 * @param folderId the primary key of the file entry's parent folder 073 * @param sourceFileName the original file's name 074 * @param mimeType the file's MIME type 075 * @param title the name to be assigned to the file (optionally <code>null 076 </code>) 077 * @param description the file's description 078 * @param changeLog the file's version change log 079 * @param bytes the file's data (optionally <code>null</code>) 080 * @param serviceContext the service context to be applied. Can set the 081 asset category IDs, asset tag names, and expando bridge 082 attributes for the file entry. In a Liferay repository, it may 083 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 084 type </li> <li> fieldsMap - mapping for fields associated with a 085 custom file entry type </li> </ul> 086 * @return the file entry 087 * @throws PortalException if the parent folder could not be found or if the 088 file entry's information was invalid 089 */ 090 public static com.liferay.portal.kernel.repository.model.FileEntrySoap addFileEntry( 091 long repositoryId, long folderId, java.lang.String sourceFileName, 092 java.lang.String mimeType, java.lang.String title, 093 java.lang.String description, java.lang.String changeLog, byte[] bytes, 094 com.liferay.portal.service.ServiceContext serviceContext) 095 throws RemoteException { 096 try { 097 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.addFileEntry(repositoryId, 098 folderId, sourceFileName, mimeType, title, description, 099 changeLog, bytes, serviceContext); 100 101 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 102 } 103 catch (Exception e) { 104 _log.error(e, e); 105 106 throw new RemoteException(e.getMessage()); 107 } 108 } 109 110 /** 111 * Adds a folder. 112 * 113 * @param repositoryId the primary key of the repository 114 * @param parentFolderId the primary key of the folder's parent folder 115 * @param name the folder's name 116 * @param description the folder's description 117 * @param serviceContext the service context to be applied. In a Liferay 118 repository, it may include boolean mountPoint specifying whether 119 folder is a facade for mounting a third-party repository 120 * @return the folder 121 * @throws PortalException if the parent folder could not be found or if the 122 new folder's information was invalid 123 */ 124 public static com.liferay.portal.kernel.repository.model.FolderSoap addFolder( 125 long repositoryId, long parentFolderId, java.lang.String name, 126 java.lang.String description, 127 com.liferay.portal.service.ServiceContext serviceContext) 128 throws RemoteException { 129 try { 130 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.addFolder(repositoryId, 131 parentFolderId, name, description, serviceContext); 132 133 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 134 } 135 catch (Exception e) { 136 _log.error(e, e); 137 138 throw new RemoteException(e.getMessage()); 139 } 140 } 141 142 /** 143 * Cancels the check out of the file entry. If a user has not checked out 144 * the specified file entry, invoking this method will result in no changes. 145 * 146 * <p> 147 * When a file entry is checked out, a PWC (private working copy) is created 148 * and the original file entry is locked. A client can make as many changes 149 * to the PWC as he desires without those changes being visible to other 150 * users. If the user is satisfied with the changes, he may elect to check 151 * in his changes, resulting in a new file version based on the PWC; the PWC 152 * will be removed and the file entry will be unlocked. If the user is not 153 * satisfied with the changes, he may elect to cancel his check out; this 154 * results in the deletion of the PWC and unlocking of the file entry. 155 * </p> 156 * 157 * @param fileEntryId the primary key of the file entry to cancel the 158 checkout 159 * @throws PortalException if the file entry could not be found 160 * @see #checkInFileEntry(long, boolean, String, ServiceContext) 161 * @see #checkOutFileEntry(long, ServiceContext) 162 */ 163 public static void cancelCheckOut(long fileEntryId) 164 throws RemoteException { 165 try { 166 DLAppServiceUtil.cancelCheckOut(fileEntryId); 167 } 168 catch (Exception e) { 169 _log.error(e, e); 170 171 throw new RemoteException(e.getMessage()); 172 } 173 } 174 175 /** 176 * Checks in the file entry. If a user has not checked out the specified 177 * file entry, invoking this method will result in no changes. 178 * 179 * <p> 180 * When a file entry is checked out, a PWC (private working copy) is created 181 * and the original file entry is locked. A client can make as many changes 182 * to the PWC as he desires without those changes being visible to other 183 * users. If the user is satisfied with the changes, he may elect to check 184 * in his changes, resulting in a new file version based on the PWC; the PWC 185 * will be removed and the file entry will be unlocked. If the user is not 186 * satisfied with the changes, he may elect to cancel his check out; this 187 * results in the deletion of the PWC and unlocking of the file entry. 188 * </p> 189 * 190 * @param fileEntryId the primary key of the file entry to check in 191 * @param majorVersion whether the new file version is a major version 192 * @param changeLog the file's version change log 193 * @param serviceContext the service context to be applied 194 * @throws PortalException if the file entry could not be found 195 * @see #cancelCheckOut(long) 196 * @see #checkOutFileEntry(long, ServiceContext) 197 */ 198 public static void checkInFileEntry(long fileEntryId, boolean majorVersion, 199 java.lang.String changeLog, 200 com.liferay.portal.service.ServiceContext serviceContext) 201 throws RemoteException { 202 try { 203 DLAppServiceUtil.checkInFileEntry(fileEntryId, majorVersion, 204 changeLog, serviceContext); 205 } 206 catch (Exception e) { 207 _log.error(e, e); 208 209 throw new RemoteException(e.getMessage()); 210 } 211 } 212 213 /** 214 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 215 String, ServiceContext)} 216 */ 217 @Deprecated 218 public static void checkInFileEntry(long fileEntryId, 219 java.lang.String lockUuid) throws RemoteException { 220 try { 221 DLAppServiceUtil.checkInFileEntry(fileEntryId, lockUuid); 222 } 223 catch (Exception e) { 224 _log.error(e, e); 225 226 throw new RemoteException(e.getMessage()); 227 } 228 } 229 230 /** 231 * Checks in the file entry using the lock's UUID. If a user has not checked 232 * out the specified file entry, invoking this method will result in no 233 * changes. This method is primarily used by WebDAV. 234 * 235 * <p> 236 * When a file entry is checked out, a PWC (private working copy) is created 237 * and the original file entry is locked. A client can make as many changes 238 * to the PWC as he desires without those changes being visible to other 239 * users. If the user is satisfied with the changes, he may elect to check 240 * in his changes, resulting in a new file version based on the PWC; the PWC 241 * will be removed and the file entry will be unlocked. If the user is not 242 * satisfied with the changes, he may elect to cancel his check out; this 243 * results in the deletion of the PWC and unlocking of the file entry. 244 * </p> 245 * 246 * @param fileEntryId the primary key of the file entry to check in 247 * @param lockUuid the lock's UUID 248 * @param serviceContext the service context to be applied 249 * @throws PortalException if the file entry could not be found 250 * @see #cancelCheckOut(long) 251 * @see #checkOutFileEntry(long, String, long, ServiceContext) 252 */ 253 public static void checkInFileEntry(long fileEntryId, 254 java.lang.String lockUuid, 255 com.liferay.portal.service.ServiceContext serviceContext) 256 throws RemoteException { 257 try { 258 DLAppServiceUtil.checkInFileEntry(fileEntryId, lockUuid, 259 serviceContext); 260 } 261 catch (Exception e) { 262 _log.error(e, e); 263 264 throw new RemoteException(e.getMessage()); 265 } 266 } 267 268 /** 269 * Check out a file entry. 270 * 271 * <p> 272 * When a file entry is checked out, a PWC (private working copy) is created 273 * and the original file entry is locked. A client can make as many changes 274 * to the PWC as he desires without those changes being visible to other 275 * users. If the user is satisfied with the changes, he may elect to check 276 * in his changes, resulting in a new file version based on the PWC; the PWC 277 * will be removed and the file entry will be unlocked. If the user is not 278 * satisfied with the changes, he may elect to cancel his check out; this 279 * results in the deletion of the PWC and unlocking of the file entry. 280 * </p> 281 * 282 * @param fileEntryId the file entry to check out 283 * @param serviceContext the service context to be applied 284 * @throws PortalException if the file entry could not be found 285 * @see #cancelCheckOut(long) 286 * @see #checkInFileEntry(long, boolean, String, ServiceContext) 287 */ 288 public static void checkOutFileEntry(long fileEntryId, 289 com.liferay.portal.service.ServiceContext serviceContext) 290 throws RemoteException { 291 try { 292 DLAppServiceUtil.checkOutFileEntry(fileEntryId, serviceContext); 293 } 294 catch (Exception e) { 295 _log.error(e, e); 296 297 throw new RemoteException(e.getMessage()); 298 } 299 } 300 301 /** 302 * Checks out the file entry. This method is primarily used by WebDAV. 303 * 304 * <p> 305 * When a file entry is checked out, a PWC (private working copy) is created 306 * and the original file entry is locked. A client can make as many changes 307 * to the PWC as he desires without those changes being visible to other 308 * users. If the user is satisfied with the changes, he may elect to check 309 * in his changes, resulting in a new file version based on the PWC; the PWC 310 * will be removed and the file entry will be unlocked. If the user is not 311 * satisfied with the changes, he may elect to cancel his check out; this 312 * results in the deletion of the PWC and unlocking of the file entry. 313 * </p> 314 * 315 * @param fileEntryId the file entry to check out 316 * @param owner the owner string for the checkout (optionally 317 <code>null</code>) 318 * @param expirationTime the time in milliseconds before the lock expires. 319 If the value is <code>0</code>, the default expiration time will 320 be used from <code>portal.properties>. 321 * @param serviceContext the service context to be applied 322 * @return the file entry 323 * @throws PortalException if the file entry could not be found 324 * @see #cancelCheckOut(long) 325 * @see #checkInFileEntry(long, String) 326 */ 327 public static com.liferay.portal.kernel.repository.model.FileEntrySoap checkOutFileEntry( 328 long fileEntryId, java.lang.String owner, long expirationTime, 329 com.liferay.portal.service.ServiceContext serviceContext) 330 throws RemoteException { 331 try { 332 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.checkOutFileEntry(fileEntryId, 333 owner, expirationTime, serviceContext); 334 335 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 336 } 337 catch (Exception e) { 338 _log.error(e, e); 339 340 throw new RemoteException(e.getMessage()); 341 } 342 } 343 344 /** 345 * Performs a deep copy of the folder. 346 * 347 * @param repositoryId the primary key of the repository 348 * @param sourceFolderId the primary key of the folder to copy 349 * @param parentFolderId the primary key of the new folder's parent folder 350 * @param name the new folder's name 351 * @param description the new folder's description 352 * @param serviceContext the service context to be applied 353 * @return the folder 354 * @throws PortalException if the source folder or the new parent folder 355 could not be found or if the new folder's information was invalid 356 */ 357 public static com.liferay.portal.kernel.repository.model.FolderSoap copyFolder( 358 long repositoryId, long sourceFolderId, long parentFolderId, 359 java.lang.String name, java.lang.String description, 360 com.liferay.portal.service.ServiceContext serviceContext) 361 throws RemoteException { 362 try { 363 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.copyFolder(repositoryId, 364 sourceFolderId, parentFolderId, name, description, 365 serviceContext); 366 367 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 368 } 369 catch (Exception e) { 370 _log.error(e, e); 371 372 throw new RemoteException(e.getMessage()); 373 } 374 } 375 376 /** 377 * Deletes the file entry with the primary key. 378 * 379 * @param fileEntryId the primary key of the file entry 380 * @throws PortalException if the file entry could not be found 381 */ 382 public static void deleteFileEntry(long fileEntryId) 383 throws RemoteException { 384 try { 385 DLAppServiceUtil.deleteFileEntry(fileEntryId); 386 } 387 catch (Exception e) { 388 _log.error(e, e); 389 390 throw new RemoteException(e.getMessage()); 391 } 392 } 393 394 /** 395 * Deletes the file entry with the title in the folder. 396 * 397 * @param repositoryId the primary key of the repository 398 * @param folderId the primary key of the file entry's parent folder 399 * @param title the file entry's title 400 * @throws PortalException if the file entry could not be found 401 */ 402 public static void deleteFileEntryByTitle(long repositoryId, long folderId, 403 java.lang.String title) throws RemoteException { 404 try { 405 DLAppServiceUtil.deleteFileEntryByTitle(repositoryId, folderId, 406 title); 407 } 408 catch (Exception e) { 409 _log.error(e, e); 410 411 throw new RemoteException(e.getMessage()); 412 } 413 } 414 415 /** 416 * Deletes the file shortcut with the primary key. This method is only 417 * supported by the Liferay repository. 418 * 419 * @param fileShortcutId the primary key of the file shortcut 420 * @throws PortalException if the file shortcut could not be found 421 */ 422 public static void deleteFileShortcut(long fileShortcutId) 423 throws RemoteException { 424 try { 425 DLAppServiceUtil.deleteFileShortcut(fileShortcutId); 426 } 427 catch (Exception e) { 428 _log.error(e, e); 429 430 throw new RemoteException(e.getMessage()); 431 } 432 } 433 434 /** 435 * Deletes the file version. File versions can only be deleted if it is 436 * approved and there are other approved file versions available. This 437 * method is only supported by the Liferay repository. 438 * 439 * @param fileEntryId the primary key of the file entry 440 * @param version the version label of the file version 441 * @throws PortalException if the file version could not be found or invalid 442 */ 443 public static void deleteFileVersion(long fileEntryId, 444 java.lang.String version) throws RemoteException { 445 try { 446 DLAppServiceUtil.deleteFileVersion(fileEntryId, version); 447 } 448 catch (Exception e) { 449 _log.error(e, e); 450 451 throw new RemoteException(e.getMessage()); 452 } 453 } 454 455 /** 456 * Deletes the folder with the primary key and all of its subfolders and 457 * file entries. 458 * 459 * @param folderId the primary key of the folder 460 * @throws PortalException if the folder could not be found 461 */ 462 public static void deleteFolder(long folderId) throws RemoteException { 463 try { 464 DLAppServiceUtil.deleteFolder(folderId); 465 } 466 catch (Exception e) { 467 _log.error(e, e); 468 469 throw new RemoteException(e.getMessage()); 470 } 471 } 472 473 /** 474 * Deletes the folder with the name in the parent folder and all of its 475 * subfolders and file entries. 476 * 477 * @param repositoryId the primary key of the repository 478 * @param parentFolderId the primary key of the folder's parent folder 479 * @param name the folder's name 480 * @throws PortalException if the folder could not be found 481 */ 482 public static void deleteFolder(long repositoryId, long parentFolderId, 483 java.lang.String name) throws RemoteException { 484 try { 485 DLAppServiceUtil.deleteFolder(repositoryId, parentFolderId, name); 486 } 487 catch (Exception e) { 488 _log.error(e, e); 489 490 throw new RemoteException(e.getMessage()); 491 } 492 } 493 494 /** 495 * Deletes the temporary file entry. 496 * 497 * @param groupId the primary key of the group 498 * @param folderId the primary key of the folder where the file entry was 499 eventually to reside 500 * @param folderName the temporary folder's name 501 * @param fileName the file's original name 502 * @throws PortalException if the file name was invalid 503 * @see TempFileEntryUtil 504 */ 505 public static void deleteTempFileEntry(long groupId, long folderId, 506 java.lang.String folderName, java.lang.String fileName) 507 throws RemoteException { 508 try { 509 DLAppServiceUtil.deleteTempFileEntry(groupId, folderId, folderName, 510 fileName); 511 } 512 catch (Exception e) { 513 _log.error(e, e); 514 515 throw new RemoteException(e.getMessage()); 516 } 517 } 518 519 /** 520 * Returns all the file entries in the folder. 521 * 522 * @param repositoryId the primary key of the file entry's repository 523 * @param folderId the primary key of the file entry's folder 524 * @return the file entries in the folder 525 * @throws PortalException if the folder could not be found 526 */ 527 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 528 long repositoryId, long folderId) throws RemoteException { 529 try { 530 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 531 DLAppServiceUtil.getFileEntries(repositoryId, folderId); 532 533 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 534 } 535 catch (Exception e) { 536 _log.error(e, e); 537 538 throw new RemoteException(e.getMessage()); 539 } 540 } 541 542 /** 543 * Returns a name-ordered range of all the file entries in the folder. 544 * 545 * <p> 546 * Useful when paginating results. Returns a maximum of <code>end - 547 * start</code> instances. <code>start</code> and <code>end</code> are not 548 * primary keys, they are indexes in the result set. Thus, <code>0</code> 549 * refers to the first result in the set. Setting both <code>start</code> 550 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 551 * result set. 552 * </p> 553 * 554 * @param repositoryId the primary key of the file entry's repository 555 * @param folderId the primary key of the file entry's folder 556 * @param start the lower bound of the range of results 557 * @param end the upper bound of the range of results (not inclusive) 558 * @return the name-ordered range of file entries in the folder 559 * @throws PortalException if the folder could not be found 560 */ 561 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 562 long repositoryId, long folderId, int start, int end) 563 throws RemoteException { 564 try { 565 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 566 DLAppServiceUtil.getFileEntries(repositoryId, folderId, start, 567 end); 568 569 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 570 } 571 catch (Exception e) { 572 _log.error(e, e); 573 574 throw new RemoteException(e.getMessage()); 575 } 576 } 577 578 /** 579 * Returns an ordered range of all the file entries in the folder. 580 * 581 * <p> 582 * Useful when paginating results. Returns a maximum of <code>end - 583 * start</code> instances. <code>start</code> and <code>end</code> are not 584 * primary keys, they are indexes in the result set. Thus, <code>0</code> 585 * refers to the first result in the set. Setting both <code>start</code> 586 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 587 * result set. 588 * </p> 589 * 590 * @param repositoryId the primary key of the file entry's repository 591 * @param folderId the primary key of the file entry's folder 592 * @param start the lower bound of the range of results 593 * @param end the upper bound of the range of results (not inclusive) 594 * @param obc the comparator to order the file entries (optionally 595 <code>null</code>) 596 * @return the range of file entries in the folder ordered by comparator 597 <code>obc</code> 598 * @throws PortalException if the folder could not be found 599 */ 600 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 601 long repositoryId, long folderId, int start, int end, 602 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 603 throws RemoteException { 604 try { 605 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 606 DLAppServiceUtil.getFileEntries(repositoryId, folderId, start, 607 end, obc); 608 609 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 610 } 611 catch (Exception e) { 612 _log.error(e, e); 613 614 throw new RemoteException(e.getMessage()); 615 } 616 } 617 618 /** 619 * Returns the file entries with the file entry type in the folder. 620 * 621 * @param repositoryId the primary key of the file entry's repository 622 * @param folderId the primary key of the file entry's folder 623 * @param fileEntryTypeId the primary key of the file entry type 624 * @return the file entries with the file entry type in the folder 625 * @throws PortalException if the folder could not be found 626 */ 627 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 628 long repositoryId, long folderId, long fileEntryTypeId) 629 throws RemoteException { 630 try { 631 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 632 DLAppServiceUtil.getFileEntries(repositoryId, folderId, 633 fileEntryTypeId); 634 635 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 636 } 637 catch (Exception e) { 638 _log.error(e, e); 639 640 throw new RemoteException(e.getMessage()); 641 } 642 } 643 644 /** 645 * Returns a name-ordered range of all the file entries with the file entry 646 * type in the folder. 647 * 648 * @param repositoryId the primary key of the file entry's repository 649 * @param folderId the primary key of the file entry's folder 650 * @param fileEntryTypeId the primary key of the file entry type 651 * @param start the lower bound of the range of results 652 * @param end the upper bound of the range of results (not inclusive) 653 * @return the name-ordered range of the file entries in the folder 654 * @throws PortalException if the folder could not be found 655 */ 656 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 657 long repositoryId, long folderId, long fileEntryTypeId, int start, 658 int end) throws RemoteException { 659 try { 660 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 661 DLAppServiceUtil.getFileEntries(repositoryId, folderId, 662 fileEntryTypeId, start, end); 663 664 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 665 } 666 catch (Exception e) { 667 _log.error(e, e); 668 669 throw new RemoteException(e.getMessage()); 670 } 671 } 672 673 /** 674 * Returns an ordered range of all the file entries with the file entry type 675 * in the folder. 676 * 677 * @param repositoryId the primary key of the repository 678 * @param folderId the primary key of the folder 679 * @param fileEntryTypeId the primary key of the file entry type 680 * @param start the lower bound of the range of results 681 * @param end the upper bound of the range of results (not inclusive) 682 * @param obc the comparator to order the results by (optionally 683 <code>null</code>) 684 * @return the range of file entries with the file entry type in the folder 685 ordered by <code>null</code> 686 * @throws PortalException if the folder could not be found 687 */ 688 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 689 long repositoryId, long folderId, long fileEntryTypeId, int start, 690 int end, 691 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 692 throws RemoteException { 693 try { 694 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 695 DLAppServiceUtil.getFileEntries(repositoryId, folderId, 696 fileEntryTypeId, start, end, obc); 697 698 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 699 } 700 catch (Exception e) { 701 _log.error(e, e); 702 703 throw new RemoteException(e.getMessage()); 704 } 705 } 706 707 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 708 long repositoryId, long folderId, java.lang.String[] mimeTypes) 709 throws RemoteException { 710 try { 711 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 712 DLAppServiceUtil.getFileEntries(repositoryId, folderId, 713 mimeTypes); 714 715 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 716 } 717 catch (Exception e) { 718 _log.error(e, e); 719 720 throw new RemoteException(e.getMessage()); 721 } 722 } 723 724 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getFileEntries( 725 long repositoryId, long folderId, java.lang.String[] mimeTypes, 726 int start, int end, 727 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 728 throws RemoteException { 729 try { 730 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 731 DLAppServiceUtil.getFileEntries(repositoryId, folderId, 732 mimeTypes, start, end, obc); 733 734 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 735 } 736 catch (Exception e) { 737 _log.error(e, e); 738 739 throw new RemoteException(e.getMessage()); 740 } 741 } 742 743 /** 744 * Returns the number of file entries and shortcuts in the folder. 745 * 746 * @param repositoryId the primary key of the repository 747 * @param folderId the primary key of the folder 748 * @param status the workflow status 749 * @return the number of file entries and shortcuts in the folder 750 * @throws PortalException if the folder ould not be found 751 */ 752 public static int getFileEntriesAndFileShortcutsCount(long repositoryId, 753 long folderId, int status) throws RemoteException { 754 try { 755 int returnValue = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId, 756 folderId, status); 757 758 return returnValue; 759 } 760 catch (Exception e) { 761 _log.error(e, e); 762 763 throw new RemoteException(e.getMessage()); 764 } 765 } 766 767 /** 768 * Returns the number of file entries and shortcuts in the folder. 769 * 770 * @param repositoryId the primary key of the repository 771 * @param folderId the primary key of the folder 772 * @param status the workflow status 773 * @param mimeTypes allowed media types 774 * @return the number of file entries and shortcuts in the folder 775 * @throws PortalException if the folder ould not be found 776 */ 777 public static int getFileEntriesAndFileShortcutsCount(long repositoryId, 778 long folderId, int status, java.lang.String[] mimeTypes) 779 throws RemoteException { 780 try { 781 int returnValue = DLAppServiceUtil.getFileEntriesAndFileShortcutsCount(repositoryId, 782 folderId, status, mimeTypes); 783 784 return returnValue; 785 } 786 catch (Exception e) { 787 _log.error(e, e); 788 789 throw new RemoteException(e.getMessage()); 790 } 791 } 792 793 /** 794 * Returns the number of file entries in the folder. 795 * 796 * @param repositoryId the primary key of the file entry's repository 797 * @param folderId the primary key of the file entry's folder 798 * @return the number of file entries in the folder 799 * @throws PortalException if the folder could not be found 800 */ 801 public static int getFileEntriesCount(long repositoryId, long folderId) 802 throws RemoteException { 803 try { 804 int returnValue = DLAppServiceUtil.getFileEntriesCount(repositoryId, 805 folderId); 806 807 return returnValue; 808 } 809 catch (Exception e) { 810 _log.error(e, e); 811 812 throw new RemoteException(e.getMessage()); 813 } 814 } 815 816 /** 817 * Returns the number of file entries with the file entry type in the 818 * folder. 819 * 820 * @param repositoryId the primary key of the file entry's repository 821 * @param folderId the primary key of the file entry's folder 822 * @param fileEntryTypeId the primary key of the file entry type 823 * @return the number of file entries with the file entry type in the folder 824 * @throws PortalException if the folder could not be found 825 */ 826 public static int getFileEntriesCount(long repositoryId, long folderId, 827 long fileEntryTypeId) throws RemoteException { 828 try { 829 int returnValue = DLAppServiceUtil.getFileEntriesCount(repositoryId, 830 folderId, fileEntryTypeId); 831 832 return returnValue; 833 } 834 catch (Exception e) { 835 _log.error(e, e); 836 837 throw new RemoteException(e.getMessage()); 838 } 839 } 840 841 public static int getFileEntriesCount(long repositoryId, long folderId, 842 java.lang.String[] mimeTypes) throws RemoteException { 843 try { 844 int returnValue = DLAppServiceUtil.getFileEntriesCount(repositoryId, 845 folderId, mimeTypes); 846 847 return returnValue; 848 } 849 catch (Exception e) { 850 _log.error(e, e); 851 852 throw new RemoteException(e.getMessage()); 853 } 854 } 855 856 /** 857 * Returns the file entry with the primary key. 858 * 859 * @param fileEntryId the primary key of the file entry 860 * @return the file entry with the primary key 861 * @throws PortalException if the file entry could not be found 862 */ 863 public static com.liferay.portal.kernel.repository.model.FileEntrySoap getFileEntry( 864 long fileEntryId) throws RemoteException { 865 try { 866 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.getFileEntry(fileEntryId); 867 868 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 869 } 870 catch (Exception e) { 871 _log.error(e, e); 872 873 throw new RemoteException(e.getMessage()); 874 } 875 } 876 877 /** 878 * Returns the file entry with the title in the folder. 879 * 880 * @param groupId the primary key of the file entry's group 881 * @param folderId the primary key of the file entry's folder 882 * @param title the file entry's title 883 * @return the file entry with the title in the folder 884 * @throws PortalException if the file entry could not be found 885 */ 886 public static com.liferay.portal.kernel.repository.model.FileEntrySoap getFileEntry( 887 long groupId, long folderId, java.lang.String title) 888 throws RemoteException { 889 try { 890 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.getFileEntry(groupId, 891 folderId, title); 892 893 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 894 } 895 catch (Exception e) { 896 _log.error(e, e); 897 898 throw new RemoteException(e.getMessage()); 899 } 900 } 901 902 /** 903 * Returns the file entry with the UUID and group. 904 * 905 * @param uuid the file entry's UUID 906 * @param groupId the primary key of the file entry's group 907 * @return the file entry with the UUID and group 908 * @throws PortalException if the file entry could not be found 909 */ 910 public static com.liferay.portal.kernel.repository.model.FileEntrySoap getFileEntryByUuidAndGroupId( 911 java.lang.String uuid, long groupId) throws RemoteException { 912 try { 913 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.getFileEntryByUuidAndGroupId(uuid, 914 groupId); 915 916 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 917 } 918 catch (Exception e) { 919 _log.error(e, e); 920 921 throw new RemoteException(e.getMessage()); 922 } 923 } 924 925 /** 926 * Returns the folder with the primary key. 927 * 928 * @param folderId the primary key of the folder 929 * @return the folder with the primary key 930 * @throws PortalException if the folder could not be found 931 */ 932 public static com.liferay.portal.kernel.repository.model.FolderSoap getFolder( 933 long folderId) throws RemoteException { 934 try { 935 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.getFolder(folderId); 936 937 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 938 } 939 catch (Exception e) { 940 _log.error(e, e); 941 942 throw new RemoteException(e.getMessage()); 943 } 944 } 945 946 /** 947 * Returns the folder with the name in the parent folder. 948 * 949 * @param repositoryId the primary key of the folder's repository 950 * @param parentFolderId the primary key of the folder's parent folder 951 * @param name the folder's name 952 * @return the folder with the name in the parent folder 953 * @throws PortalException if the folder could not be found 954 */ 955 public static com.liferay.portal.kernel.repository.model.FolderSoap getFolder( 956 long repositoryId, long parentFolderId, java.lang.String name) 957 throws RemoteException { 958 try { 959 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.getFolder(repositoryId, 960 parentFolderId, name); 961 962 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 963 } 964 catch (Exception e) { 965 _log.error(e, e); 966 967 throw new RemoteException(e.getMessage()); 968 } 969 } 970 971 /** 972 * Returns all immediate subfolders of the parent folder. 973 * 974 * @param repositoryId the primary key of the folder's repository 975 * @param parentFolderId the primary key of the folder's parent folder 976 * @return the immediate subfolders of the parent folder 977 * @throws PortalException if the parent folder could not be found 978 */ 979 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getFolders( 980 long repositoryId, long parentFolderId) throws RemoteException { 981 try { 982 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 983 DLAppServiceUtil.getFolders(repositoryId, parentFolderId); 984 985 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 986 } 987 catch (Exception e) { 988 _log.error(e, e); 989 990 throw new RemoteException(e.getMessage()); 991 } 992 } 993 994 /** 995 * Returns all immediate subfolders of the parent folder, optionally 996 * including mount folders for third-party repositories. 997 * 998 * @param repositoryId the primary key of the folder's repository 999 * @param parentFolderId the primary key of the folder's parent folder 1000 * @param includeMountFolders whether to include mount folders for 1001 third-party repositories 1002 * @return the immediate subfolders of the parent folder 1003 * @throws PortalException if the parent folder could not be found 1004 */ 1005 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getFolders( 1006 long repositoryId, long parentFolderId, boolean includeMountFolders) 1007 throws RemoteException { 1008 try { 1009 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1010 DLAppServiceUtil.getFolders(repositoryId, parentFolderId, 1011 includeMountFolders); 1012 1013 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1014 } 1015 catch (Exception e) { 1016 _log.error(e, e); 1017 1018 throw new RemoteException(e.getMessage()); 1019 } 1020 } 1021 1022 /** 1023 * Returns a name-ordered range of all the immediate subfolders of the 1024 * parent folder, optionally including mount folders for third-party 1025 * repositories. 1026 * 1027 * <p> 1028 * Useful when paginating results. Returns a maximum of <code>end - 1029 * start</code> instances. <code>start</code> and <code>end</code> are not 1030 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1031 * refers to the first result in the set. Setting both <code>start</code> 1032 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1033 * result set. 1034 * </p> 1035 * 1036 * @param repositoryId the primary key of the folder's repository 1037 * @param parentFolderId the primary key of the folder's parent folder 1038 * @param includeMountFolders whether to include mount folders for 1039 third-party repositories 1040 * @param start the lower bound of the range of results 1041 * @param end the upper bound of the range of results (not inclusive) 1042 * @return the name-ordered range of immediate subfolders of the parent 1043 folder 1044 * @throws PortalException if the parent folder could not be found 1045 */ 1046 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getFolders( 1047 long repositoryId, long parentFolderId, boolean includeMountFolders, 1048 int start, int end) throws RemoteException { 1049 try { 1050 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1051 DLAppServiceUtil.getFolders(repositoryId, parentFolderId, 1052 includeMountFolders, start, end); 1053 1054 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1055 } 1056 catch (Exception e) { 1057 _log.error(e, e); 1058 1059 throw new RemoteException(e.getMessage()); 1060 } 1061 } 1062 1063 /** 1064 * Returns an ordered range of all the immediate subfolders of the parent 1065 * folder. 1066 * 1067 * <p> 1068 * Useful when paginating results. Returns a maximum of <code>end - 1069 * start</code> instances. <code>start</code> and <code>end</code> are not 1070 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1071 * refers to the first result in the set. Setting both <code>start</code> 1072 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1073 * result set. 1074 * </p> 1075 * 1076 * @param repositoryId the primary key of the folder's repository 1077 * @param parentFolderId the primary key of the folder's parent folder 1078 * @param includeMountFolders whether to include mount folders for 1079 third-party repositories 1080 * @param start the lower bound of the range of results 1081 * @param end the upper bound of the range of results (not inclusive) 1082 * @param obc the comparator to order the folders (optionally 1083 <code>null</code>) 1084 * @return the range of immediate subfolders of the parent folder ordered by 1085 comparator <code>obc</code> 1086 * @throws PortalException if the parent folder could not be found 1087 */ 1088 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getFolders( 1089 long repositoryId, long parentFolderId, boolean includeMountFolders, 1090 int start, int end, 1091 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 1092 throws RemoteException { 1093 try { 1094 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1095 DLAppServiceUtil.getFolders(repositoryId, parentFolderId, 1096 includeMountFolders, start, end, obc); 1097 1098 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1099 } 1100 catch (Exception e) { 1101 _log.error(e, e); 1102 1103 throw new RemoteException(e.getMessage()); 1104 } 1105 } 1106 1107 /** 1108 * Returns an ordered range of all the immediate subfolders of the parent 1109 * folder. 1110 * 1111 * <p> 1112 * Useful when paginating results. Returns a maximum of <code>end - 1113 * start</code> instances. <code>start</code> and <code>end</code> are not 1114 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1115 * refers to the first result in the set. Setting both <code>start</code> 1116 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1117 * result set. 1118 * </p> 1119 * 1120 * @param repositoryId the primary key of the folder's repository 1121 * @param parentFolderId the primary key of the folder's parent folder 1122 * @param status the workflow status 1123 * @param includeMountFolders whether to include mount folders for 1124 third-party repositories 1125 * @param start the lower bound of the range of results 1126 * @param end the upper bound of the range of results (not inclusive) 1127 * @param obc the comparator to order the folders (optionally 1128 <code>null</code>) 1129 * @return the range of immediate subfolders of the parent folder ordered by 1130 comparator <code>obc</code> 1131 * @throws PortalException if the parent folder could not be found 1132 */ 1133 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getFolders( 1134 long repositoryId, long parentFolderId, int status, 1135 boolean includeMountFolders, int start, int end, 1136 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 1137 throws RemoteException { 1138 try { 1139 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1140 DLAppServiceUtil.getFolders(repositoryId, parentFolderId, 1141 status, includeMountFolders, start, end, obc); 1142 1143 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1144 } 1145 catch (Exception e) { 1146 _log.error(e, e); 1147 1148 throw new RemoteException(e.getMessage()); 1149 } 1150 } 1151 1152 /** 1153 * Returns a name-ordered range of all the immediate subfolders of the 1154 * parent folder. 1155 * 1156 * <p> 1157 * Useful when paginating results. Returns a maximum of <code>end - 1158 * start</code> instances. <code>start</code> and <code>end</code> are not 1159 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1160 * refers to the first result in the set. Setting both <code>start</code> 1161 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1162 * result set. 1163 * </p> 1164 * 1165 * @param repositoryId the primary key of the folder's repository 1166 * @param parentFolderId the primary key of the folder's parent folder 1167 * @param start the lower bound of the range of results 1168 * @param end the upper bound of the range of results (not inclusive) 1169 * @return the name-ordered range of immediate subfolders of the parent 1170 folder 1171 * @throws PortalException if the parent folder could not be found 1172 */ 1173 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getFolders( 1174 long repositoryId, long parentFolderId, int start, int end) 1175 throws RemoteException { 1176 try { 1177 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1178 DLAppServiceUtil.getFolders(repositoryId, parentFolderId, 1179 start, end); 1180 1181 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1182 } 1183 catch (Exception e) { 1184 _log.error(e, e); 1185 1186 throw new RemoteException(e.getMessage()); 1187 } 1188 } 1189 1190 /** 1191 * Returns an ordered range of all the immediate subfolders of the parent 1192 * folder. 1193 * 1194 * <p> 1195 * Useful when paginating results. Returns a maximum of <code>end - 1196 * start</code> instances. <code>start</code> and <code>end</code> are not 1197 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1198 * refers to the first result in the set. Setting both <code>start</code> 1199 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1200 * result set. 1201 * </p> 1202 * 1203 * @param repositoryId the primary key of the folder's repository 1204 * @param parentFolderId the primary key of the folder's parent folder 1205 * @param start the lower bound of the range of results 1206 * @param end the upper bound of the range of results (not inclusive) 1207 * @param obc the comparator to order the folders (optionally 1208 <code>null</code>) 1209 * @return the range of immediate subfolders of the parent folder ordered by 1210 comparator <code>obc</code> 1211 * @throws PortalException if the parent folder could not be found 1212 */ 1213 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getFolders( 1214 long repositoryId, long parentFolderId, int start, int end, 1215 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 1216 throws RemoteException { 1217 try { 1218 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1219 DLAppServiceUtil.getFolders(repositoryId, parentFolderId, 1220 start, end, obc); 1221 1222 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1223 } 1224 catch (Exception e) { 1225 _log.error(e, e); 1226 1227 throw new RemoteException(e.getMessage()); 1228 } 1229 } 1230 1231 /** 1232 * Returns the number of immediate subfolders, file entries, and file 1233 * shortcuts in the parent folder. 1234 * 1235 * @param repositoryId the primary key of the repository 1236 * @param folderId the primary key of the parent folder 1237 * @param status the workflow status 1238 * @param includeMountFolders whether to include mount folders for 1239 third-party repositories 1240 * @return the number of immediate subfolders, file entries, and file 1241 shortcuts in the parent folder 1242 * @throws PortalException if the folder could not be found 1243 */ 1244 public static int getFoldersAndFileEntriesAndFileShortcutsCount( 1245 long repositoryId, long folderId, int status, 1246 boolean includeMountFolders) throws RemoteException { 1247 try { 1248 int returnValue = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 1249 folderId, status, includeMountFolders); 1250 1251 return returnValue; 1252 } 1253 catch (Exception e) { 1254 _log.error(e, e); 1255 1256 throw new RemoteException(e.getMessage()); 1257 } 1258 } 1259 1260 public static int getFoldersAndFileEntriesAndFileShortcutsCount( 1261 long repositoryId, long folderId, int status, 1262 java.lang.String[] mimeTypes, boolean includeMountFolders) 1263 throws RemoteException { 1264 try { 1265 int returnValue = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 1266 folderId, status, mimeTypes, includeMountFolders); 1267 1268 return returnValue; 1269 } 1270 catch (Exception e) { 1271 _log.error(e, e); 1272 1273 throw new RemoteException(e.getMessage()); 1274 } 1275 } 1276 1277 /** 1278 * Returns the number of immediate subfolders of the parent folder. 1279 * 1280 * @param repositoryId the primary key of the folder's repository 1281 * @param parentFolderId the primary key of the folder's parent folder 1282 * @return the number of immediate subfolders of the parent folder 1283 * @throws PortalException if the parent folder could not be found 1284 */ 1285 public static int getFoldersCount(long repositoryId, long parentFolderId) 1286 throws RemoteException { 1287 try { 1288 int returnValue = DLAppServiceUtil.getFoldersCount(repositoryId, 1289 parentFolderId); 1290 1291 return returnValue; 1292 } 1293 catch (Exception e) { 1294 _log.error(e, e); 1295 1296 throw new RemoteException(e.getMessage()); 1297 } 1298 } 1299 1300 /** 1301 * Returns the number of immediate subfolders of the parent folder, 1302 * optionally including mount folders for third-party repositories. 1303 * 1304 * @param repositoryId the primary key of the folder's repository 1305 * @param parentFolderId the primary key of the folder's parent folder 1306 * @param includeMountFolders whether to include mount folders for 1307 third-party repositories 1308 * @return the number of immediate subfolders of the parent folder 1309 * @throws PortalException if the parent folder could not be found 1310 */ 1311 public static int getFoldersCount(long repositoryId, long parentFolderId, 1312 boolean includeMountFolders) throws RemoteException { 1313 try { 1314 int returnValue = DLAppServiceUtil.getFoldersCount(repositoryId, 1315 parentFolderId, includeMountFolders); 1316 1317 return returnValue; 1318 } 1319 catch (Exception e) { 1320 _log.error(e, e); 1321 1322 throw new RemoteException(e.getMessage()); 1323 } 1324 } 1325 1326 /** 1327 * Returns the number of immediate subfolders of the parent folder, 1328 * optionally including mount folders for third-party repositories. 1329 * 1330 * @param repositoryId the primary key of the folder's repository 1331 * @param parentFolderId the primary key of the folder's parent folder 1332 * @param status the workflow status 1333 * @param includeMountFolders whether to include mount folders for 1334 third-party repositories 1335 * @return the number of immediate subfolders of the parent folder 1336 * @throws PortalException if the parent folder could not be found 1337 */ 1338 public static int getFoldersCount(long repositoryId, long parentFolderId, 1339 int status, boolean includeMountFolders) throws RemoteException { 1340 try { 1341 int returnValue = DLAppServiceUtil.getFoldersCount(repositoryId, 1342 parentFolderId, status, includeMountFolders); 1343 1344 return returnValue; 1345 } 1346 catch (Exception e) { 1347 _log.error(e, e); 1348 1349 throw new RemoteException(e.getMessage()); 1350 } 1351 } 1352 1353 /** 1354 * Returns the number of immediate subfolders and file entries across the 1355 * folders. 1356 * 1357 * @param repositoryId the primary key of the repository 1358 * @param folderIds the primary keys of folders from which to count 1359 immediate subfolders and file entries 1360 * @param status the workflow status 1361 * @return the number of immediate subfolders and file entries across the 1362 folders 1363 * @throws PortalException if the repository could not be found 1364 */ 1365 public static int getFoldersFileEntriesCount(long repositoryId, 1366 Long[] folderIds, int status) throws RemoteException { 1367 try { 1368 int returnValue = DLAppServiceUtil.getFoldersFileEntriesCount(repositoryId, 1369 ListUtil.toList(folderIds), status); 1370 1371 return returnValue; 1372 } 1373 catch (Exception e) { 1374 _log.error(e, e); 1375 1376 throw new RemoteException(e.getMessage()); 1377 } 1378 } 1379 1380 /** 1381 * Returns an ordered range of all the file entries in the group starting at 1382 * the repository default parent folder that are stored within the Liferay 1383 * repository. This method is primarily used to search for recently modified 1384 * file entries. It can be limited to the file entries modified by a given 1385 * user. 1386 * 1387 * <p> 1388 * Useful when paginating results. Returns a maximum of <code>end - 1389 * start</code> instances. <code>start</code> and <code>end</code> are not 1390 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1391 * refers to the first result in the set. Setting both <code>start</code> 1392 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1393 * result set. 1394 * </p> 1395 * 1396 * @param groupId the primary key of the group 1397 * @param userId the primary key of the user who created the file 1398 (optionally <code>0</code>) 1399 * @param start the lower bound of the range of results 1400 * @param end the upper bound of the range of results (not inclusive) 1401 * @return the range of matching file entries ordered by date modified 1402 * @throws PortalException if the group could not be found 1403 */ 1404 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getGroupFileEntries( 1405 long groupId, long userId, int start, int end) 1406 throws RemoteException { 1407 try { 1408 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 1409 DLAppServiceUtil.getGroupFileEntries(groupId, userId, start, end); 1410 1411 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 1412 } 1413 catch (Exception e) { 1414 _log.error(e, e); 1415 1416 throw new RemoteException(e.getMessage()); 1417 } 1418 } 1419 1420 /** 1421 * Returns an ordered range of all the file entries in the group that are 1422 * stored within the Liferay repository. This method is primarily used to 1423 * search for recently modified file entries. It can be limited to the file 1424 * entries modified by a given user. 1425 * 1426 * <p> 1427 * Useful when paginating results. Returns a maximum of <code>end - 1428 * start</code> instances. <code>start</code> and <code>end</code> are not 1429 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1430 * refers to the first result in the set. Setting both <code>start</code> 1431 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1432 * result set. 1433 * </p> 1434 * 1435 * @param groupId the primary key of the group 1436 * @param userId the primary key of the user who created the file 1437 (optionally <code>0</code>) 1438 * @param start the lower bound of the range of results 1439 * @param end the upper bound of the range of results (not inclusive) 1440 * @param obc the comparator to order the file entries (optionally 1441 <code>null</code>) 1442 * @return the range of matching file entries ordered by comparator 1443 <code>obc</code> 1444 * @throws PortalException if the group could not be found 1445 */ 1446 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getGroupFileEntries( 1447 long groupId, long userId, int start, int end, 1448 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 1449 throws RemoteException { 1450 try { 1451 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 1452 DLAppServiceUtil.getGroupFileEntries(groupId, userId, start, 1453 end, obc); 1454 1455 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 1456 } 1457 catch (Exception e) { 1458 _log.error(e, e); 1459 1460 throw new RemoteException(e.getMessage()); 1461 } 1462 } 1463 1464 /** 1465 * Returns an ordered range of all the file entries in the group starting at 1466 * the root folder that are stored within the Liferay repository. This 1467 * method is primarily used to search for recently modified file entries. It 1468 * can be limited to the file entries modified by a given user. 1469 * 1470 * <p> 1471 * Useful when paginating results. Returns a maximum of <code>end - 1472 * start</code> instances. <code>start</code> and <code>end</code> are not 1473 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1474 * refers to the first result in the set. Setting both <code>start</code> 1475 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1476 * result set. 1477 * </p> 1478 * 1479 * @param groupId the primary key of the group 1480 * @param userId the primary key of the user who created the file 1481 (optionally <code>0</code>) 1482 * @param rootFolderId the primary key of the root folder to begin the 1483 search 1484 * @param start the lower bound of the range of results 1485 * @param end the upper bound of the range of results (not inclusive) 1486 * @return the range of matching file entries ordered by date modified 1487 * @throws PortalException if the group could not be found 1488 */ 1489 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getGroupFileEntries( 1490 long groupId, long userId, long rootFolderId, int start, int end) 1491 throws RemoteException { 1492 try { 1493 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 1494 DLAppServiceUtil.getGroupFileEntries(groupId, userId, 1495 rootFolderId, start, end); 1496 1497 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 1498 } 1499 catch (Exception e) { 1500 _log.error(e, e); 1501 1502 throw new RemoteException(e.getMessage()); 1503 } 1504 } 1505 1506 /** 1507 * Returns an ordered range of all the file entries in the group starting at 1508 * the root folder that are stored within the Liferay repository. This 1509 * method is primarily used to search for recently modified file entries. It 1510 * can be limited to the file entries modified by a given user. 1511 * 1512 * <p> 1513 * Useful when paginating results. Returns a maximum of <code>end - 1514 * start</code> instances. <code>start</code> and <code>end</code> are not 1515 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1516 * refers to the first result in the set. Setting both <code>start</code> 1517 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1518 * result set. 1519 * </p> 1520 * 1521 * @param groupId the primary key of the group 1522 * @param userId the primary key of the user who created the file 1523 (optionally <code>0</code>) 1524 * @param rootFolderId the primary key of the root folder to begin the 1525 search 1526 * @param start the lower bound of the range of results 1527 * @param end the upper bound of the range of results (not inclusive) 1528 * @param obc the comparator to order the file entries (optionally 1529 <code>null</code>) 1530 * @return the range of matching file entries ordered by comparator 1531 <code>obc</code> 1532 * @throws PortalException if the group could not be found 1533 */ 1534 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getGroupFileEntries( 1535 long groupId, long userId, long rootFolderId, int start, int end, 1536 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 1537 throws RemoteException { 1538 try { 1539 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 1540 DLAppServiceUtil.getGroupFileEntries(groupId, userId, 1541 rootFolderId, start, end, obc); 1542 1543 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 1544 } 1545 catch (Exception e) { 1546 _log.error(e, e); 1547 1548 throw new RemoteException(e.getMessage()); 1549 } 1550 } 1551 1552 public static com.liferay.portal.kernel.repository.model.FileEntrySoap[] getGroupFileEntries( 1553 long groupId, long userId, long rootFolderId, 1554 java.lang.String[] mimeTypes, int status, int start, int end, 1555 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 1556 throws RemoteException { 1557 try { 1558 java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> returnValue = 1559 DLAppServiceUtil.getGroupFileEntries(groupId, userId, 1560 rootFolderId, mimeTypes, status, start, end, obc); 1561 1562 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModels(returnValue); 1563 } 1564 catch (Exception e) { 1565 _log.error(e, e); 1566 1567 throw new RemoteException(e.getMessage()); 1568 } 1569 } 1570 1571 /** 1572 * Returns the number of file entries in a group starting at the repository 1573 * default parent folder that are stored within the Liferay repository. This 1574 * method is primarily used to search for recently modified file entries. It 1575 * can be limited to the file entries modified by a given user. 1576 * 1577 * @param groupId the primary key of the group 1578 * @param userId the primary key of the user who created the file 1579 (optionally <code>0</code>) 1580 * @return the number of matching file entries 1581 * @throws PortalException if the group could not be found 1582 */ 1583 public static int getGroupFileEntriesCount(long groupId, long userId) 1584 throws RemoteException { 1585 try { 1586 int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId, 1587 userId); 1588 1589 return returnValue; 1590 } 1591 catch (Exception e) { 1592 _log.error(e, e); 1593 1594 throw new RemoteException(e.getMessage()); 1595 } 1596 } 1597 1598 /** 1599 * Returns the number of file entries in a group starting at the root folder 1600 * that are stored within the Liferay repository. This method is primarily 1601 * used to search for recently modified file entries. It can be limited to 1602 * the file entries modified by a given user. 1603 * 1604 * @param groupId the primary key of the group 1605 * @param userId the primary key of the user who created the file 1606 (optionally <code>0</code>) 1607 * @param rootFolderId the primary key of the root folder to begin the 1608 search 1609 * @return the number of matching file entries 1610 * @throws PortalException if the group could not be found 1611 */ 1612 public static int getGroupFileEntriesCount(long groupId, long userId, 1613 long rootFolderId) throws RemoteException { 1614 try { 1615 int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId, 1616 userId, rootFolderId); 1617 1618 return returnValue; 1619 } 1620 catch (Exception e) { 1621 _log.error(e, e); 1622 1623 throw new RemoteException(e.getMessage()); 1624 } 1625 } 1626 1627 public static int getGroupFileEntriesCount(long groupId, long userId, 1628 long rootFolderId, java.lang.String[] mimeTypes, int status) 1629 throws RemoteException { 1630 try { 1631 int returnValue = DLAppServiceUtil.getGroupFileEntriesCount(groupId, 1632 userId, rootFolderId, mimeTypes, status); 1633 1634 return returnValue; 1635 } 1636 catch (Exception e) { 1637 _log.error(e, e); 1638 1639 throw new RemoteException(e.getMessage()); 1640 } 1641 } 1642 1643 /** 1644 * Returns all immediate subfolders of the parent folder that are used for 1645 * mounting third-party repositories. This method is only supported by the 1646 * Liferay repository. 1647 * 1648 * @param repositoryId the primary key of the folder's repository 1649 * @param parentFolderId the primary key of the folder's parent folder 1650 * @return the immediate subfolders of the parent folder that are used for 1651 mounting third-party repositories 1652 * @throws PortalException if the repository or parent folder could not be 1653 found 1654 */ 1655 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getMountFolders( 1656 long repositoryId, long parentFolderId) throws RemoteException { 1657 try { 1658 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1659 DLAppServiceUtil.getMountFolders(repositoryId, parentFolderId); 1660 1661 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1662 } 1663 catch (Exception e) { 1664 _log.error(e, e); 1665 1666 throw new RemoteException(e.getMessage()); 1667 } 1668 } 1669 1670 /** 1671 * Returns a name-ordered range of all the immediate subfolders of the 1672 * parent folder that are used for mounting third-party repositories. This 1673 * method is only supported by the Liferay repository. 1674 * 1675 * <p> 1676 * Useful when paginating results. Returns a maximum of <code>end - 1677 * start</code> instances. <code>start</code> and <code>end</code> are not 1678 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1679 * refers to the first result in the set. Setting both <code>start</code> 1680 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1681 * result set. 1682 * </p> 1683 * 1684 * @param repositoryId the primary key of the repository 1685 * @param parentFolderId the primary key of the parent folder 1686 * @param start the lower bound of the range of results 1687 * @param end the upper bound of the range of results (not inclusive) 1688 * @return the name-ordered range of immediate subfolders of the parent 1689 folder that are used for mounting third-party repositories 1690 * @throws PortalException if the repository or parent folder could not be 1691 found 1692 */ 1693 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getMountFolders( 1694 long repositoryId, long parentFolderId, int start, int end) 1695 throws RemoteException { 1696 try { 1697 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1698 DLAppServiceUtil.getMountFolders(repositoryId, parentFolderId, 1699 start, end); 1700 1701 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1702 } 1703 catch (Exception e) { 1704 _log.error(e, e); 1705 1706 throw new RemoteException(e.getMessage()); 1707 } 1708 } 1709 1710 /** 1711 * Returns an ordered range of all the immediate subfolders of the parent 1712 * folder that are used for mounting third-party repositories. This method 1713 * is only supported by the Liferay repository. 1714 * 1715 * <p> 1716 * Useful when paginating results. Returns a maximum of <code>end - 1717 * start</code> instances. <code>start</code> and <code>end</code> are not 1718 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1719 * refers to the first result in the set. Setting both <code>start</code> 1720 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1721 * result set. 1722 * </p> 1723 * 1724 * @param repositoryId the primary key of the folder's repository 1725 * @param parentFolderId the primary key of the folder's parent folder 1726 * @param start the lower bound of the range of results 1727 * @param end the upper bound of the range of results (not inclusive) 1728 * @param obc the comparator to order the folders (optionally 1729 <code>null</code>) 1730 * @return the range of immediate subfolders of the parent folder that are 1731 used for mounting third-party repositories ordered by comparator 1732 <code>obc</code> 1733 * @throws PortalException if the repository or parent folder could not be 1734 found 1735 */ 1736 public static com.liferay.portal.kernel.repository.model.FolderSoap[] getMountFolders( 1737 long repositoryId, long parentFolderId, int start, int end, 1738 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 1739 throws RemoteException { 1740 try { 1741 java.util.List<com.liferay.portal.kernel.repository.model.Folder> returnValue = 1742 DLAppServiceUtil.getMountFolders(repositoryId, parentFolderId, 1743 start, end, obc); 1744 1745 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModels(returnValue); 1746 } 1747 catch (Exception e) { 1748 _log.error(e, e); 1749 1750 throw new RemoteException(e.getMessage()); 1751 } 1752 } 1753 1754 /** 1755 * Returns the number of immediate subfolders of the parent folder that are 1756 * used for mounting third-party repositories. This method is only supported 1757 * by the Liferay repository. 1758 * 1759 * @param repositoryId the primary key of the repository 1760 * @param parentFolderId the primary key of the parent folder 1761 * @return the number of folders of the parent folder that are used for 1762 mounting third-party repositories 1763 * @throws PortalException if the repository or parent folder could not be 1764 found 1765 */ 1766 public static int getMountFoldersCount(long repositoryId, 1767 long parentFolderId) throws RemoteException { 1768 try { 1769 int returnValue = DLAppServiceUtil.getMountFoldersCount(repositoryId, 1770 parentFolderId); 1771 1772 return returnValue; 1773 } 1774 catch (Exception e) { 1775 _log.error(e, e); 1776 1777 throw new RemoteException(e.getMessage()); 1778 } 1779 } 1780 1781 public static void getSubfolderIds(long repositoryId, Long[] folderIds, 1782 long folderId) throws RemoteException { 1783 try { 1784 DLAppServiceUtil.getSubfolderIds(repositoryId, 1785 ListUtil.toList(folderIds), folderId); 1786 } 1787 catch (Exception e) { 1788 _log.error(e, e); 1789 1790 throw new RemoteException(e.getMessage()); 1791 } 1792 } 1793 1794 /** 1795 * Returns all the descendant folders of the folder with the primary key. 1796 * 1797 * @param repositoryId the primary key of the repository 1798 * @param folderId the primary key of the folder 1799 * @return the descendant folders of the folder with the primary key 1800 * @throws PortalException if the repository or parent folder could not be 1801 found 1802 */ 1803 public static java.lang.Long[] getSubfolderIds(long repositoryId, 1804 long folderId) throws RemoteException { 1805 try { 1806 java.util.List<java.lang.Long> returnValue = DLAppServiceUtil.getSubfolderIds(repositoryId, 1807 folderId); 1808 1809 return returnValue.toArray(new java.lang.Long[returnValue.size()]); 1810 } 1811 catch (Exception e) { 1812 _log.error(e, e); 1813 1814 throw new RemoteException(e.getMessage()); 1815 } 1816 } 1817 1818 /** 1819 * Returns descendant folders of the folder with the primary key, optionally 1820 * limiting to one level deep. 1821 * 1822 * @param repositoryId the primary key of the repository 1823 * @param folderId the primary key of the folder 1824 * @param recurse whether to recurse through each subfolder 1825 * @return the descendant folders of the folder with the primary key 1826 * @throws PortalException if the repository or parent folder could not be 1827 found 1828 */ 1829 public static java.lang.Long[] getSubfolderIds(long repositoryId, 1830 long folderId, boolean recurse) throws RemoteException { 1831 try { 1832 java.util.List<java.lang.Long> returnValue = DLAppServiceUtil.getSubfolderIds(repositoryId, 1833 folderId, recurse); 1834 1835 return returnValue.toArray(new java.lang.Long[returnValue.size()]); 1836 } 1837 catch (Exception e) { 1838 _log.error(e, e); 1839 1840 throw new RemoteException(e.getMessage()); 1841 } 1842 } 1843 1844 /** 1845 * Returns all the temporary file entry names. 1846 * 1847 * @param groupId the primary key of the group 1848 * @param folderId the primary key of the folder where the file entry will 1849 eventually reside 1850 * @param folderName the temporary folder's name 1851 * @return the temporary file entry names 1852 * @throws PortalException if the folder was invalid 1853 * @see #addTempFileEntry(long, long, String, String, File, String) 1854 * @see TempFileEntryUtil 1855 */ 1856 public static java.lang.String[] getTempFileNames(long groupId, 1857 long folderId, java.lang.String folderName) throws RemoteException { 1858 try { 1859 java.lang.String[] returnValue = DLAppServiceUtil.getTempFileNames(groupId, 1860 folderId, folderName); 1861 1862 return returnValue; 1863 } 1864 catch (Exception e) { 1865 _log.error(e, e); 1866 1867 throw new RemoteException(e.getMessage()); 1868 } 1869 } 1870 1871 /** 1872 * Locks the folder. This method is primarily used by WebDAV. 1873 * 1874 * @param repositoryId the primary key of the repository 1875 * @param folderId the primary key of the folder 1876 * @return the lock object 1877 * @throws PortalException if the repository or folder could not be found 1878 */ 1879 public static com.liferay.portal.kernel.lock.Lock lockFolder( 1880 long repositoryId, long folderId) throws RemoteException { 1881 try { 1882 com.liferay.portal.kernel.lock.Lock returnValue = DLAppServiceUtil.lockFolder(repositoryId, 1883 folderId); 1884 1885 return returnValue; 1886 } 1887 catch (Exception e) { 1888 _log.error(e, e); 1889 1890 throw new RemoteException(e.getMessage()); 1891 } 1892 } 1893 1894 /** 1895 * Locks the folder. This method is primarily used by WebDAV. 1896 * 1897 * @param repositoryId the primary key of the repository 1898 * @param folderId the primary key of the folder 1899 * @param owner the owner string for the checkout (optionally 1900 <code>null</code>) 1901 * @param inheritable whether the lock must propagate to descendants 1902 * @param expirationTime the time in milliseconds before the lock expires. 1903 If the value is <code>0</code>, the default expiration time will 1904 be used from <code>portal.properties>. 1905 * @return the lock object 1906 * @throws PortalException if the repository or folder could not be found 1907 */ 1908 public static com.liferay.portal.kernel.lock.Lock lockFolder( 1909 long repositoryId, long folderId, java.lang.String owner, 1910 boolean inheritable, long expirationTime) throws RemoteException { 1911 try { 1912 com.liferay.portal.kernel.lock.Lock returnValue = DLAppServiceUtil.lockFolder(repositoryId, 1913 folderId, owner, inheritable, expirationTime); 1914 1915 return returnValue; 1916 } 1917 catch (Exception e) { 1918 _log.error(e, e); 1919 1920 throw new RemoteException(e.getMessage()); 1921 } 1922 } 1923 1924 /** 1925 * Moves the file entry to the new folder. 1926 * 1927 * @param fileEntryId the primary key of the file entry 1928 * @param newFolderId the primary key of the new folder 1929 * @param serviceContext the service context to be applied 1930 * @return the file entry 1931 * @throws PortalException if the file entry or the new folder could not be 1932 found 1933 */ 1934 public static com.liferay.portal.kernel.repository.model.FileEntrySoap moveFileEntry( 1935 long fileEntryId, long newFolderId, 1936 com.liferay.portal.service.ServiceContext serviceContext) 1937 throws RemoteException { 1938 try { 1939 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.moveFileEntry(fileEntryId, 1940 newFolderId, serviceContext); 1941 1942 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 1943 } 1944 catch (Exception e) { 1945 _log.error(e, e); 1946 1947 throw new RemoteException(e.getMessage()); 1948 } 1949 } 1950 1951 /** 1952 * Moves the file entry from a trashed folder to the new folder. 1953 * 1954 * @param fileEntryId the primary key of the file entry 1955 * @param newFolderId the primary key of the new folder 1956 * @param serviceContext the service context to be applied 1957 * @return the file entry 1958 * @throws PortalException if the file entry or the new folder could not be 1959 found 1960 */ 1961 public static com.liferay.portal.kernel.repository.model.FileEntrySoap moveFileEntryFromTrash( 1962 long fileEntryId, long newFolderId, 1963 com.liferay.portal.service.ServiceContext serviceContext) 1964 throws RemoteException { 1965 try { 1966 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.moveFileEntryFromTrash(fileEntryId, 1967 newFolderId, serviceContext); 1968 1969 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 1970 } 1971 catch (Exception e) { 1972 _log.error(e, e); 1973 1974 throw new RemoteException(e.getMessage()); 1975 } 1976 } 1977 1978 /** 1979 * Moves the file entry with the primary key to the trash portlet. 1980 * 1981 * @param fileEntryId the primary key of the file entry 1982 * @return the file entry 1983 * @throws PortalException if the file entry could not be found 1984 */ 1985 public static com.liferay.portal.kernel.repository.model.FileEntrySoap moveFileEntryToTrash( 1986 long fileEntryId) throws RemoteException { 1987 try { 1988 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.moveFileEntryToTrash(fileEntryId); 1989 1990 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 1991 } 1992 catch (Exception e) { 1993 _log.error(e, e); 1994 1995 throw new RemoteException(e.getMessage()); 1996 } 1997 } 1998 1999 /** 2000 * Moves the folder to the new parent folder with the primary key. 2001 * 2002 * @param folderId the primary key of the folder 2003 * @param parentFolderId the primary key of the new parent folder 2004 * @param serviceContext the service context to be applied 2005 * @return the file entry 2006 * @throws PortalException if the folder could not be found 2007 */ 2008 public static com.liferay.portal.kernel.repository.model.FolderSoap moveFolder( 2009 long folderId, long parentFolderId, 2010 com.liferay.portal.service.ServiceContext serviceContext) 2011 throws RemoteException { 2012 try { 2013 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.moveFolder(folderId, 2014 parentFolderId, serviceContext); 2015 2016 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 2017 } 2018 catch (Exception e) { 2019 _log.error(e, e); 2020 2021 throw new RemoteException(e.getMessage()); 2022 } 2023 } 2024 2025 /** 2026 * Moves the folder with the primary key from the trash portlet to the new 2027 * parent folder with the primary key. 2028 * 2029 * @param folderId the primary key of the folder 2030 * @param parentFolderId the primary key of the new parent folder 2031 * @param serviceContext the service context to be applied 2032 * @return the file entry 2033 * @throws PortalException if the folder could not be found 2034 */ 2035 public static com.liferay.portal.kernel.repository.model.FolderSoap moveFolderFromTrash( 2036 long folderId, long parentFolderId, 2037 com.liferay.portal.service.ServiceContext serviceContext) 2038 throws RemoteException { 2039 try { 2040 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.moveFolderFromTrash(folderId, 2041 parentFolderId, serviceContext); 2042 2043 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 2044 } 2045 catch (Exception e) { 2046 _log.error(e, e); 2047 2048 throw new RemoteException(e.getMessage()); 2049 } 2050 } 2051 2052 /** 2053 * Moves the folder with the primary key to the trash portlet. 2054 * 2055 * @param folderId the primary key of the folder 2056 * @return the file entry 2057 * @throws PortalException if the folder could not be found 2058 */ 2059 public static com.liferay.portal.kernel.repository.model.FolderSoap moveFolderToTrash( 2060 long folderId) throws RemoteException { 2061 try { 2062 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.moveFolderToTrash(folderId); 2063 2064 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 2065 } 2066 catch (Exception e) { 2067 _log.error(e, e); 2068 2069 throw new RemoteException(e.getMessage()); 2070 } 2071 } 2072 2073 /** 2074 * Refreshes the lock for the file entry. This method is primarily used by 2075 * WebDAV. 2076 * 2077 * @param lockUuid the lock's UUID 2078 * @param companyId the primary key of the file entry's company 2079 * @param expirationTime the time in milliseconds before the lock expires. 2080 If the value is <code>0</code>, the default expiration time will 2081 be used from <code>portal.properties>. 2082 * @return the lock object 2083 * @throws PortalException if the file entry or lock could not be found 2084 */ 2085 public static com.liferay.portal.kernel.lock.Lock refreshFileEntryLock( 2086 java.lang.String lockUuid, long companyId, long expirationTime) 2087 throws RemoteException { 2088 try { 2089 com.liferay.portal.kernel.lock.Lock returnValue = DLAppServiceUtil.refreshFileEntryLock(lockUuid, 2090 companyId, expirationTime); 2091 2092 return returnValue; 2093 } 2094 catch (Exception e) { 2095 _log.error(e, e); 2096 2097 throw new RemoteException(e.getMessage()); 2098 } 2099 } 2100 2101 /** 2102 * Refreshes the lock for the folder. This method is primarily used by 2103 * WebDAV. 2104 * 2105 * @param lockUuid the lock's UUID 2106 * @param companyId the primary key of the file entry's company 2107 * @param expirationTime the time in milliseconds before the lock expires. 2108 If the value is <code>0</code>, the default expiration time will 2109 be used from <code>portal.properties>. 2110 * @return the lock object 2111 * @throws PortalException if the folder or lock could not be found 2112 */ 2113 public static com.liferay.portal.kernel.lock.Lock refreshFolderLock( 2114 java.lang.String lockUuid, long companyId, long expirationTime) 2115 throws RemoteException { 2116 try { 2117 com.liferay.portal.kernel.lock.Lock returnValue = DLAppServiceUtil.refreshFolderLock(lockUuid, 2118 companyId, expirationTime); 2119 2120 return returnValue; 2121 } 2122 catch (Exception e) { 2123 _log.error(e, e); 2124 2125 throw new RemoteException(e.getMessage()); 2126 } 2127 } 2128 2129 /** 2130 * Restores the file entry with the primary key from the trash portlet. 2131 * 2132 * @param fileEntryId the primary key of the file entry 2133 * @throws PortalException if the file entry could not be found 2134 */ 2135 public static void restoreFileEntryFromTrash(long fileEntryId) 2136 throws RemoteException { 2137 try { 2138 DLAppServiceUtil.restoreFileEntryFromTrash(fileEntryId); 2139 } 2140 catch (Exception e) { 2141 _log.error(e, e); 2142 2143 throw new RemoteException(e.getMessage()); 2144 } 2145 } 2146 2147 /** 2148 * Restores the file shortcut with the primary key from the trash portlet. 2149 * 2150 * @param fileShortcutId the primary key of the file shortcut 2151 * @throws PortalException if the file shortcut could not be found 2152 */ 2153 public static void restoreFileShortcutFromTrash(long fileShortcutId) 2154 throws RemoteException { 2155 try { 2156 DLAppServiceUtil.restoreFileShortcutFromTrash(fileShortcutId); 2157 } 2158 catch (Exception e) { 2159 _log.error(e, e); 2160 2161 throw new RemoteException(e.getMessage()); 2162 } 2163 } 2164 2165 /** 2166 * Restores the folder with the primary key from the trash portlet. 2167 * 2168 * @param folderId the primary key of the folder 2169 * @throws PortalException if the folder could not be found 2170 */ 2171 public static void restoreFolderFromTrash(long folderId) 2172 throws RemoteException { 2173 try { 2174 DLAppServiceUtil.restoreFolderFromTrash(folderId); 2175 } 2176 catch (Exception e) { 2177 _log.error(e, e); 2178 2179 throw new RemoteException(e.getMessage()); 2180 } 2181 } 2182 2183 /** 2184 * Reverts the file entry to a previous version. A new version will be 2185 * created based on the previous version and metadata. 2186 * 2187 * @param fileEntryId the primary key of the file entry 2188 * @param version the version to revert back to 2189 * @param serviceContext the service context to be applied 2190 * @throws PortalException if the file entry or version could not be found 2191 */ 2192 public static void revertFileEntry(long fileEntryId, 2193 java.lang.String version, 2194 com.liferay.portal.service.ServiceContext serviceContext) 2195 throws RemoteException { 2196 try { 2197 DLAppServiceUtil.revertFileEntry(fileEntryId, version, 2198 serviceContext); 2199 } 2200 catch (Exception e) { 2201 _log.error(e, e); 2202 2203 throw new RemoteException(e.getMessage()); 2204 } 2205 } 2206 2207 /** 2208 * Subscribe the user to changes in documents of the file entry type. This 2209 * method is only supported by the Liferay repository. 2210 * 2211 * @param groupId the primary key of the file entry type's group 2212 * @param fileEntryTypeId the primary key of the file entry type 2213 * @throws PortalException if the user or group could not be found, or if 2214 subscribing was not permissible 2215 */ 2216 public static void subscribeFileEntryType(long groupId, long fileEntryTypeId) 2217 throws RemoteException { 2218 try { 2219 DLAppServiceUtil.subscribeFileEntryType(groupId, fileEntryTypeId); 2220 } 2221 catch (Exception e) { 2222 _log.error(e, e); 2223 2224 throw new RemoteException(e.getMessage()); 2225 } 2226 } 2227 2228 /** 2229 * Subscribe the user to document changes in the folder. This method is only 2230 * supported by the Liferay repository. 2231 * 2232 * @param groupId the primary key of the folder's group 2233 * @param folderId the primary key of the folder 2234 * @throws PortalException if the user or group could not be found, or if 2235 subscribing was not permissible 2236 */ 2237 public static void subscribeFolder(long groupId, long folderId) 2238 throws RemoteException { 2239 try { 2240 DLAppServiceUtil.subscribeFolder(groupId, folderId); 2241 } 2242 catch (Exception e) { 2243 _log.error(e, e); 2244 2245 throw new RemoteException(e.getMessage()); 2246 } 2247 } 2248 2249 /** 2250 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 2251 boolean, String, ServiceContext)}. 2252 */ 2253 @Deprecated 2254 public static void unlockFileEntry(long fileEntryId) 2255 throws RemoteException { 2256 try { 2257 DLAppServiceUtil.unlockFileEntry(fileEntryId); 2258 } 2259 catch (Exception e) { 2260 _log.error(e, e); 2261 2262 throw new RemoteException(e.getMessage()); 2263 } 2264 } 2265 2266 /** 2267 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 2268 String)}. 2269 */ 2270 @Deprecated 2271 public static void unlockFileEntry(long fileEntryId, 2272 java.lang.String lockUuid) throws RemoteException { 2273 try { 2274 DLAppServiceUtil.unlockFileEntry(fileEntryId, lockUuid); 2275 } 2276 catch (Exception e) { 2277 _log.error(e, e); 2278 2279 throw new RemoteException(e.getMessage()); 2280 } 2281 } 2282 2283 /** 2284 * Unlocks the folder. This method is primarily used by WebDAV. 2285 * 2286 * @param repositoryId the primary key of the repository 2287 * @param folderId the primary key of the folder 2288 * @param lockUuid the lock's UUID 2289 * @throws PortalException if the repository or folder could not be found 2290 */ 2291 public static void unlockFolder(long repositoryId, long folderId, 2292 java.lang.String lockUuid) throws RemoteException { 2293 try { 2294 DLAppServiceUtil.unlockFolder(repositoryId, folderId, lockUuid); 2295 } 2296 catch (Exception e) { 2297 _log.error(e, e); 2298 2299 throw new RemoteException(e.getMessage()); 2300 } 2301 } 2302 2303 /** 2304 * Unlocks the folder. This method is primarily used by WebDAV. 2305 * 2306 * @param repositoryId the primary key of the repository 2307 * @param parentFolderId the primary key of the parent folder 2308 * @param name the folder's name 2309 * @param lockUuid the lock's UUID 2310 * @throws PortalException if the repository or folder could not be found 2311 */ 2312 public static void unlockFolder(long repositoryId, long parentFolderId, 2313 java.lang.String name, java.lang.String lockUuid) 2314 throws RemoteException { 2315 try { 2316 DLAppServiceUtil.unlockFolder(repositoryId, parentFolderId, name, 2317 lockUuid); 2318 } 2319 catch (Exception e) { 2320 _log.error(e, e); 2321 2322 throw new RemoteException(e.getMessage()); 2323 } 2324 } 2325 2326 /** 2327 * Unsubscribe the user from changes in documents of the file entry type. 2328 * This method is only supported by the Liferay repository. 2329 * 2330 * @param groupId the primary key of the file entry type's group 2331 * @param fileEntryTypeId the primary key of the file entry type 2332 * @throws PortalException if the user or group could not be found, or if 2333 unsubscribing was not permissible 2334 */ 2335 public static void unsubscribeFileEntryType(long groupId, 2336 long fileEntryTypeId) throws RemoteException { 2337 try { 2338 DLAppServiceUtil.unsubscribeFileEntryType(groupId, fileEntryTypeId); 2339 } 2340 catch (Exception e) { 2341 _log.error(e, e); 2342 2343 throw new RemoteException(e.getMessage()); 2344 } 2345 } 2346 2347 /** 2348 * Unsubscribe the user from document changes in the folder. This method is 2349 * only supported by the Liferay repository. 2350 * 2351 * @param groupId the primary key of the folder's group 2352 * @param folderId the primary key of the folder 2353 * @throws PortalException if the user or group could not be found, or if 2354 unsubscribing was not permissible 2355 */ 2356 public static void unsubscribeFolder(long groupId, long folderId) 2357 throws RemoteException { 2358 try { 2359 DLAppServiceUtil.unsubscribeFolder(groupId, folderId); 2360 } 2361 catch (Exception e) { 2362 _log.error(e, e); 2363 2364 throw new RemoteException(e.getMessage()); 2365 } 2366 } 2367 2368 /** 2369 * Updates a file entry and associated metadata based on a byte array 2370 * object. If the file data is <code>null</code>, then only the associated 2371 * metadata (i.e., <code>title</code>, <code>description</code>, and 2372 * parameters in the <code>serviceContext</code>) will be updated. 2373 * 2374 * <p> 2375 * This method takes two file names, the <code>sourceFileName</code> and the 2376 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 2377 * name of the actual file being uploaded. The <code>title</code> 2378 * corresponds to a name the client wishes to assign this file after it has 2379 * been uploaded to the portal. 2380 * </p> 2381 * 2382 * @param fileEntryId the primary key of the file entry 2383 * @param sourceFileName the original file's name (optionally 2384 <code>null</code>) 2385 * @param mimeType the file's MIME type (optionally <code>null</code>) 2386 * @param title the new name to be assigned to the file (optionally <code> 2387 <code>null</code></code>) 2388 * @param description the file's new description 2389 * @param changeLog the file's version change log (optionally 2390 <code>null</code>) 2391 * @param majorVersion whether the new file version is a major version 2392 * @param bytes the file's data (optionally <code>null</code>) 2393 * @param serviceContext the service context to be applied. Can set the 2394 asset category IDs, asset tag names, and expando bridge 2395 attributes for the file entry. In a Liferay repository, it may 2396 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 2397 type </li> <li> fieldsMap - mapping for fields associated with a 2398 custom file entry type </li> </ul> 2399 * @return the file entry 2400 * @throws PortalException if the file entry could not be found 2401 */ 2402 public static com.liferay.portal.kernel.repository.model.FileEntrySoap updateFileEntry( 2403 long fileEntryId, java.lang.String sourceFileName, 2404 java.lang.String mimeType, java.lang.String title, 2405 java.lang.String description, java.lang.String changeLog, 2406 boolean majorVersion, byte[] bytes, 2407 com.liferay.portal.service.ServiceContext serviceContext) 2408 throws RemoteException { 2409 try { 2410 com.liferay.portal.kernel.repository.model.FileEntry returnValue = DLAppServiceUtil.updateFileEntry(fileEntryId, 2411 sourceFileName, mimeType, title, description, changeLog, 2412 majorVersion, bytes, serviceContext); 2413 2414 return com.liferay.portal.kernel.repository.model.FileEntrySoap.toSoapModel(returnValue); 2415 } 2416 catch (Exception e) { 2417 _log.error(e, e); 2418 2419 throw new RemoteException(e.getMessage()); 2420 } 2421 } 2422 2423 /** 2424 * Updates the folder. 2425 * 2426 * @param folderId the primary key of the folder 2427 * @param name the folder's new name 2428 * @param description the folder's new description 2429 * @param serviceContext the service context to be applied. In a Liferay 2430 repository, it may include: <ul> <li> defaultFileEntryTypeId - 2431 the file entry type to default all Liferay file entries to </li> 2432 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 2433 comma-delimited list of file entry type primary keys allowed in 2434 the given folder and all descendants </li> <li> restrictionType - 2435 specifying restriction type of file entry types allowed </li> 2436 <li> workflowDefinitionXYZ - the workflow definition name 2437 specified per file entry type. The parameter name must be the 2438 string <code>workflowDefinition</code> appended by the 2439 <code>fileEntryTypeId</code> (optionally <code>0</code>).</li> 2440 </ul> 2441 * @return the folder 2442 * @throws PortalException if the current or new parent folder could not be 2443 found or if the new parent folder's information was invalid 2444 */ 2445 public static com.liferay.portal.kernel.repository.model.FolderSoap updateFolder( 2446 long folderId, java.lang.String name, java.lang.String description, 2447 com.liferay.portal.service.ServiceContext serviceContext) 2448 throws RemoteException { 2449 try { 2450 com.liferay.portal.kernel.repository.model.Folder returnValue = DLAppServiceUtil.updateFolder(folderId, 2451 name, description, serviceContext); 2452 2453 return com.liferay.portal.kernel.repository.model.FolderSoap.toSoapModel(returnValue); 2454 } 2455 catch (Exception e) { 2456 _log.error(e, e); 2457 2458 throw new RemoteException(e.getMessage()); 2459 } 2460 } 2461 2462 /** 2463 * Returns <code>true</code> if the file entry is checked out. This method 2464 * is primarily used by WebDAV. 2465 * 2466 * @param repositoryId the primary key for the repository 2467 * @param fileEntryId the primary key for the file entry 2468 * @param lockUuid the lock's UUID 2469 * @return <code>true</code> if the file entry is checked out; 2470 <code>false</code> otherwise 2471 * @throws PortalException if the file entry could not be found 2472 */ 2473 public static boolean verifyFileEntryCheckOut(long repositoryId, 2474 long fileEntryId, java.lang.String lockUuid) throws RemoteException { 2475 try { 2476 boolean returnValue = DLAppServiceUtil.verifyFileEntryCheckOut(repositoryId, 2477 fileEntryId, lockUuid); 2478 2479 return returnValue; 2480 } 2481 catch (Exception e) { 2482 _log.error(e, e); 2483 2484 throw new RemoteException(e.getMessage()); 2485 } 2486 } 2487 2488 public static boolean verifyFileEntryLock(long repositoryId, 2489 long fileEntryId, java.lang.String lockUuid) throws RemoteException { 2490 try { 2491 boolean returnValue = DLAppServiceUtil.verifyFileEntryLock(repositoryId, 2492 fileEntryId, lockUuid); 2493 2494 return returnValue; 2495 } 2496 catch (Exception e) { 2497 _log.error(e, e); 2498 2499 throw new RemoteException(e.getMessage()); 2500 } 2501 } 2502 2503 /** 2504 * Returns <code>true</code> if the inheritable lock exists. This method is 2505 * primarily used by WebDAV. 2506 * 2507 * @param repositoryId the primary key for the repository 2508 * @param folderId the primary key for the folder 2509 * @param lockUuid the lock's UUID 2510 * @return <code>true</code> if the inheritable lock exists; 2511 <code>false</code> otherwise 2512 * @throws PortalException if the folder could not be found 2513 */ 2514 public static boolean verifyInheritableLock(long repositoryId, 2515 long folderId, java.lang.String lockUuid) throws RemoteException { 2516 try { 2517 boolean returnValue = DLAppServiceUtil.verifyInheritableLock(repositoryId, 2518 folderId, lockUuid); 2519 2520 return returnValue; 2521 } 2522 catch (Exception e) { 2523 _log.error(e, e); 2524 2525 throw new RemoteException(e.getMessage()); 2526 } 2527 } 2528 2529 private static Log _log = LogFactoryUtil.getLog(DLAppServiceSoap.class); 2530 }