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