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