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