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