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