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