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