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