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