001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portlet.documentlibrary.service; 016 017 import com.liferay.portal.service.ServiceWrapper; 018 019 /** 020 * <p> 021 * This class is a wrapper for {@link DLAppLocalService}. 022 * </p> 023 * 024 * @author Brian Wing Shun Chan 025 * @see DLAppLocalService 026 * @generated 027 */ 028 public class DLAppLocalServiceWrapper implements DLAppLocalService, 029 ServiceWrapper<DLAppLocalService> { 030 public DLAppLocalServiceWrapper(DLAppLocalService dlAppLocalService) { 031 _dlAppLocalService = dlAppLocalService; 032 } 033 034 /** 035 * Returns the Spring bean ID for this bean. 036 * 037 * @return the Spring bean ID for this bean 038 */ 039 public java.lang.String getBeanIdentifier() { 040 return _dlAppLocalService.getBeanIdentifier(); 041 } 042 043 /** 044 * Sets the Spring bean ID for this bean. 045 * 046 * @param beanIdentifier the Spring bean ID for this bean 047 */ 048 public void setBeanIdentifier(java.lang.String beanIdentifier) { 049 _dlAppLocalService.setBeanIdentifier(beanIdentifier); 050 } 051 052 /** 053 * Adds a file entry and associated metadata based on a byte array. 054 * 055 * <p> 056 * This method takes two file names, the <code>sourceFileName</code> and the 057 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 058 * name of the actual file being uploaded. The <code>title</code> 059 * corresponds to a name the client wishes to assign this file after it has 060 * been uploaded to the portal. If it is <code>null</code>, the <code> 061 * sourceFileName</code> will be used. 062 * </p> 063 * 064 * @param userId the primary key of the file entry's creator/owner 065 * @param repositoryId the primary key of the file entry's repository 066 * @param folderId the primary key of the file entry's parent folder 067 * @param sourceFileName the original file's name 068 * @param mimeType the file's MIME type 069 * @param title the name to be assigned to the file (optionally <code>null 070 </code>) 071 * @param description the file's description 072 * @param changeLog the file's version change log 073 * @param bytes the file's data (optionally <code>null</code>) 074 * @param serviceContext the service context to be applied. Can specify the 075 file entry's asset category IDs, asset tag names, and expando 076 bridge attributes. In a Liferay repository, it may include: 077 078 <ul> 079 <li> 080 fileEntryTypeId - ID for a custom file entry type 081 </li> 082 <li> 083 fieldsMap - mapping for fields associated with a custom file 084 entry type 085 </li> 086 </ul> 087 * @return the file entry 088 * @throws PortalException if the parent folder could not be 089 found or if the file entry's information was invalid 090 * @throws SystemException if a system exception occurred 091 */ 092 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 093 long userId, long repositoryId, long folderId, 094 java.lang.String sourceFileName, java.lang.String mimeType, 095 java.lang.String title, java.lang.String description, 096 java.lang.String changeLog, byte[] bytes, 097 com.liferay.portal.service.ServiceContext serviceContext) 098 throws com.liferay.portal.kernel.exception.PortalException, 099 com.liferay.portal.kernel.exception.SystemException { 100 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 101 sourceFileName, mimeType, title, description, changeLog, bytes, 102 serviceContext); 103 } 104 105 /** 106 * Adds a file entry and associated metadata based on a {@link File} object. 107 * 108 * <p> 109 * This method takes two file names, the <code>sourceFileName</code> and the 110 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 111 * name of the actual file being uploaded. The <code>title</code> 112 * corresponds to a name the client wishes to assign this file after it has 113 * been uploaded to the portal. If it is <code>null</code>, the <code> 114 * sourceFileName</code> will be used. 115 * </p> 116 * 117 * @param userId the primary key of the file entry's creator/owner 118 * @param repositoryId the primary key of the repository 119 * @param folderId the primary key of the file entry's parent folder 120 * @param sourceFileName the original file's name 121 * @param mimeType the file's MIME type 122 * @param title the name to be assigned to the file (optionally <code>null 123 </code>) 124 * @param description the file's description 125 * @param changeLog the file's version change log 126 * @param file the file's data (optionally <code>null</code>) 127 * @param serviceContext the service context to be applied. Can specify the 128 file entry's asset category IDs, asset tag names, and expando 129 bridge attributes. In a Liferay repository, it may include: 130 131 <ul> 132 <li> 133 fileEntryTypeId - ID for a custom file entry type 134 </li> 135 <li> 136 fieldsMap - mapping for fields associated with a custom file 137 entry type 138 </li> 139 </ul> 140 * @return the file entry 141 * @throws PortalException if the parent folder could not be 142 found or if the file entry's information was invalid 143 * @throws SystemException if a system exception occurred 144 */ 145 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 146 long userId, long repositoryId, long folderId, 147 java.lang.String sourceFileName, java.lang.String mimeType, 148 java.lang.String title, java.lang.String description, 149 java.lang.String changeLog, java.io.File file, 150 com.liferay.portal.service.ServiceContext serviceContext) 151 throws com.liferay.portal.kernel.exception.PortalException, 152 com.liferay.portal.kernel.exception.SystemException { 153 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 154 sourceFileName, mimeType, title, description, changeLog, file, 155 serviceContext); 156 } 157 158 /** 159 * Adds a file entry and associated metadata based on an {@link InputStream} 160 * object. 161 * 162 * <p> 163 * This method takes two file names, the <code>sourceFileName</code> and the 164 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 165 * name of the actual file being uploaded. The <code>title</code> 166 * corresponds to a name the client wishes to assign this file after it has 167 * been uploaded to the portal. If it is <code>null</code>, the <code> 168 * sourceFileName</code> will be used. 169 * </p> 170 * 171 * @param userId the primary key of the file entry's creator/owner 172 * @param repositoryId the primary key of the repository 173 * @param folderId the primary key of the file entry's parent folder 174 * @param sourceFileName the original file's name 175 * @param mimeType the file's MIME type 176 * @param title the name to be assigned to the file (optionally <code>null 177 </code>) 178 * @param description the file's description 179 * @param changeLog the file's version change log 180 * @param is the file's data (optionally <code>null</code>) 181 * @param size the file's size (optionally <code>0</code>) 182 * @param serviceContext the service context to be applied. Can specify the 183 file entry's asset category IDs, asset tag names, and expando 184 bridge attributes. In a Liferay repository, it may include: 185 186 <ul> 187 <li> 188 fileEntryTypeId - ID for a custom file entry type 189 </li> 190 <li> 191 fieldsMap - mapping for fields associated with a custom file 192 entry type 193 </li> 194 </ul> 195 * @return the file entry 196 * @throws PortalException if the parent folder could not 197 be found or if the file entry's information was invalid 198 * @throws SystemException if a system exception occurred 199 */ 200 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 201 long userId, long repositoryId, long folderId, 202 java.lang.String sourceFileName, java.lang.String mimeType, 203 java.lang.String title, java.lang.String description, 204 java.lang.String changeLog, java.io.InputStream is, long size, 205 com.liferay.portal.service.ServiceContext serviceContext) 206 throws com.liferay.portal.kernel.exception.PortalException, 207 com.liferay.portal.kernel.exception.SystemException { 208 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 209 sourceFileName, mimeType, title, description, changeLog, is, size, 210 serviceContext); 211 } 212 213 /** 214 * Adds the file rank to the existing file entry. This method is only 215 * supported by the Liferay repository. 216 * 217 * @param repositoryId the primary key of the repository 218 * @param companyId the primary key of the company 219 * @param userId the primary key of the file rank's creator/owner 220 * @param fileEntryId the primary key of the file entry 221 * @param serviceContext the service context to be applied 222 * @return the file rank 223 * @throws SystemException if a system exception occurred 224 */ 225 public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank( 226 long repositoryId, long companyId, long userId, long fileEntryId, 227 com.liferay.portal.service.ServiceContext serviceContext) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return _dlAppLocalService.addFileRank(repositoryId, companyId, userId, 230 fileEntryId, serviceContext); 231 } 232 233 /** 234 * Adds the file shortcut to the existing file entry. This method is only 235 * supported by the Liferay repository. 236 * 237 * @param userId the primary key of the file shortcut's creator/owner 238 * @param repositoryId the primary key of the repository 239 * @param folderId the primary key of the file shortcut's parent folder 240 * @param toFileEntryId the primary key of the file entry to point to 241 * @param serviceContext the service context to be applied. Can specify the 242 file entry's asset category IDs, asset tag names, and expando 243 bridge attributes. 244 * @return the file shortcut 245 * @throws PortalException if the parent folder or file entry could not be 246 found, or if the file shortcut's information was invalid 247 * @throws SystemException if a system exception occurred 248 */ 249 public com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut( 250 long userId, long repositoryId, long folderId, long toFileEntryId, 251 com.liferay.portal.service.ServiceContext serviceContext) 252 throws com.liferay.portal.kernel.exception.PortalException, 253 com.liferay.portal.kernel.exception.SystemException { 254 return _dlAppLocalService.addFileShortcut(userId, repositoryId, 255 folderId, toFileEntryId, serviceContext); 256 } 257 258 /** 259 * Adds a folder. 260 * 261 * @param userId the primary key of the folder's creator/owner 262 * @param repositoryId the primary key of the repository 263 * @param parentFolderId the primary key of the folder's parent folder 264 * @param name the folder's name 265 * @param description the folder's description 266 * @param serviceContext the service context to be applied. In a Liferay 267 repository, it may include mountPoint which is a boolean 268 specifying whether the folder is a facade for mounting a 269 third-party repository 270 * @return the folder 271 * @throws PortalException if the parent folder could not 272 be found or if the new folder's information was invalid 273 * @throws SystemException if a system exception occurred 274 */ 275 public com.liferay.portal.kernel.repository.model.Folder addFolder( 276 long userId, long repositoryId, long parentFolderId, 277 java.lang.String name, java.lang.String description, 278 com.liferay.portal.service.ServiceContext serviceContext) 279 throws com.liferay.portal.kernel.exception.PortalException, 280 com.liferay.portal.kernel.exception.SystemException { 281 return _dlAppLocalService.addFolder(userId, repositoryId, 282 parentFolderId, name, description, serviceContext); 283 } 284 285 /** 286 * Delete all data associated to the given repository. This method is only 287 * supported by the Liferay repository. 288 * 289 * @param repositoryId the primary key of the data's repository 290 * @throws PortalException if the repository could not be 291 found 292 * @throws SystemException if a system exception occurred 293 */ 294 public void deleteAll(long repositoryId) 295 throws com.liferay.portal.kernel.exception.PortalException, 296 com.liferay.portal.kernel.exception.SystemException { 297 _dlAppLocalService.deleteAll(repositoryId); 298 } 299 300 /** 301 * Deletes the file entry. 302 * 303 * @param fileEntryId the primary key of the file entry 304 * @throws PortalException if the file entry could not be 305 found 306 * @throws SystemException if a system exception occurred 307 */ 308 public void deleteFileEntry(long fileEntryId) 309 throws com.liferay.portal.kernel.exception.PortalException, 310 com.liferay.portal.kernel.exception.SystemException { 311 _dlAppLocalService.deleteFileEntry(fileEntryId); 312 } 313 314 /** 315 * Deletes the file ranks associated to a given file entry. This method is 316 * only supported by the Liferay repository. 317 * 318 * @param fileEntryId the primary key of the file entry 319 * @throws SystemException if a system exception occurred 320 */ 321 public void deleteFileRanksByFileEntryId(long fileEntryId) 322 throws com.liferay.portal.kernel.exception.SystemException { 323 _dlAppLocalService.deleteFileRanksByFileEntryId(fileEntryId); 324 } 325 326 /** 327 * Deletes the file ranks associated to a given user. This method is only 328 * supported by the Liferay repository. 329 * 330 * @param userId the primary key of the user 331 * @throws SystemException if a system exception occurred 332 */ 333 public void deleteFileRanksByUserId(long userId) 334 throws com.liferay.portal.kernel.exception.SystemException { 335 _dlAppLocalService.deleteFileRanksByUserId(userId); 336 } 337 338 /** 339 * Deletes the file shortcut. This method is only supported by the Liferay 340 * repository. 341 * 342 * @param dlFileShortcut the file shortcut 343 * @throws PortalException if the file shortcut could not be found 344 * @throws SystemException if a system exception occurred 345 */ 346 public void deleteFileShortcut( 347 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut) 348 throws com.liferay.portal.kernel.exception.PortalException, 349 com.liferay.portal.kernel.exception.SystemException { 350 _dlAppLocalService.deleteFileShortcut(dlFileShortcut); 351 } 352 353 /** 354 * Deletes the file shortcut. This method is only supported by the Liferay 355 * repository. 356 * 357 * @param fileShortcutId the primary key of the file shortcut 358 * @throws PortalException if the file shortcut could not 359 be found 360 * @throws SystemException if a system exception occurred 361 */ 362 public void deleteFileShortcut(long fileShortcutId) 363 throws com.liferay.portal.kernel.exception.PortalException, 364 com.liferay.portal.kernel.exception.SystemException { 365 _dlAppLocalService.deleteFileShortcut(fileShortcutId); 366 } 367 368 /** 369 * Deletes all file shortcuts associated to the file entry. This method is 370 * only supported by the Liferay repository. 371 * 372 * @param toFileEntryId the primary key of the associated file entry 373 * @throws PortalException if the file shortcut for the file entry could not be found 374 * @throws SystemException if a system exception occurred 375 */ 376 public void deleteFileShortcuts(long toFileEntryId) 377 throws com.liferay.portal.kernel.exception.PortalException, 378 com.liferay.portal.kernel.exception.SystemException { 379 _dlAppLocalService.deleteFileShortcuts(toFileEntryId); 380 } 381 382 /** 383 * Deletes the folder and all of its subfolders and file entries. 384 * 385 * @param folderId the primary key of the folder 386 * @throws PortalException if the folder could not be 387 found 388 * @throws SystemException if a system exception occurred 389 */ 390 public void deleteFolder(long folderId) 391 throws com.liferay.portal.kernel.exception.PortalException, 392 com.liferay.portal.kernel.exception.SystemException { 393 _dlAppLocalService.deleteFolder(folderId); 394 } 395 396 /** 397 * Returns the file entries in the folder. 398 * 399 * @param repositoryId the primary key of the file entry's repository 400 * @param folderId the primary key of the file entry's folder 401 * @return the file entries in the folder 402 * @throws PortalException if the folder could not be 403 found 404 * @throws SystemException if a system exception occurred 405 */ 406 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 407 long repositoryId, long folderId) 408 throws com.liferay.portal.kernel.exception.PortalException, 409 com.liferay.portal.kernel.exception.SystemException { 410 return _dlAppLocalService.getFileEntries(repositoryId, folderId); 411 } 412 413 /** 414 * Returns a range of all the file entries in the folder. 415 * 416 * <p> 417 * Useful when paginating results. Returns a maximum of <code>end - 418 * start</code> instances. <code>start</code> and <code>end</code> are not 419 * primary keys, they are indexes in the result set. Thus, <code>0</code> 420 * refers to the first result in the set. Setting both <code>start</code> 421 * and <code>end</code> to {@link 422 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 423 * result set. 424 * </p> 425 * 426 * @param repositoryId the primary key of the file entry's repository 427 * @param folderId the primary key of the file entry's folder 428 * @param start the lower bound of the range of results 429 * @param end the upper bound of the range of results (not inclusive) 430 * @return the range of file entries in the folder 431 * @throws PortalException if the folder could not be 432 found 433 * @throws SystemException if a system exception occurred 434 */ 435 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 436 long repositoryId, long folderId, int start, int end) 437 throws com.liferay.portal.kernel.exception.PortalException, 438 com.liferay.portal.kernel.exception.SystemException { 439 return _dlAppLocalService.getFileEntries(repositoryId, folderId, start, 440 end); 441 } 442 443 /** 444 * Returns an ordered range of all the file entries in the folder. 445 * 446 * <p> 447 * Useful when paginating results. Returns a maximum of <code>end - 448 * start</code> instances. <code>start</code> and <code>end</code> are not 449 * primary keys, they are indexes in the result set. Thus, <code>0</code> 450 * refers to the first result in the set. Setting both <code>start</code> 451 * and <code>end</code> to {@link 452 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 453 * result set. 454 * </p> 455 * 456 * @param repositoryId the primary key of the file entry's repository 457 * @param folderId the primary key of the file entry's folder 458 * @param start the lower bound of the range of results 459 * @param end the upper bound of the range of results (not inclusive) 460 * @param obc the comparator to order the file entries (optionally 461 <code>null</code>) 462 * @return the range of file entries in the folder ordered by comparator 463 <code>obc</code> 464 * @throws PortalException if the folder could not be 465 found 466 * @throws SystemException if a system exception occurred 467 */ 468 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 469 long repositoryId, long folderId, int start, int end, 470 com.liferay.portal.kernel.util.OrderByComparator obc) 471 throws com.liferay.portal.kernel.exception.PortalException, 472 com.liferay.portal.kernel.exception.SystemException { 473 return _dlAppLocalService.getFileEntries(repositoryId, folderId, start, 474 end, obc); 475 } 476 477 /** 478 * Returns a range of all the file entries and shortcuts in the folder. 479 * 480 * <p> 481 * Useful when paginating results. Returns a maximum of <code>end - 482 * start</code> instances. <code>start</code> and <code>end</code> are not 483 * primary keys, they are indexes in the result set. Thus, <code>0</code> 484 * refers to the first result in the set. Setting both <code>start</code> 485 * and <code>end</code> to {@link 486 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 487 * result set. 488 * </p> 489 * 490 * @param repositoryId the primary key of the repository 491 * @param folderId the primary key of the folder 492 * @param status the workflow status 493 * @param start the lower bound of the range of results 494 * @param end the upper bound of the range of results (not inclusive) 495 * @return the range of file entries and shortcuts in the folder 496 * @throws PortalException if the folder could not be 497 found 498 * @throws SystemException if a system exception occurred 499 */ 500 public java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts( 501 long repositoryId, long folderId, int status, int start, int end) 502 throws com.liferay.portal.kernel.exception.PortalException, 503 com.liferay.portal.kernel.exception.SystemException { 504 return _dlAppLocalService.getFileEntriesAndFileShortcuts(repositoryId, 505 folderId, status, start, end); 506 } 507 508 /** 509 * Returns the number of file entries and shortcuts in the folder. 510 * 511 * @param repositoryId the primary key of the repository 512 * @param folderId the primary key of the folder 513 * @param status the workflow status 514 * @return the number of file entries and shortcuts in the folder 515 * @throws PortalException if the folder could not be 516 found 517 * @throws SystemException if a system exception occurred 518 */ 519 public int getFileEntriesAndFileShortcutsCount(long repositoryId, 520 long folderId, int status) 521 throws com.liferay.portal.kernel.exception.PortalException, 522 com.liferay.portal.kernel.exception.SystemException { 523 return _dlAppLocalService.getFileEntriesAndFileShortcutsCount(repositoryId, 524 folderId, status); 525 } 526 527 /** 528 * Returns the number of file entries in the folder. 529 * 530 * @param repositoryId the primary key of the file entry's repository 531 * @param folderId the primary key of the file entry's folder 532 * @return the number of file entries in the folder 533 * @throws PortalException if the folder could not be 534 found 535 * @throws SystemException if a system exception occurred 536 */ 537 public int getFileEntriesCount(long repositoryId, long folderId) 538 throws com.liferay.portal.kernel.exception.PortalException, 539 com.liferay.portal.kernel.exception.SystemException { 540 return _dlAppLocalService.getFileEntriesCount(repositoryId, folderId); 541 } 542 543 /** 544 * Returns the file entry with the primary key. 545 * 546 * @param fileEntryId the primary key of the file entry 547 * @return the file entry with the primary key 548 * @throws PortalException if the file entry could not be 549 found 550 * @throws SystemException if a system exception occurred 551 */ 552 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 553 long fileEntryId) 554 throws com.liferay.portal.kernel.exception.PortalException, 555 com.liferay.portal.kernel.exception.SystemException { 556 return _dlAppLocalService.getFileEntry(fileEntryId); 557 } 558 559 /** 560 * Returns the file entry with the title in the folder. 561 * 562 * @param groupId the primary key of the file entry's group 563 * @param folderId the primary key of the file entry's folder 564 * @param title the file entry's title 565 * @return the file entry with the title in the folder 566 * @throws PortalException if the file entry could not be found 567 * @throws SystemException if a system exception occurred 568 */ 569 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 570 long groupId, long folderId, java.lang.String title) 571 throws com.liferay.portal.kernel.exception.PortalException, 572 com.liferay.portal.kernel.exception.SystemException { 573 return _dlAppLocalService.getFileEntry(groupId, folderId, title); 574 } 575 576 /** 577 * Returns the file entry with the UUID and group. 578 * 579 * @param uuid the file entry's universally unique identifier 580 * @param groupId the primary key of the file entry's group 581 * @return the file entry with the UUID and group 582 * @throws PortalException if the file entry could not be found 583 * @throws SystemException if a system exception occurred 584 */ 585 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId( 586 java.lang.String uuid, long groupId) 587 throws com.liferay.portal.kernel.exception.PortalException, 588 com.liferay.portal.kernel.exception.SystemException { 589 return _dlAppLocalService.getFileEntryByUuidAndGroupId(uuid, groupId); 590 } 591 592 /** 593 * Returns the file ranks from the user. This method is only supported by 594 * the Liferay repository. 595 * 596 * @param repositoryId the primary key of the repository 597 * @param userId the primary key of the user 598 * @return the file ranks from the user 599 * @throws SystemException if a system exception occurred 600 */ 601 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks( 602 long repositoryId, long userId) 603 throws com.liferay.portal.kernel.exception.SystemException { 604 return _dlAppLocalService.getFileRanks(repositoryId, userId); 605 } 606 607 /** 608 * Returns the file shortcut with the primary key. This method is only 609 * supported by the Liferay repository. 610 * 611 * @param fileShortcutId the primary key of the file shortcut 612 * @return the file shortcut with the primary key 613 * @throws PortalException if the file shortcut could not 614 be found 615 * @throws SystemException if a system exception occurred 616 */ 617 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut( 618 long fileShortcutId) 619 throws com.liferay.portal.kernel.exception.PortalException, 620 com.liferay.portal.kernel.exception.SystemException { 621 return _dlAppLocalService.getFileShortcut(fileShortcutId); 622 } 623 624 /** 625 * Returns the file version with the primary key. 626 * 627 * @param fileVersionId the primary key of the file version 628 * @return the file version with the primary key 629 * @throws PortalException if the file version could not 630 be found 631 * @throws SystemException if a system exception occurred 632 */ 633 public com.liferay.portal.kernel.repository.model.FileVersion getFileVersion( 634 long fileVersionId) 635 throws com.liferay.portal.kernel.exception.PortalException, 636 com.liferay.portal.kernel.exception.SystemException { 637 return _dlAppLocalService.getFileVersion(fileVersionId); 638 } 639 640 /** 641 * Returns the folder with the primary key. 642 * 643 * @param folderId the primary key of the folder 644 * @return the folder with the primary key 645 * @throws PortalException if the folder could not be 646 found 647 * @throws SystemException if a system exception occurred 648 */ 649 public com.liferay.portal.kernel.repository.model.Folder getFolder( 650 long folderId) 651 throws com.liferay.portal.kernel.exception.PortalException, 652 com.liferay.portal.kernel.exception.SystemException { 653 return _dlAppLocalService.getFolder(folderId); 654 } 655 656 /** 657 * Returns the folder with the name in the parent folder. 658 * 659 * @param repositoryId the primary key of the folder's repository 660 * @param parentFolderId the primary key of the folder's parent folder 661 * @param name the folder's name 662 * @return the folder with the name in the parent folder 663 * @throws PortalException if the folder could not be found 664 * @throws SystemException if a system exception occurred 665 */ 666 public com.liferay.portal.kernel.repository.model.Folder getFolder( 667 long repositoryId, long parentFolderId, java.lang.String name) 668 throws com.liferay.portal.kernel.exception.PortalException, 669 com.liferay.portal.kernel.exception.SystemException { 670 return _dlAppLocalService.getFolder(repositoryId, parentFolderId, name); 671 } 672 673 /** 674 * Returns all immediate subfolders of the parent folder. 675 * 676 * @param repositoryId the primary key of the folder's repository 677 * @param parentFolderId the primary key of the folder's parent folder 678 * @return the immediate subfolders of the parent folder 679 * @throws PortalException if the parent 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.Folder> getFolders( 683 long repositoryId, long parentFolderId) 684 throws com.liferay.portal.kernel.exception.PortalException, 685 com.liferay.portal.kernel.exception.SystemException { 686 return _dlAppLocalService.getFolders(repositoryId, parentFolderId); 687 } 688 689 /** 690 * Returns all immediate subfolders of the parent folder, optionally 691 * including mount folders for third-party repositories. 692 * 693 * @param repositoryId the primary key of the folder's repository 694 * @param parentFolderId the primary key of the folder's parent folder 695 * @param includeMountFolders whether to include mount folders for 696 third-party repositories 697 * @return the immediate subfolders of the parent folder 698 * @throws PortalException if the parent folder could not be found 699 * @throws SystemException if a system exception occurred 700 */ 701 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 702 long repositoryId, long parentFolderId, boolean includeMountFolders) 703 throws com.liferay.portal.kernel.exception.PortalException, 704 com.liferay.portal.kernel.exception.SystemException { 705 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 706 includeMountFolders); 707 } 708 709 /** 710 * Returns a range of all the immediate subfolders of the parent folder, 711 * optionally including mount folders for third-party repositories. 712 * 713 * <p> 714 * Useful when paginating results. Returns a maximum of <code>end - 715 * start</code> instances. <code>start</code> and <code>end</code> are not 716 * primary keys, they are indexes in the result set. Thus, <code>0</code> 717 * refers to the first result in the set. Setting both <code>start</code> 718 * and <code>end</code> to {@link 719 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 720 * result set. 721 * </p> 722 * 723 * @param repositoryId the primary key of the folder's repository 724 * @param parentFolderId the primary key of the folder's parent folder 725 * @param includeMountFolders whether to include mount folders for 726 third-party repositories 727 * @param start the lower bound of the range of results 728 * @param end the upper bound of the range of results (not inclusive) 729 * @return the range of immediate subfolders of the parent folder 730 * @throws PortalException if the parent folder could not be 731 found 732 * @throws SystemException if a system exception occurred 733 */ 734 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 735 long repositoryId, long parentFolderId, boolean includeMountFolders, 736 int start, int end) 737 throws com.liferay.portal.kernel.exception.PortalException, 738 com.liferay.portal.kernel.exception.SystemException { 739 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 740 includeMountFolders, start, end); 741 } 742 743 /** 744 * Returns an ordered range of all the immediate subfolders of the parent 745 * folder. 746 * 747 * <p> 748 * Useful when paginating results. Returns a maximum of <code>end - 749 * start</code> instances. <code>start</code> and <code>end</code> are not 750 * primary keys, they are indexes in the result set. Thus, <code>0</code> 751 * refers to the first result in the set. Setting both <code>start</code> 752 * and <code>end</code> to {@link 753 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 754 * result set. 755 * </p> 756 * 757 * @param repositoryId the primary key of the folder's repository 758 * @param parentFolderId the primary key of the folder's parent folder 759 * @param includeMountFolders whether to include mount folders for 760 third-party repositories 761 * @param start the lower bound of the range of results 762 * @param end the upper bound of the range of results (not inclusive) 763 * @param obc the comparator to order the folders (optionally 764 <code>null</code>) 765 * @return the range of immediate subfolders of the parent folder ordered by 766 comparator <code>obc</code> 767 * @throws PortalException if the parent folder could not be 768 found 769 * @throws SystemException if a system exception occurred 770 */ 771 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 772 long repositoryId, long parentFolderId, boolean includeMountFolders, 773 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 774 throws com.liferay.portal.kernel.exception.PortalException, 775 com.liferay.portal.kernel.exception.SystemException { 776 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 777 includeMountFolders, start, end, obc); 778 } 779 780 /** 781 * Returns a range of all the immediate subfolders of the parent folder. 782 * 783 * <p> 784 * Useful when paginating results. Returns a maximum of <code>end - 785 * start</code> instances. <code>start</code> and <code>end</code> are not 786 * primary keys, they are indexes in the result set. Thus, <code>0</code> 787 * refers to the first result in the set. Setting both <code>start</code> 788 * and <code>end</code> to {@link 789 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 790 * result set. 791 * </p> 792 * 793 * @param repositoryId the primary key of the folder's repository 794 * @param parentFolderId the primary key of the folder's parent folder 795 * @param start the lower bound of the range of results 796 * @param end the upper bound of the range of results (not inclusive) 797 * @return the range of immediate subfolders of the parent folder 798 * @throws PortalException if the parent folder could not be 799 found 800 * @throws SystemException if a system exception occurred 801 */ 802 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 803 long repositoryId, long parentFolderId, int start, int end) 804 throws com.liferay.portal.kernel.exception.PortalException, 805 com.liferay.portal.kernel.exception.SystemException { 806 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 807 start, end); 808 } 809 810 /** 811 * Returns an ordered range of all the immediate subfolders of the parent 812 * folder. 813 * 814 * <p> 815 * Useful when paginating results. Returns a maximum of <code>end - 816 * start</code> instances. <code>start</code> and <code>end</code> are not 817 * primary keys, they are indexes in the result set. Thus, <code>0</code> 818 * refers to the first result in the set. Setting both <code>start</code> 819 * and <code>end</code> to {@link 820 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 821 * result set. 822 * </p> 823 * 824 * @param repositoryId the primary key of the folder's repository 825 * @param parentFolderId the primary key of the folder's parent folder 826 * @param start the lower bound of the range of results 827 * @param end the upper bound of the range of results (not inclusive) 828 * @param obc the comparator to order the folders (optionally 829 <code>null</code>) 830 * @return the range of immediate subfolders of the parent folder ordered by 831 comparator <code>obc</code> 832 * @throws PortalException if the parent folder could not be 833 found 834 * @throws SystemException if a system exception occurred 835 */ 836 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 837 long repositoryId, long parentFolderId, int start, int end, 838 com.liferay.portal.kernel.util.OrderByComparator obc) 839 throws com.liferay.portal.kernel.exception.PortalException, 840 com.liferay.portal.kernel.exception.SystemException { 841 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 842 start, end, obc); 843 } 844 845 /** 846 * Returns an ordered range of all the immediate subfolders, file entries, 847 * and file shortcuts in the parent folder. 848 * 849 * <p> 850 * Useful when paginating results. Returns a maximum of <code>end - 851 * start</code> instances. <code>start</code> and <code>end</code> are not 852 * primary keys, they are indexes in the result set. Thus, <code>0</code> 853 * refers to the first result in the set. Setting both <code>start</code> 854 * and <code>end</code> to {@link 855 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 856 * result set. 857 * </p> 858 * 859 * @param repositoryId the primary key of the repository 860 * @param folderId the primary key of the parent folder 861 * @param status the workflow status 862 * @param includeMountFolders whether to include mount folders for 863 third-party repositories 864 * @param start the lower bound of the range of results 865 * @param end the upper bound of the range of results (not inclusive) 866 * @param obc the comparator to order the results (optionally 867 <code>null</code>) 868 * @return the range of immediate subfolders, file entries, and file 869 shortcuts in the parent folder ordered by comparator 870 <code>obc</code> 871 * @throws PortalException if the folder could not be 872 found 873 * @throws SystemException if a system exception occurred 874 */ 875 public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 876 long repositoryId, long folderId, int status, 877 boolean includeMountFolders, int start, int end, 878 com.liferay.portal.kernel.util.OrderByComparator obc) 879 throws com.liferay.portal.kernel.exception.PortalException, 880 com.liferay.portal.kernel.exception.SystemException { 881 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 882 folderId, status, includeMountFolders, start, end, obc); 883 } 884 885 public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 886 long repositoryId, long folderId, int status, 887 java.lang.String[] mimeTypes, boolean includeMountFolders, int start, 888 int end, com.liferay.portal.kernel.util.OrderByComparator obc) 889 throws com.liferay.portal.kernel.exception.PortalException, 890 com.liferay.portal.kernel.exception.SystemException { 891 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 892 folderId, status, mimeTypes, includeMountFolders, start, end, obc); 893 } 894 895 /** 896 * Returns the number of immediate subfolders, file entries, and file 897 * shortcuts in the parent folder. 898 * 899 * @param repositoryId the primary key of the repository 900 * @param folderId the primary key of the parent folder 901 * @param status the workflow status 902 * @param includeMountFolders whether to include mount folders for 903 third-party repositories 904 * @return the number of immediate subfolders, file entries, and file 905 shortcuts in the parent folder 906 * @throws PortalException if the folder could not be 907 found 908 * @throws SystemException if a system exception occurred 909 */ 910 public int getFoldersAndFileEntriesAndFileShortcutsCount( 911 long repositoryId, long folderId, int status, 912 boolean includeMountFolders) 913 throws com.liferay.portal.kernel.exception.PortalException, 914 com.liferay.portal.kernel.exception.SystemException { 915 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 916 folderId, status, includeMountFolders); 917 } 918 919 public int getFoldersAndFileEntriesAndFileShortcutsCount( 920 long repositoryId, long folderId, int status, 921 java.lang.String[] mimeTypes, boolean includeMountFolders) 922 throws com.liferay.portal.kernel.exception.PortalException, 923 com.liferay.portal.kernel.exception.SystemException { 924 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 925 folderId, status, mimeTypes, includeMountFolders); 926 } 927 928 /** 929 * Returns the number of immediate subfolders of the parent folder. 930 * 931 * @param repositoryId the primary key of the folder's repository 932 * @param parentFolderId the primary key of the folder's parent folder 933 * @return the number of immediate subfolders of the parent folder 934 * @throws PortalException if the parent folder could not 935 be found 936 * @throws SystemException if a system exception occurred 937 */ 938 public int getFoldersCount(long repositoryId, long parentFolderId) 939 throws com.liferay.portal.kernel.exception.PortalException, 940 com.liferay.portal.kernel.exception.SystemException { 941 return _dlAppLocalService.getFoldersCount(repositoryId, parentFolderId); 942 } 943 944 /** 945 * Returns the number of immediate subfolders of the parent folder, 946 * optionally including mount folders for third-party repositories. 947 * 948 * @param repositoryId the primary key of the folder's repository 949 * @param parentFolderId the primary key of the folder's parent folder 950 * @param includeMountFolders whether to include mount folders for 951 third-party repositories 952 * @return the number of immediate subfolders of the parent folder 953 * @throws PortalException if the parent folder could not 954 be found 955 * @throws SystemException if a system exception occurred 956 */ 957 public int getFoldersCount(long repositoryId, long parentFolderId, 958 boolean includeMountFolders) 959 throws com.liferay.portal.kernel.exception.PortalException, 960 com.liferay.portal.kernel.exception.SystemException { 961 return _dlAppLocalService.getFoldersCount(repositoryId, parentFolderId, 962 includeMountFolders); 963 } 964 965 /** 966 * Returns the number of immediate subfolders and file entries across the 967 * folders. 968 * 969 * @param repositoryId the primary key of the repository 970 * @param folderIds the primary keys of folders from which to count 971 immediate subfolders and file entries 972 * @param status the workflow status 973 * @return the number of immediate subfolders and file entries across the 974 folders 975 * @throws PortalException if the repository could not be 976 found 977 * @throws SystemException if a system exception occurred 978 */ 979 public int getFoldersFileEntriesCount(long repositoryId, 980 java.util.List<java.lang.Long> folderIds, int status) 981 throws com.liferay.portal.kernel.exception.PortalException, 982 com.liferay.portal.kernel.exception.SystemException { 983 return _dlAppLocalService.getFoldersFileEntriesCount(repositoryId, 984 folderIds, status); 985 } 986 987 /** 988 * Returns the mount folder of the repository with the primary key. This 989 * method is only supported by the Liferay repository. 990 * 991 * @param repositoryId the primary key of the repository 992 * @return the folder used for mounting third-party repositories 993 * @throws PortalException if the repository or mount folder could not be found 994 * @throws SystemException if a system exception occurred 995 */ 996 public com.liferay.portal.kernel.repository.model.Folder getMountFolder( 997 long repositoryId) 998 throws com.liferay.portal.kernel.exception.PortalException, 999 com.liferay.portal.kernel.exception.SystemException { 1000 return _dlAppLocalService.getMountFolder(repositoryId); 1001 } 1002 1003 /** 1004 * Returns all immediate subfolders of the parent folder that are used for 1005 * mounting third-party repositories. This method is only supported by the 1006 * Liferay repository. 1007 * 1008 * @param repositoryId the primary key of the folder's repository 1009 * @param parentFolderId the primary key of the folder's parent folder 1010 * @return the immediate subfolders of the parent folder that are used for 1011 mounting third-party repositories 1012 * @throws PortalException if the repository or parent 1013 folder could not be found 1014 * @throws SystemException if a system exception occurred 1015 */ 1016 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1017 long repositoryId, long parentFolderId) 1018 throws com.liferay.portal.kernel.exception.PortalException, 1019 com.liferay.portal.kernel.exception.SystemException { 1020 return _dlAppLocalService.getMountFolders(repositoryId, parentFolderId); 1021 } 1022 1023 /** 1024 * Returns a range of all the immediate subfolders of the parent folder that 1025 * are used for mounting third-party repositories. This method is only 1026 * supported by the Liferay repository. 1027 * 1028 * <p> 1029 * Useful when paginating results. Returns a maximum of <code>end - 1030 * start</code> instances. <code>start</code> and <code>end</code> are not 1031 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1032 * refers to the first result in the set. Setting both <code>start</code> 1033 * and <code>end</code> to {@link 1034 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1035 * result set. 1036 * </p> 1037 * 1038 * @param repositoryId the primary key of the repository 1039 * @param parentFolderId the primary key of the parent folder 1040 * @param start the lower bound of the range of results 1041 * @param end the upper bound of the range of results (not inclusive) 1042 * @return the range of immediate subfolders of the parent folder that are 1043 used for mounting third-party repositories 1044 * @throws PortalException if the repository or parent 1045 folder could not be found 1046 * @throws SystemException if a system exception occurred 1047 */ 1048 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1049 long repositoryId, long parentFolderId, int start, int end) 1050 throws com.liferay.portal.kernel.exception.PortalException, 1051 com.liferay.portal.kernel.exception.SystemException { 1052 return _dlAppLocalService.getMountFolders(repositoryId, parentFolderId, 1053 start, end); 1054 } 1055 1056 /** 1057 * Returns an ordered range of all the immediate subfolders of the parent 1058 * folder that are used for mounting third-party repositories. This method 1059 * is only supported by the Liferay repository. 1060 * 1061 * <p> 1062 * Useful when paginating results. Returns a maximum of <code>end - 1063 * start</code> instances. <code>start</code> and <code>end</code> are not 1064 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1065 * refers to the first result in the set. Setting both <code>start</code> 1066 * and <code>end</code> to {@link 1067 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1068 * result set. 1069 * </p> 1070 * 1071 * @param repositoryId the primary key of the folder's repository 1072 * @param parentFolderId the primary key of the folder's parent folder 1073 * @param start the lower bound of the range of results 1074 * @param end the upper bound of the range of results (not inclusive) 1075 * @param obc the comparator to order the folders (optionally 1076 <code>null</code>) 1077 * @return the range of immediate subfolders of the parent folder that are 1078 used for mounting third-party repositories ordered by comparator 1079 <code>obc</code> 1080 * @throws PortalException if the repository or parent 1081 folder could not be found 1082 * @throws SystemException if a system exception occurred 1083 */ 1084 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1085 long repositoryId, long parentFolderId, int start, int end, 1086 com.liferay.portal.kernel.util.OrderByComparator obc) 1087 throws com.liferay.portal.kernel.exception.PortalException, 1088 com.liferay.portal.kernel.exception.SystemException { 1089 return _dlAppLocalService.getMountFolders(repositoryId, parentFolderId, 1090 start, end, obc); 1091 } 1092 1093 /** 1094 * Returns the number of immediate subfolders of the parent folder that are 1095 * used for mounting third-party repositories. This method is only supported 1096 * by the Liferay repository. 1097 * 1098 * @param repositoryId the primary key of the repository 1099 * @param parentFolderId the primary key of the parent folder 1100 * @return the number of folders of the parent folder that are used for 1101 mounting third-party repositories 1102 * @throws PortalException if the repository or parent 1103 folder could not be found 1104 * @throws SystemException if a system exception occurred 1105 */ 1106 public int getMountFoldersCount(long repositoryId, long parentFolderId) 1107 throws com.liferay.portal.kernel.exception.PortalException, 1108 com.liferay.portal.kernel.exception.SystemException { 1109 return _dlAppLocalService.getMountFoldersCount(repositoryId, 1110 parentFolderId); 1111 } 1112 1113 /** 1114 * Moves the file entry to the new folder. 1115 * 1116 * @param userId the primary key of the user 1117 * @param fileEntryId the primary key of the file entry 1118 * @param newFolderId the primary key of the new folder 1119 * @param serviceContext the service context to be applied 1120 * @return the file entry 1121 * @throws PortalException if the file entry or the new folder could not be 1122 found 1123 * @throws SystemException if a system exception occurred 1124 */ 1125 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry( 1126 long userId, long fileEntryId, long newFolderId, 1127 com.liferay.portal.service.ServiceContext serviceContext) 1128 throws com.liferay.portal.kernel.exception.PortalException, 1129 com.liferay.portal.kernel.exception.SystemException { 1130 return _dlAppLocalService.moveFileEntry(userId, fileEntryId, 1131 newFolderId, serviceContext); 1132 } 1133 1134 /** 1135 * Updates the file entry's asset replacing its asset categories, tags, and 1136 * links. 1137 * 1138 * @param userId the primary key of the user 1139 * @param fileEntry the file entry to update 1140 * @param fileVersion the file version to update 1141 * @param assetCategoryIds the primary keys of the new asset categories 1142 * @param assetTagNames the new asset tag names 1143 * @param assetLinkEntryIds the primary keys of the new asset link entries 1144 * @throws PortalException if the file entry or version could not be found 1145 * @throws SystemException if a system exception occurred 1146 */ 1147 public void updateAsset(long userId, 1148 com.liferay.portal.kernel.repository.model.FileEntry fileEntry, 1149 com.liferay.portal.kernel.repository.model.FileVersion fileVersion, 1150 long[] assetCategoryIds, java.lang.String[] assetTagNames, 1151 long[] assetLinkEntryIds) 1152 throws com.liferay.portal.kernel.exception.PortalException, 1153 com.liferay.portal.kernel.exception.SystemException { 1154 _dlAppLocalService.updateAsset(userId, fileEntry, fileVersion, 1155 assetCategoryIds, assetTagNames, assetLinkEntryIds); 1156 } 1157 1158 /** 1159 * Updates a file entry and associated metadata based on a byte array 1160 * object. If the file data is <code>null</code>, then only the associated 1161 * metadata (i.e., <code>title</code>, <code>description</code>, and 1162 * parameters in the <code>serviceContext</code>) will be updated. 1163 * 1164 * <p> 1165 * This method takes two file names, the <code>sourceFileName</code> and the 1166 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1167 * name of the actual file being uploaded. The <code>title</code> 1168 * corresponds to a name the client wishes to assign this file after it has 1169 * been uploaded to the portal. 1170 * </p> 1171 * 1172 * @param userId the primary key of the user 1173 * @param fileEntryId the primary key of the file entry 1174 * @param sourceFileName the original file's name (optionally 1175 <code>null</code>) 1176 * @param mimeType the file's MIME type (optionally <code>null</code>) 1177 * @param title the new name to be assigned to the file (optionally <code> 1178 null</code>) 1179 * @param description the file's new description 1180 * @param changeLog the file's version change log (optionally 1181 <code>null</code>) 1182 * @param majorVersion whether the new file version is a major version 1183 * @param bytes the file's data (optionally <code>null</code>) 1184 * @param serviceContext the service context to be applied. Can specify the 1185 file entry's asset category IDs, asset tag names, and expando 1186 bridge attributes. In a Liferay repository, it may include: 1187 1188 <ul> 1189 <li> 1190 fileEntryTypeId - ID for a custom file entry type 1191 </li> 1192 <li> 1193 fieldsMap - mapping for fields associated with a custom file 1194 entry type 1195 </li> 1196 </ul> 1197 * @return the file entry 1198 * @throws PortalException if the file entry could not be 1199 found 1200 * @throws SystemException if a system exception occurred 1201 */ 1202 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1203 long userId, long fileEntryId, java.lang.String sourceFileName, 1204 java.lang.String mimeType, java.lang.String title, 1205 java.lang.String description, java.lang.String changeLog, 1206 boolean majorVersion, byte[] bytes, 1207 com.liferay.portal.service.ServiceContext serviceContext) 1208 throws com.liferay.portal.kernel.exception.PortalException, 1209 com.liferay.portal.kernel.exception.SystemException { 1210 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 1211 sourceFileName, mimeType, title, description, changeLog, 1212 majorVersion, bytes, serviceContext); 1213 } 1214 1215 /** 1216 * Updates a file entry and associated metadata based on a {@link File} 1217 * object. If the file data is <code>null</code>, then only the associated 1218 * metadata (i.e., <code>title</code>, <code>description</code>, and 1219 * parameters in the <code>serviceContext</code>) will be updated. 1220 * 1221 * <p> 1222 * This method takes two file names, the <code>sourceFileName</code> and the 1223 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1224 * name of the actual file being uploaded. The <code>title</code> 1225 * corresponds to a name the client wishes to assign this file after it has 1226 * been uploaded to the portal. 1227 * </p> 1228 * 1229 * @param userId the primary key of the user 1230 * @param fileEntryId the primary key of the file entry 1231 * @param sourceFileName the original file's name (optionally 1232 <code>null</code>) 1233 * @param mimeType the file's MIME type (optionally <code>null</code>) 1234 * @param title the new name to be assigned to the file (optionally <code> 1235 null</code>) 1236 * @param description the file's new description 1237 * @param changeLog the file's version change log (optionally 1238 <code>null</code>) 1239 * @param majorVersion whether the new file version is a major version 1240 * @param file EntryId the primary key of the file entry 1241 * @param serviceContext the service context to be applied. Can specify the 1242 file entry's asset category IDs, asset tag names, and expando 1243 bridge attributes. In a Liferay repository, it may include: 1244 1245 <ul> 1246 <li> 1247 fileEntryTypeId - ID for a custom file entry type 1248 </li> 1249 <li> 1250 fieldsMap - mapping for fields associated with a custom file 1251 entry type 1252 </li> 1253 </ul> 1254 * @return the file entry 1255 * @throws PortalException if the file entry could not be 1256 found 1257 * @throws SystemException if a system exception occurred 1258 */ 1259 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1260 long userId, long fileEntryId, java.lang.String sourceFileName, 1261 java.lang.String mimeType, java.lang.String title, 1262 java.lang.String description, java.lang.String changeLog, 1263 boolean majorVersion, java.io.File file, 1264 com.liferay.portal.service.ServiceContext serviceContext) 1265 throws com.liferay.portal.kernel.exception.PortalException, 1266 com.liferay.portal.kernel.exception.SystemException { 1267 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 1268 sourceFileName, mimeType, title, description, changeLog, 1269 majorVersion, file, serviceContext); 1270 } 1271 1272 /** 1273 * Updates a file entry and associated metadata based on an {@link 1274 * InputStream} object. If the file data is <code>null</code>, then only the 1275 * associated metadata (i.e., <code>title</code>, <code>description</code>, 1276 * and parameters in the <code>serviceContext</code>) will be updated. 1277 * 1278 * <p> 1279 * This method takes two file names, the <code>sourceFileName</code> and the 1280 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1281 * name of the actual file being uploaded. The <code>title</code> 1282 * corresponds to a name the client wishes to assign this file after it has 1283 * been uploaded to the portal. 1284 * </p> 1285 * 1286 * @param userId the primary key of the user 1287 * @param fileEntryId the primary key of the file entry 1288 * @param sourceFileName the original file's name (optionally 1289 <code>null</code>) 1290 * @param mimeType the file's MIME type (optionally <code>null</code>) 1291 * @param title the new name to be assigned to the file (optionally <code> 1292 null</code>) 1293 * @param description the file's new description 1294 * @param changeLog the file's version change log (optionally 1295 <code>null</code>) 1296 * @param majorVersion whether the new file version is a major version 1297 * @param is the file's data (optionally <code>null</code>) 1298 * @param size the file's size (optionally <code>0</code>) 1299 * @param serviceContext the service context to be applied. Can specify the 1300 file entry's asset category IDs, asset tag names, and expando 1301 bridge attributes. In a Liferay repository, it may include: 1302 1303 <ul> 1304 <li> 1305 fileEntryTypeId - ID for a custom file entry type 1306 </li> 1307 <li> 1308 fieldsMap - mapping for fields associated with a custom file 1309 entry type 1310 </li> 1311 </ul> 1312 * @return the file entry 1313 * @throws PortalException if the file entry could not be 1314 found 1315 * @throws SystemException if a system exception occurred 1316 */ 1317 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1318 long userId, long fileEntryId, java.lang.String sourceFileName, 1319 java.lang.String mimeType, java.lang.String title, 1320 java.lang.String description, java.lang.String changeLog, 1321 boolean majorVersion, java.io.InputStream is, long size, 1322 com.liferay.portal.service.ServiceContext serviceContext) 1323 throws com.liferay.portal.kernel.exception.PortalException, 1324 com.liferay.portal.kernel.exception.SystemException { 1325 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 1326 sourceFileName, mimeType, title, description, changeLog, 1327 majorVersion, is, size, serviceContext); 1328 } 1329 1330 /** 1331 * Updates a file rank to the existing file entry. This method is only 1332 * supported by the Liferay repository. 1333 * 1334 * @param repositoryId the primary key of the file rank's repository 1335 * @param companyId the primary key of the file rank's company 1336 * @param userId the primary key of the file rank's creator/owner 1337 * @param fileEntryId the primary key of the file rank's file entry 1338 * @param serviceContext the service context to be applied 1339 * @return the file rank 1340 * @throws SystemException if a system exception occurred 1341 */ 1342 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 1343 long repositoryId, long companyId, long userId, long fileEntryId, 1344 com.liferay.portal.service.ServiceContext serviceContext) 1345 throws com.liferay.portal.kernel.exception.SystemException { 1346 return _dlAppLocalService.updateFileRank(repositoryId, companyId, 1347 userId, fileEntryId, serviceContext); 1348 } 1349 1350 /** 1351 * Updates a file shortcut to the existing file entry. This method is only 1352 * supported by the Liferay repository. 1353 * 1354 * @param userId the primary key of the file shortcut's creator/owner 1355 * @param fileShortcutId the primary key of the file shortcut 1356 * @param folderId the primary key of the file shortcut's parent folder 1357 * @param toFileEntryId the primary key of the file shortcut's file entry 1358 * @param serviceContext the service context to be applied. Can specify the 1359 file entry's asset category IDs, asset tag names, and expando 1360 bridge attributes. 1361 * @return the file shortcut 1362 * @throws PortalException if the file shortcut, folder, or file entry could 1363 not be found 1364 * @throws SystemException if a system exception occurred 1365 */ 1366 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut( 1367 long userId, long fileShortcutId, long folderId, long toFileEntryId, 1368 com.liferay.portal.service.ServiceContext serviceContext) 1369 throws com.liferay.portal.kernel.exception.PortalException, 1370 com.liferay.portal.kernel.exception.SystemException { 1371 return _dlAppLocalService.updateFileShortcut(userId, fileShortcutId, 1372 folderId, toFileEntryId, serviceContext); 1373 } 1374 1375 /** 1376 * Updates all file shortcuts to the existing file entry to the new file 1377 * entry. This method is only supported by the Liferay repository. 1378 * 1379 * @param toRepositoryId the primary key of the repository 1380 * @param oldToFileEntryId the primary key of the old file entry pointed to 1381 * @param newToFileEntryId the primary key of the new file entry to point 1382 to 1383 * @throws SystemException if a system exception occurred 1384 */ 1385 public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId, 1386 long newToFileEntryId) 1387 throws com.liferay.portal.kernel.exception.SystemException { 1388 _dlAppLocalService.updateFileShortcuts(toRepositoryId, 1389 oldToFileEntryId, newToFileEntryId); 1390 } 1391 1392 /** 1393 * Updates the folder. 1394 * 1395 * @param folderId the primary key of the folder 1396 * @param parentFolderId the primary key of the folder's new parent folder 1397 * @param name the folder's new name 1398 * @param description the folder's new description 1399 * @param serviceContext the service context to be applied. In a Liferay 1400 repository, it may include: 1401 1402 <ul> 1403 <li> 1404 defaultFileEntryTypeId - the file entry type to default all 1405 Liferay file entries to 1406 </li> 1407 <li> 1408 fileEntryTypeSearchContainerPrimaryKeys - a comma-delimited list 1409 of file entry type primary keys allowed in the given folder and 1410 all descendants 1411 </li> 1412 <li> 1413 mountPoint - boolean specifying whether folder is a facade for 1414 mounting a third-party repository 1415 </li> 1416 <li> 1417 overrideFileEntryTypes - boolean specifying whether to override 1418 ancestral folder's restriction of file entry types allowed 1419 </li> 1420 <li> 1421 workflowDefinitionXYZ - the workflow definition name specified 1422 per file entry type. The parameter name must be the string 1423 <code>workflowDefinition</code> appended by the 1424 <code>fileEntryTypeId</code> (optionally <code>0</code>). 1425 </li> 1426 </ul> 1427 * @return the folder 1428 * @throws PortalException if the current or new parent folder could not be 1429 found, or if the new parent folder's information was invalid 1430 * @throws SystemException if a system exception occurred 1431 */ 1432 public com.liferay.portal.kernel.repository.model.Folder updateFolder( 1433 long folderId, long parentFolderId, java.lang.String name, 1434 java.lang.String description, 1435 com.liferay.portal.service.ServiceContext serviceContext) 1436 throws com.liferay.portal.kernel.exception.PortalException, 1437 com.liferay.portal.kernel.exception.SystemException { 1438 return _dlAppLocalService.updateFolder(folderId, parentFolderId, name, 1439 description, serviceContext); 1440 } 1441 1442 /** 1443 * @deprecated Renamed to {@link #getWrappedService} 1444 */ 1445 public DLAppLocalService getWrappedDLAppLocalService() { 1446 return _dlAppLocalService; 1447 } 1448 1449 /** 1450 * @deprecated Renamed to {@link #setWrappedService} 1451 */ 1452 public void setWrappedDLAppLocalService(DLAppLocalService dlAppLocalService) { 1453 _dlAppLocalService = dlAppLocalService; 1454 } 1455 1456 public DLAppLocalService getWrappedService() { 1457 return _dlAppLocalService; 1458 } 1459 1460 public void setWrappedService(DLAppLocalService dlAppLocalService) { 1461 _dlAppLocalService = dlAppLocalService; 1462 } 1463 1464 private DLAppLocalService _dlAppLocalService; 1465 }