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