001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.documentlibrary.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.service.ServiceWrapper; 020 021 /** 022 * Provides a wrapper for {@link DLAppLocalService}. 023 * 024 * @author Brian Wing Shun Chan 025 * @see DLAppLocalService 026 * @generated 027 */ 028 @ProviderType 029 public class DLAppLocalServiceWrapper implements DLAppLocalService, 030 ServiceWrapper<DLAppLocalService> { 031 public DLAppLocalServiceWrapper(DLAppLocalService dlAppLocalService) { 032 _dlAppLocalService = dlAppLocalService; 033 } 034 035 @Override 036 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 037 long userId, long repositoryId, long folderId, 038 java.lang.String sourceFileName, java.lang.String mimeType, 039 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext) 040 throws com.liferay.portal.kernel.exception.PortalException { 041 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 042 sourceFileName, mimeType, bytes, serviceContext); 043 } 044 045 /** 046 * Adds a file entry and associated metadata based on a byte array. 047 * 048 * <p> 049 * This method takes two file names, the <code>sourceFileName</code> and the 050 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 051 * name of the actual file being uploaded. The <code>title</code> 052 * corresponds to a name the client wishes to assign this file after it has 053 * been uploaded to the portal. If it is <code>null</code>, the <code> 054 * sourceFileName</code> will be used. 055 * </p> 056 * 057 * @param userId the primary key of the file entry's creator/owner 058 * @param repositoryId the primary key of the file entry's repository 059 * @param folderId the primary key of the file entry's parent folder 060 * @param sourceFileName the original file's name 061 * @param mimeType the file's MIME type 062 * @param title the name to be assigned to the file (optionally <code>null 063 </code>) 064 * @param description the file's description 065 * @param changeLog the file's version change log 066 * @param bytes the file's data (optionally <code>null</code>) 067 * @param serviceContext the service context to be applied. Can set the 068 asset category IDs, asset tag names, and expando bridge 069 attributes for the file entry. In a Liferay repository, it may 070 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 071 type </li> <li> fieldsMap - mapping for fields associated with a 072 custom file entry type </li> </ul> 073 * @return the file entry 074 * @throws PortalException if the parent folder could not be found or if the 075 file entry's information was invalid 076 */ 077 @Override 078 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 079 long userId, long repositoryId, long folderId, 080 java.lang.String sourceFileName, java.lang.String mimeType, 081 java.lang.String title, java.lang.String description, 082 java.lang.String changeLog, byte[] bytes, 083 com.liferay.portal.service.ServiceContext serviceContext) 084 throws com.liferay.portal.kernel.exception.PortalException { 085 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 086 sourceFileName, mimeType, title, description, changeLog, bytes, 087 serviceContext); 088 } 089 090 /** 091 * Adds a file entry and associated metadata based on a {@link File} object. 092 * 093 * <p> 094 * This method takes two file names, the <code>sourceFileName</code> and the 095 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 096 * name of the actual file being uploaded. The <code>title</code> 097 * corresponds to a name the client wishes to assign this file after it has 098 * been uploaded to the portal. If it is <code>null</code>, the <code> 099 * sourceFileName</code> will be used. 100 * </p> 101 * 102 * @param userId the primary key of the file entry's creator/owner 103 * @param repositoryId the primary key of the repository 104 * @param folderId the primary key of the file entry's parent folder 105 * @param sourceFileName the original file's name 106 * @param mimeType the file's MIME type 107 * @param title the name to be assigned to the file (optionally <code>null 108 </code>) 109 * @param description the file's description 110 * @param changeLog the file's version change log 111 * @param file the file's data (optionally <code>null</code>) 112 * @param serviceContext the service context to be applied. Can set the 113 asset category IDs, asset tag names, and expando bridge 114 attributes for the file entry. In a Liferay repository, it may 115 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 116 type </li> <li> fieldsMap - mapping for fields associated with a 117 custom file entry type </li> </ul> 118 * @return the file entry 119 * @throws PortalException if the parent folder could not be found or if the 120 file entry's information was invalid 121 */ 122 @Override 123 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 124 long userId, long repositoryId, long folderId, 125 java.lang.String sourceFileName, java.lang.String mimeType, 126 java.lang.String title, java.lang.String description, 127 java.lang.String changeLog, java.io.File file, 128 com.liferay.portal.service.ServiceContext serviceContext) 129 throws com.liferay.portal.kernel.exception.PortalException { 130 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 131 sourceFileName, mimeType, title, description, changeLog, file, 132 serviceContext); 133 } 134 135 /** 136 * Adds a file entry and associated metadata based on an {@link InputStream} 137 * object. 138 * 139 * <p> 140 * This method takes two file names, the <code>sourceFileName</code> and the 141 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 142 * name of the actual file being uploaded. The <code>title</code> 143 * corresponds to a name the client wishes to assign this file after it has 144 * been uploaded to the portal. If it is <code>null</code>, the <code> 145 * sourceFileName</code> will be used. 146 * </p> 147 * 148 * @param userId the primary key of the file entry's creator/owner 149 * @param repositoryId the primary key of the repository 150 * @param folderId the primary key of the file entry's parent folder 151 * @param sourceFileName the original file's name 152 * @param mimeType the file's MIME type 153 * @param title the name to be assigned to the file (optionally <code>null 154 </code>) 155 * @param description the file's description 156 * @param changeLog the file's version change log 157 * @param is the file's data (optionally <code>null</code>) 158 * @param size the file's size (optionally <code>0</code>) 159 * @param serviceContext the service context to be applied. Can set the 160 asset category IDs, asset tag names, and expando bridge 161 attributes for the file entry. In a Liferay repository, it may 162 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 163 type </li> <li> fieldsMap - mapping for fields associated with a 164 custom file entry type </li> </ul> 165 * @return the file entry 166 * @throws PortalException if the parent folder could not be found or if the 167 file entry's information was invalid 168 */ 169 @Override 170 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 171 long userId, long repositoryId, long folderId, 172 java.lang.String sourceFileName, java.lang.String mimeType, 173 java.lang.String title, java.lang.String description, 174 java.lang.String changeLog, java.io.InputStream is, long size, 175 com.liferay.portal.service.ServiceContext serviceContext) 176 throws com.liferay.portal.kernel.exception.PortalException { 177 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 178 sourceFileName, mimeType, title, description, changeLog, is, size, 179 serviceContext); 180 } 181 182 /** 183 * Adds the file rank to the existing file entry. This method is only 184 * supported by the Liferay repository. 185 * 186 * @param repositoryId the primary key of the repository 187 * @param companyId the primary key of the company 188 * @param userId the primary key of the file rank's creator/owner 189 * @param fileEntryId the primary key of the file entry 190 * @param serviceContext the service context to be applied 191 * @return the file rank 192 */ 193 @Override 194 public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank( 195 long repositoryId, long companyId, long userId, long fileEntryId, 196 com.liferay.portal.service.ServiceContext serviceContext) { 197 return _dlAppLocalService.addFileRank(repositoryId, companyId, userId, 198 fileEntryId, serviceContext); 199 } 200 201 /** 202 * Adds the file shortcut to the existing file entry. This method is only 203 * supported by the Liferay repository. 204 * 205 * @param userId the primary key of the file shortcut's creator/owner 206 * @param repositoryId the primary key of the repository 207 * @param folderId the primary key of the file shortcut's parent folder 208 * @param toFileEntryId the primary key of the file entry to point to 209 * @param serviceContext the service context to be applied. Can set the 210 asset category IDs, asset tag names, and expando bridge 211 attributes for the file entry. 212 * @return the file shortcut 213 * @throws PortalException if the parent folder or file entry could not be 214 found, or if the file shortcut's information was invalid 215 */ 216 @Override 217 public com.liferay.portal.kernel.repository.model.FileShortcut addFileShortcut( 218 long userId, long repositoryId, long folderId, long toFileEntryId, 219 com.liferay.portal.service.ServiceContext serviceContext) 220 throws com.liferay.portal.kernel.exception.PortalException { 221 return _dlAppLocalService.addFileShortcut(userId, repositoryId, 222 folderId, toFileEntryId, serviceContext); 223 } 224 225 /** 226 * Adds a folder. 227 * 228 * @param userId the primary key of the folder's creator/owner 229 * @param repositoryId the primary key of the repository 230 * @param parentFolderId the primary key of the folder's parent folder 231 * @param name the folder's name 232 * @param description the folder's description 233 * @param serviceContext the service context to be applied. In a Liferay 234 repository, it may include mountPoint which is a boolean 235 specifying whether the folder is a facade for mounting a 236 third-party repository 237 * @return the folder 238 * @throws PortalException if the parent folder could not be found or if the 239 new folder's information was invalid 240 */ 241 @Override 242 public com.liferay.portal.kernel.repository.model.Folder addFolder( 243 long userId, long repositoryId, long parentFolderId, 244 java.lang.String name, java.lang.String description, 245 com.liferay.portal.service.ServiceContext serviceContext) 246 throws com.liferay.portal.kernel.exception.PortalException { 247 return _dlAppLocalService.addFolder(userId, repositoryId, 248 parentFolderId, name, description, serviceContext); 249 } 250 251 /** 252 * Delete all data associated to the given repository. This method is only 253 * supported by the Liferay repository. 254 * 255 * @param repositoryId the primary key of the data's repository 256 * @throws PortalException if the repository could not be found 257 */ 258 @Override 259 public void deleteAll(long repositoryId) 260 throws com.liferay.portal.kernel.exception.PortalException { 261 _dlAppLocalService.deleteAll(repositoryId); 262 } 263 264 @Override 265 public void deleteAllRepositories(long groupId) 266 throws com.liferay.portal.kernel.exception.PortalException { 267 _dlAppLocalService.deleteAllRepositories(groupId); 268 } 269 270 /** 271 * Deletes the file entry. 272 * 273 * @param fileEntryId the primary key of the file entry 274 * @throws PortalException if the file entry could not be found 275 */ 276 @Override 277 public void deleteFileEntry(long fileEntryId) 278 throws com.liferay.portal.kernel.exception.PortalException { 279 _dlAppLocalService.deleteFileEntry(fileEntryId); 280 } 281 282 /** 283 * Deletes the file ranks associated to a given file entry. This method is 284 * only supported by the Liferay repository. 285 * 286 * @param fileEntryId the primary key of the file entry 287 */ 288 @Override 289 public void deleteFileRanksByFileEntryId(long fileEntryId) { 290 _dlAppLocalService.deleteFileRanksByFileEntryId(fileEntryId); 291 } 292 293 /** 294 * Deletes the file ranks associated to a given user. This method is only 295 * supported by the Liferay repository. 296 * 297 * @param userId the primary key of the user 298 */ 299 @Override 300 public void deleteFileRanksByUserId(long userId) { 301 _dlAppLocalService.deleteFileRanksByUserId(userId); 302 } 303 304 /** 305 * Deletes the file shortcut. This method is only supported by the Liferay 306 * repository. 307 * 308 * @param fileShortcut the file shortcut 309 * @throws PortalException if the file shortcut could not be found 310 */ 311 @Override 312 public void deleteFileShortcut( 313 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut) 314 throws com.liferay.portal.kernel.exception.PortalException { 315 _dlAppLocalService.deleteFileShortcut(fileShortcut); 316 } 317 318 /** 319 * Deletes the file shortcut. This method is only supported by the Liferay 320 * repository. 321 * 322 * @param fileShortcutId the primary key of the file shortcut 323 * @throws PortalException if the file shortcut could not be found 324 */ 325 @Override 326 public void deleteFileShortcut(long fileShortcutId) 327 throws com.liferay.portal.kernel.exception.PortalException { 328 _dlAppLocalService.deleteFileShortcut(fileShortcutId); 329 } 330 331 /** 332 * Deletes all file shortcuts associated to the file entry. This method is 333 * only supported by the Liferay repository. 334 * 335 * @param toFileEntryId the primary key of the associated file entry 336 * @throws PortalException if the file shortcut for the file entry could not 337 be found 338 */ 339 @Override 340 public void deleteFileShortcuts(long toFileEntryId) 341 throws com.liferay.portal.kernel.exception.PortalException { 342 _dlAppLocalService.deleteFileShortcuts(toFileEntryId); 343 } 344 345 /** 346 * Deletes the folder and all of its subfolders and file entries. 347 * 348 * @param folderId the primary key of the folder 349 * @throws PortalException if the folder could not be found 350 */ 351 @Override 352 public void deleteFolder(long folderId) 353 throws com.liferay.portal.kernel.exception.PortalException { 354 _dlAppLocalService.deleteFolder(folderId); 355 } 356 357 /** 358 * Returns the Spring bean ID for this bean. 359 * 360 * @return the Spring bean ID for this bean 361 */ 362 @Override 363 public java.lang.String getBeanIdentifier() { 364 return _dlAppLocalService.getBeanIdentifier(); 365 } 366 367 /** 368 * Returns the file entry with the primary key. 369 * 370 * @param fileEntryId the primary key of the file entry 371 * @return the file entry with the primary key 372 * @throws PortalException if the file entry could not be found 373 */ 374 @Override 375 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 376 long fileEntryId) 377 throws com.liferay.portal.kernel.exception.PortalException { 378 return _dlAppLocalService.getFileEntry(fileEntryId); 379 } 380 381 /** 382 * Returns the file entry with the title in the folder. 383 * 384 * @param groupId the primary key of the file entry's group 385 * @param folderId the primary key of the file entry's folder 386 * @param title the file entry's title 387 * @return the file entry with the title in the folder 388 * @throws PortalException if the file entry could not be found 389 */ 390 @Override 391 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 392 long groupId, long folderId, java.lang.String title) 393 throws com.liferay.portal.kernel.exception.PortalException { 394 return _dlAppLocalService.getFileEntry(groupId, folderId, title); 395 } 396 397 /** 398 * Returns the file entry with the UUID and group. 399 * 400 * @param uuid the file entry's UUID 401 * @param groupId the primary key of the file entry's group 402 * @return the file entry with the UUID and group 403 * @throws PortalException if the file entry could not be found 404 */ 405 @Override 406 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId( 407 java.lang.String uuid, long groupId) 408 throws com.liferay.portal.kernel.exception.PortalException { 409 return _dlAppLocalService.getFileEntryByUuidAndGroupId(uuid, groupId); 410 } 411 412 /** 413 * Returns the file ranks from the user. This method is only supported by 414 * the Liferay repository. 415 * 416 * @param repositoryId the primary key of the repository 417 * @param userId the primary key of the user 418 * @return the file ranks from the user 419 */ 420 @Override 421 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks( 422 long repositoryId, long userId) { 423 return _dlAppLocalService.getFileRanks(repositoryId, userId); 424 } 425 426 /** 427 * Returns the file shortcut with the primary key. This method is only 428 * supported by the Liferay repository. 429 * 430 * @param fileShortcutId the primary key of the file shortcut 431 * @return the file shortcut with the primary key 432 * @throws PortalException if the file shortcut could not be found 433 */ 434 @Override 435 public com.liferay.portal.kernel.repository.model.FileShortcut getFileShortcut( 436 long fileShortcutId) 437 throws com.liferay.portal.kernel.exception.PortalException { 438 return _dlAppLocalService.getFileShortcut(fileShortcutId); 439 } 440 441 /** 442 * Returns the file version with the primary key. 443 * 444 * @param fileVersionId the primary key of the file version 445 * @return the file version with the primary key 446 * @throws PortalException if the file version could not be found 447 */ 448 @Override 449 public com.liferay.portal.kernel.repository.model.FileVersion getFileVersion( 450 long fileVersionId) 451 throws com.liferay.portal.kernel.exception.PortalException { 452 return _dlAppLocalService.getFileVersion(fileVersionId); 453 } 454 455 /** 456 * Returns the folder with the primary key. 457 * 458 * @param folderId the primary key of the folder 459 * @return the folder with the primary key 460 * @throws PortalException if the folder could not be found 461 */ 462 @Override 463 public com.liferay.portal.kernel.repository.model.Folder getFolder( 464 long folderId) 465 throws com.liferay.portal.kernel.exception.PortalException { 466 return _dlAppLocalService.getFolder(folderId); 467 } 468 469 /** 470 * Returns the folder with the name in the parent folder. 471 * 472 * @param repositoryId the primary key of the folder's repository 473 * @param parentFolderId the primary key of the folder's parent folder 474 * @param name the folder's name 475 * @return the folder with the name in the parent folder 476 * @throws PortalException if the folder could not be found 477 */ 478 @Override 479 public com.liferay.portal.kernel.repository.model.Folder getFolder( 480 long repositoryId, long parentFolderId, java.lang.String name) 481 throws com.liferay.portal.kernel.exception.PortalException { 482 return _dlAppLocalService.getFolder(repositoryId, parentFolderId, name); 483 } 484 485 /** 486 * Returns the mount folder of the repository with the primary key. This 487 * method is only supported by the Liferay repository. 488 * 489 * @param repositoryId the primary key of the repository 490 * @return the folder used for mounting third-party repositories 491 * @throws PortalException if the repository or mount folder could not be 492 found 493 */ 494 @Override 495 public com.liferay.portal.kernel.repository.model.Folder getMountFolder( 496 long repositoryId) 497 throws com.liferay.portal.kernel.exception.PortalException { 498 return _dlAppLocalService.getMountFolder(repositoryId); 499 } 500 501 /** 502 * Moves the file entry to the new folder. 503 * 504 * @param userId the primary key of the user 505 * @param fileEntryId the primary key of the file entry 506 * @param newFolderId the primary key of the new folder 507 * @param serviceContext the service context to be applied 508 * @return the file entry 509 * @throws PortalException if the file entry or the new folder could not be 510 found 511 */ 512 @Override 513 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry( 514 long userId, long fileEntryId, long newFolderId, 515 com.liferay.portal.service.ServiceContext serviceContext) 516 throws com.liferay.portal.kernel.exception.PortalException { 517 return _dlAppLocalService.moveFileEntry(userId, fileEntryId, 518 newFolderId, serviceContext); 519 } 520 521 /** 522 * @deprecated As of 7.0.0, replaced by {@link 523 RepositoryTrashUtil#moveFileEntryFromTrash(long, long, long, 524 long, ServiceContext)} 525 */ 526 @Deprecated 527 @Override 528 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash( 529 long userId, long fileEntryId, long newFolderId, 530 com.liferay.portal.service.ServiceContext serviceContext) 531 throws com.liferay.portal.kernel.exception.PortalException { 532 return _dlAppLocalService.moveFileEntryFromTrash(userId, fileEntryId, 533 newFolderId, serviceContext); 534 } 535 536 /** 537 * @deprecated As of 7.0.0, replaced by {@link 538 RepositoryTrashUtil#moveFileEntryToTrash(long, long, long)} 539 */ 540 @Deprecated 541 @Override 542 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash( 543 long userId, long fileEntryId) 544 throws com.liferay.portal.kernel.exception.PortalException { 545 return _dlAppLocalService.moveFileEntryToTrash(userId, fileEntryId); 546 } 547 548 @Override 549 public com.liferay.portal.kernel.repository.model.Folder moveFolder( 550 long userId, long folderId, long parentFolderId, 551 com.liferay.portal.service.ServiceContext serviceContext) 552 throws com.liferay.portal.kernel.exception.PortalException { 553 return _dlAppLocalService.moveFolder(userId, folderId, parentFolderId, 554 serviceContext); 555 } 556 557 /** 558 * @deprecated As of 7.0.0, replaced by {@link 559 RepositoryTrashUtil#restoreFileEntryFromTrash(long, long, 560 long)} 561 */ 562 @Deprecated 563 @Override 564 public void restoreFileEntryFromTrash(long userId, long fileEntryId) 565 throws com.liferay.portal.kernel.exception.PortalException { 566 _dlAppLocalService.restoreFileEntryFromTrash(userId, fileEntryId); 567 } 568 569 /** 570 * Sets the Spring bean ID for this bean. 571 * 572 * @param beanIdentifier the Spring bean ID for this bean 573 */ 574 @Override 575 public void setBeanIdentifier(java.lang.String beanIdentifier) { 576 _dlAppLocalService.setBeanIdentifier(beanIdentifier); 577 } 578 579 /** 580 * Subscribe the user to changes in documents of the file entry type. This 581 * method is only supported by the Liferay repository. 582 * 583 * @param userId the primary key of the user 584 * @param groupId the primary key of the file entry type's group 585 * @param fileEntryTypeId the primary key of the file entry type 586 * @throws PortalException if the user or group could not be found 587 */ 588 @Override 589 public void subscribeFileEntryType(long userId, long groupId, 590 long fileEntryTypeId) 591 throws com.liferay.portal.kernel.exception.PortalException { 592 _dlAppLocalService.subscribeFileEntryType(userId, groupId, 593 fileEntryTypeId); 594 } 595 596 /** 597 * Subscribe the user to document changes in the folder. This method is only 598 * supported by the Liferay repository. 599 * 600 * @param userId the primary key of the user 601 * @param groupId the primary key of the folder's group 602 * @param folderId the primary key of the folder 603 * @throws PortalException if the user or group could not be found 604 */ 605 @Override 606 public void subscribeFolder(long userId, long groupId, long folderId) 607 throws com.liferay.portal.kernel.exception.PortalException { 608 _dlAppLocalService.subscribeFolder(userId, groupId, folderId); 609 } 610 611 /** 612 * Unsubscribe the user from changes in documents of the file entry type. 613 * This method is only supported by the Liferay repository. 614 * 615 * @param userId the primary key of the user 616 * @param groupId the primary key of the file entry type's group 617 * @param fileEntryTypeId the primary key of the file entry type 618 * @throws PortalException if the user or group could not be found 619 */ 620 @Override 621 public void unsubscribeFileEntryType(long userId, long groupId, 622 long fileEntryTypeId) 623 throws com.liferay.portal.kernel.exception.PortalException { 624 _dlAppLocalService.unsubscribeFileEntryType(userId, groupId, 625 fileEntryTypeId); 626 } 627 628 /** 629 * Unsubscribe the user from document changes in the folder. This method is 630 * only supported by the Liferay repository. 631 * 632 * @param userId the primary key of the user 633 * @param groupId the primary key of the folder's group 634 * @param folderId the primary key of the folder 635 * @throws PortalException if the user or group could not be found 636 */ 637 @Override 638 public void unsubscribeFolder(long userId, long groupId, long folderId) 639 throws com.liferay.portal.kernel.exception.PortalException { 640 _dlAppLocalService.unsubscribeFolder(userId, groupId, folderId); 641 } 642 643 /** 644 * Updates the file entry's asset replacing its asset categories, tags, and 645 * links. 646 * 647 * @param userId the primary key of the user 648 * @param fileEntry the file entry to update 649 * @param fileVersion the file version to update 650 * @param assetCategoryIds the primary keys of the new asset categories 651 * @param assetTagNames the new asset tag names 652 * @param assetLinkEntryIds the primary keys of the new asset link entries 653 * @throws PortalException if the file entry or version could not be found 654 */ 655 @Override 656 public void updateAsset(long userId, 657 com.liferay.portal.kernel.repository.model.FileEntry fileEntry, 658 com.liferay.portal.kernel.repository.model.FileVersion fileVersion, 659 long[] assetCategoryIds, java.lang.String[] assetTagNames, 660 long[] assetLinkEntryIds) 661 throws com.liferay.portal.kernel.exception.PortalException { 662 _dlAppLocalService.updateAsset(userId, fileEntry, fileVersion, 663 assetCategoryIds, assetTagNames, assetLinkEntryIds); 664 } 665 666 /** 667 * Updates a file entry and associated metadata based on a byte array 668 * object. If the file data is <code>null</code>, then only the associated 669 * metadata (i.e., <code>title</code>, <code>description</code>, and 670 * parameters in the <code>serviceContext</code>) will be updated. 671 * 672 * <p> 673 * This method takes two file names, the <code>sourceFileName</code> and the 674 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 675 * name of the actual file being uploaded. The <code>title</code> 676 * corresponds to a name the client wishes to assign this file after it has 677 * been uploaded to the portal. 678 * </p> 679 * 680 * @param userId the primary key of the user 681 * @param fileEntryId the primary key of the file entry 682 * @param sourceFileName the original file's name (optionally 683 <code>null</code>) 684 * @param mimeType the file's MIME type (optionally <code>null</code>) 685 * @param title the new name to be assigned to the file (optionally <code> 686 <code>null</code></code>) 687 * @param description the file's new description 688 * @param changeLog the file's version change log (optionally 689 <code>null</code>) 690 * @param majorVersion whether the new file version is a major version 691 * @param bytes the file's data (optionally <code>null</code>) 692 * @param serviceContext the service context to be applied. Can set the 693 asset category IDs, asset tag names, and expando bridge 694 attributes for the file entry. In a Liferay repository, it may 695 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 696 type </li> <li> fieldsMap - mapping for fields associated with a 697 custom file entry type </li> </ul> 698 * @return the file entry 699 * @throws PortalException if the file entry could not be found 700 */ 701 @Override 702 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 703 long userId, long fileEntryId, java.lang.String sourceFileName, 704 java.lang.String mimeType, java.lang.String title, 705 java.lang.String description, java.lang.String changeLog, 706 boolean majorVersion, byte[] bytes, 707 com.liferay.portal.service.ServiceContext serviceContext) 708 throws com.liferay.portal.kernel.exception.PortalException { 709 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 710 sourceFileName, mimeType, title, description, changeLog, 711 majorVersion, bytes, serviceContext); 712 } 713 714 /** 715 * Updates a file entry and associated metadata based on a {@link File} 716 * object. If the file data is <code>null</code>, then only the associated 717 * metadata (i.e., <code>title</code>, <code>description</code>, and 718 * parameters in the <code>serviceContext</code>) will be updated. 719 * 720 * <p> 721 * This method takes two file names, the <code>sourceFileName</code> and the 722 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 723 * name of the actual file being uploaded. The <code>title</code> 724 * corresponds to a name the client wishes to assign this file after it has 725 * been uploaded to the portal. 726 * </p> 727 * 728 * @param userId the primary key of the user 729 * @param fileEntryId the primary key of the file entry 730 * @param sourceFileName the original file's name (optionally 731 <code>null</code>) 732 * @param mimeType the file's MIME type (optionally <code>null</code>) 733 * @param title the new name to be assigned to the file (optionally <code> 734 <code>null</code></code>) 735 * @param description the file's new description 736 * @param changeLog the file's version change log (optionally 737 <code>null</code>) 738 * @param majorVersion whether the new file version is a major version 739 * @param file the file's data (optionally <code>null</code>) 740 * @param serviceContext the service context to be applied. Can set the 741 asset category IDs, asset tag names, and expando bridge 742 attributes for the file entry. In a Liferay repository, it may 743 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 744 type </li> <li> fieldsMap - mapping for fields associated with a 745 custom file entry type </li> </ul> 746 * @return the file entry 747 * @throws PortalException if the file entry could not be found 748 */ 749 @Override 750 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 751 long userId, long fileEntryId, java.lang.String sourceFileName, 752 java.lang.String mimeType, java.lang.String title, 753 java.lang.String description, java.lang.String changeLog, 754 boolean majorVersion, java.io.File file, 755 com.liferay.portal.service.ServiceContext serviceContext) 756 throws com.liferay.portal.kernel.exception.PortalException { 757 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 758 sourceFileName, mimeType, title, description, changeLog, 759 majorVersion, file, serviceContext); 760 } 761 762 /** 763 * Updates a file entry and associated metadata based on an {@link 764 * InputStream} object. If the file data is <code>null</code>, then only the 765 * associated metadata (i.e., <code>title</code>, <code>description</code>, 766 * and parameters in the <code>serviceContext</code>) will be updated. 767 * 768 * <p> 769 * This method takes two file names, the <code>sourceFileName</code> and the 770 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 771 * name of the actual file being uploaded. The <code>title</code> 772 * corresponds to a name the client wishes to assign this file after it has 773 * been uploaded to the portal. 774 * </p> 775 * 776 * @param userId the primary key of the user 777 * @param fileEntryId the primary key of the file entry 778 * @param sourceFileName the original file's name (optionally 779 <code>null</code>) 780 * @param mimeType the file's MIME type (optionally <code>null</code>) 781 * @param title the new name to be assigned to the file (optionally <code> 782 <code>null</code></code>) 783 * @param description the file's new description 784 * @param changeLog the file's version change log (optionally 785 <code>null</code>) 786 * @param majorVersion whether the new file version is a major version 787 * @param is the file's data (optionally <code>null</code>) 788 * @param size the file's size (optionally <code>0</code>) 789 * @param serviceContext the service context to be applied. Can set the 790 asset category IDs, asset tag names, and expando bridge 791 attributes for the file entry. In a Liferay repository, it may 792 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 793 type </li> <li> fieldsMap - mapping for fields associated with a 794 custom file entry type </li> </ul> 795 * @return the file entry 796 * @throws PortalException if the file entry could not be found 797 */ 798 @Override 799 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 800 long userId, long fileEntryId, java.lang.String sourceFileName, 801 java.lang.String mimeType, java.lang.String title, 802 java.lang.String description, java.lang.String changeLog, 803 boolean majorVersion, java.io.InputStream is, long size, 804 com.liferay.portal.service.ServiceContext serviceContext) 805 throws com.liferay.portal.kernel.exception.PortalException { 806 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 807 sourceFileName, mimeType, title, description, changeLog, 808 majorVersion, is, size, serviceContext); 809 } 810 811 /** 812 * Updates a file rank to the existing file entry. This method is only 813 * supported by the Liferay repository. 814 * 815 * @param repositoryId the primary key of the file rank's repository 816 * @param companyId the primary key of the file rank's company 817 * @param userId the primary key of the file rank's creator/owner 818 * @param fileEntryId the primary key of the file rank's file entry 819 * @param serviceContext the service context to be applied 820 * @return the file rank 821 */ 822 @Override 823 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 824 long repositoryId, long companyId, long userId, long fileEntryId, 825 com.liferay.portal.service.ServiceContext serviceContext) { 826 return _dlAppLocalService.updateFileRank(repositoryId, companyId, 827 userId, fileEntryId, serviceContext); 828 } 829 830 /** 831 * Updates a file shortcut to the existing file entry. This method is only 832 * supported by the Liferay repository. 833 * 834 * @param userId the primary key of the file shortcut's creator/owner 835 * @param fileShortcutId the primary key of the file shortcut 836 * @param folderId the primary key of the file shortcut's parent folder 837 * @param toFileEntryId the primary key of the file shortcut's file entry 838 * @param serviceContext the service context to be applied. Can set the 839 asset category IDs, asset tag names, and expando bridge 840 attributes for the file entry. 841 * @return the file shortcut 842 * @throws PortalException if the file shortcut, folder, or file entry could 843 not be found 844 */ 845 @Override 846 public com.liferay.portal.kernel.repository.model.FileShortcut updateFileShortcut( 847 long userId, long fileShortcutId, long folderId, long toFileEntryId, 848 com.liferay.portal.service.ServiceContext serviceContext) 849 throws com.liferay.portal.kernel.exception.PortalException { 850 return _dlAppLocalService.updateFileShortcut(userId, fileShortcutId, 851 folderId, toFileEntryId, serviceContext); 852 } 853 854 /** 855 * Updates all file shortcuts to the existing file entry to the new file 856 * entry. This method is only supported by the Liferay repository. 857 * 858 * @param oldToFileEntryId the primary key of the old file entry pointed to 859 * @param newToFileEntryId the primary key of the new file entry to point 860 to 861 * @throws PortalException if a file entry for any one of the primary keys 862 could not be found 863 */ 864 @Override 865 public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId) 866 throws com.liferay.portal.kernel.exception.PortalException { 867 _dlAppLocalService.updateFileShortcuts(oldToFileEntryId, 868 newToFileEntryId); 869 } 870 871 /** 872 * Deprecated as of 7.0.0, replaced by {@link #updateFileShortcuts(long, 873 * long)} 874 */ 875 @Deprecated 876 @Override 877 public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId, 878 long newToFileEntryId) 879 throws com.liferay.portal.kernel.exception.PortalException { 880 _dlAppLocalService.updateFileShortcuts(toRepositoryId, 881 oldToFileEntryId, newToFileEntryId); 882 } 883 884 /** 885 * Updates the folder. 886 * 887 * @param folderId the primary key of the folder 888 * @param parentFolderId the primary key of the folder's new parent folder 889 * @param name the folder's new name 890 * @param description the folder's new description 891 * @param serviceContext the service context to be applied. In a Liferay 892 repository, it may include: <ul> <li> defaultFileEntryTypeId - 893 the file entry type to default all Liferay file entries to </li> 894 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 895 comma-delimited list of file entry type primary keys allowed in 896 the given folder and all descendants </li> <li> restrictionType - 897 specifying restriction type of file entry types allowed </li> 898 <li> workflowDefinitionXYZ - the workflow definition name 899 specified per file entry type. The parameter name must be the 900 string <code>workflowDefinition</code> appended by the 901 <code>fileEntryTypeId</code> (optionally <code>0</code>).</li> 902 </ul> 903 * @return the folder 904 * @throws PortalException if the current or new parent folder could not be 905 found, or if the new parent folder's information was invalid 906 */ 907 @Override 908 public com.liferay.portal.kernel.repository.model.Folder updateFolder( 909 long folderId, long parentFolderId, java.lang.String name, 910 java.lang.String description, 911 com.liferay.portal.service.ServiceContext serviceContext) 912 throws com.liferay.portal.kernel.exception.PortalException { 913 return _dlAppLocalService.updateFolder(folderId, parentFolderId, name, 914 description, serviceContext); 915 } 916 917 /** 918 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 919 */ 920 @Deprecated 921 public DLAppLocalService getWrappedDLAppLocalService() { 922 return _dlAppLocalService; 923 } 924 925 /** 926 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 927 */ 928 @Deprecated 929 public void setWrappedDLAppLocalService(DLAppLocalService dlAppLocalService) { 930 _dlAppLocalService = dlAppLocalService; 931 } 932 933 @Override 934 public DLAppLocalService getWrappedService() { 935 return _dlAppLocalService; 936 } 937 938 @Override 939 public void setWrappedService(DLAppLocalService dlAppLocalService) { 940 _dlAppLocalService = dlAppLocalService; 941 } 942 943 private DLAppLocalService _dlAppLocalService; 944 }