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 @Override 494 public com.liferay.portal.kernel.repository.model.Folder moveFolder( 495 long userId, long folderId, long parentFolderId, 496 com.liferay.portal.service.ServiceContext serviceContext) 497 throws com.liferay.portal.kernel.exception.PortalException { 498 return _dlAppLocalService.moveFolder(userId, folderId, parentFolderId, 499 serviceContext); 500 } 501 502 /** 503 * Subscribe the user to changes in documents of the file entry type. This 504 * method is only supported by the Liferay repository. 505 * 506 * @param userId the primary key of the user 507 * @param groupId the primary key of the file entry type's group 508 * @param fileEntryTypeId the primary key of the file entry type 509 */ 510 @Override 511 public void subscribeFileEntryType(long userId, long groupId, 512 long fileEntryTypeId) 513 throws com.liferay.portal.kernel.exception.PortalException { 514 _dlAppLocalService.subscribeFileEntryType(userId, groupId, 515 fileEntryTypeId); 516 } 517 518 /** 519 * Subscribe the user to document changes in the folder. This method is only 520 * supported by the Liferay repository. 521 * 522 * @param userId the primary key of the user 523 * @param groupId the primary key of the folder's group 524 * @param folderId the primary key of the folder 525 */ 526 @Override 527 public void subscribeFolder(long userId, long groupId, long folderId) 528 throws com.liferay.portal.kernel.exception.PortalException { 529 _dlAppLocalService.subscribeFolder(userId, groupId, folderId); 530 } 531 532 /** 533 * Unsubscribe the user from changes in documents of the file entry type. 534 * This method is only supported by the Liferay repository. 535 * 536 * @param userId the primary key of the user 537 * @param groupId the primary key of the file entry type's group 538 * @param fileEntryTypeId the primary key of the file entry type 539 */ 540 @Override 541 public void unsubscribeFileEntryType(long userId, long groupId, 542 long fileEntryTypeId) 543 throws com.liferay.portal.kernel.exception.PortalException { 544 _dlAppLocalService.unsubscribeFileEntryType(userId, groupId, 545 fileEntryTypeId); 546 } 547 548 /** 549 * Unsubscribe the user from document changes in the folder. This method is 550 * only supported by the Liferay repository. 551 * 552 * @param userId the primary key of the user 553 * @param groupId the primary key of the folder's group 554 * @param folderId the primary key of the folder 555 */ 556 @Override 557 public void unsubscribeFolder(long userId, long groupId, long folderId) 558 throws com.liferay.portal.kernel.exception.PortalException { 559 _dlAppLocalService.unsubscribeFolder(userId, groupId, folderId); 560 } 561 562 /** 563 * Updates the file entry's asset replacing its asset categories, tags, and 564 * links. 565 * 566 * @param userId the primary key of the user 567 * @param fileEntry the file entry to update 568 * @param fileVersion the file version to update 569 * @param assetCategoryIds the primary keys of the new asset categories 570 * @param assetTagNames the new asset tag names 571 * @param assetLinkEntryIds the primary keys of the new asset link entries 572 */ 573 @Override 574 public void updateAsset(long userId, 575 com.liferay.portal.kernel.repository.model.FileEntry fileEntry, 576 com.liferay.portal.kernel.repository.model.FileVersion fileVersion, 577 long[] assetCategoryIds, java.lang.String[] assetTagNames, 578 long[] assetLinkEntryIds) 579 throws com.liferay.portal.kernel.exception.PortalException { 580 _dlAppLocalService.updateAsset(userId, fileEntry, fileVersion, 581 assetCategoryIds, assetTagNames, assetLinkEntryIds); 582 } 583 584 /** 585 * Updates a file entry and associated metadata based on a byte array 586 * object. If the file data is <code>null</code>, then only the associated 587 * metadata (i.e., <code>title</code>, <code>description</code>, and 588 * parameters in the <code>serviceContext</code>) will be updated. 589 * 590 * <p> 591 * This method takes two file names, the <code>sourceFileName</code> and the 592 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 593 * name of the actual file being uploaded. The <code>title</code> 594 * corresponds to a name the client wishes to assign this file after it has 595 * been uploaded to the portal. 596 * </p> 597 * 598 * @param userId the primary key of the user 599 * @param fileEntryId the primary key of the file entry 600 * @param sourceFileName the original file's name (optionally 601 <code>null</code>) 602 * @param mimeType the file's MIME type (optionally <code>null</code>) 603 * @param title the new name to be assigned to the file (optionally <code> 604 <code>null</code></code>) 605 * @param description the file's new description 606 * @param changeLog the file's version change log (optionally 607 <code>null</code>) 608 * @param majorVersion whether the new file version is a major version 609 * @param bytes the file's data (optionally <code>null</code>) 610 * @param serviceContext the service context to be applied. Can set the 611 asset category IDs, asset tag names, and expando bridge 612 attributes for the file entry. In a Liferay repository, it may 613 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 614 type </li> <li> fieldsMap - mapping for fields associated with a 615 custom file entry type </li> </ul> 616 * @return the file entry 617 */ 618 @Override 619 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 620 long userId, long fileEntryId, java.lang.String sourceFileName, 621 java.lang.String mimeType, java.lang.String title, 622 java.lang.String description, java.lang.String changeLog, 623 boolean majorVersion, byte[] bytes, 624 com.liferay.portal.service.ServiceContext serviceContext) 625 throws com.liferay.portal.kernel.exception.PortalException { 626 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 627 sourceFileName, mimeType, title, description, changeLog, 628 majorVersion, bytes, serviceContext); 629 } 630 631 /** 632 * Updates a file entry and associated metadata based on a {@link File} 633 * object. If the file data is <code>null</code>, then only the associated 634 * metadata (i.e., <code>title</code>, <code>description</code>, and 635 * parameters in the <code>serviceContext</code>) will be updated. 636 * 637 * <p> 638 * This method takes two file names, the <code>sourceFileName</code> and the 639 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 640 * name of the actual file being uploaded. The <code>title</code> 641 * corresponds to a name the client wishes to assign this file after it has 642 * been uploaded to the portal. 643 * </p> 644 * 645 * @param userId the primary key of the user 646 * @param fileEntryId the primary key of the file entry 647 * @param sourceFileName the original file's name (optionally 648 <code>null</code>) 649 * @param mimeType the file's MIME type (optionally <code>null</code>) 650 * @param title the new name to be assigned to the file (optionally <code> 651 <code>null</code></code>) 652 * @param description the file's new description 653 * @param changeLog the file's version change log (optionally 654 <code>null</code>) 655 * @param majorVersion whether the new file version is a major version 656 * @param file the file's data (optionally <code>null</code>) 657 * @param serviceContext the service context to be applied. Can set the 658 asset category IDs, asset tag names, and expando bridge 659 attributes for the file entry. In a Liferay repository, it may 660 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 661 type </li> <li> fieldsMap - mapping for fields associated with a 662 custom file entry type </li> </ul> 663 * @return the file entry 664 */ 665 @Override 666 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 667 long userId, long fileEntryId, java.lang.String sourceFileName, 668 java.lang.String mimeType, java.lang.String title, 669 java.lang.String description, java.lang.String changeLog, 670 boolean majorVersion, java.io.File file, 671 com.liferay.portal.service.ServiceContext serviceContext) 672 throws com.liferay.portal.kernel.exception.PortalException { 673 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 674 sourceFileName, mimeType, title, description, changeLog, 675 majorVersion, file, serviceContext); 676 } 677 678 /** 679 * Updates a file entry and associated metadata based on an {@link 680 * InputStream} object. If the file data is <code>null</code>, then only the 681 * associated metadata (i.e., <code>title</code>, <code>description</code>, 682 * and parameters in the <code>serviceContext</code>) will be updated. 683 * 684 * <p> 685 * This method takes two file names, the <code>sourceFileName</code> and the 686 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 687 * name of the actual file being uploaded. The <code>title</code> 688 * corresponds to a name the client wishes to assign this file after it has 689 * been uploaded to the portal. 690 * </p> 691 * 692 * @param userId the primary key of the user 693 * @param fileEntryId the primary key of the file entry 694 * @param sourceFileName the original file's name (optionally 695 <code>null</code>) 696 * @param mimeType the file's MIME type (optionally <code>null</code>) 697 * @param title the new name to be assigned to the file (optionally <code> 698 <code>null</code></code>) 699 * @param description the file's new description 700 * @param changeLog the file's version change log (optionally 701 <code>null</code>) 702 * @param majorVersion whether the new file version is a major version 703 * @param is the file's data (optionally <code>null</code>) 704 * @param size the file's size (optionally <code>0</code>) 705 * @param serviceContext the service context to be applied. Can set the 706 asset category IDs, asset tag names, and expando bridge 707 attributes for the file entry. In a Liferay repository, it may 708 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 709 type </li> <li> fieldsMap - mapping for fields associated with a 710 custom file entry type </li> </ul> 711 * @return the file entry 712 */ 713 @Override 714 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 715 long userId, long fileEntryId, java.lang.String sourceFileName, 716 java.lang.String mimeType, java.lang.String title, 717 java.lang.String description, java.lang.String changeLog, 718 boolean majorVersion, java.io.InputStream is, long size, 719 com.liferay.portal.service.ServiceContext serviceContext) 720 throws com.liferay.portal.kernel.exception.PortalException { 721 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 722 sourceFileName, mimeType, title, description, changeLog, 723 majorVersion, is, size, serviceContext); 724 } 725 726 /** 727 * Updates a file rank to the existing file entry. This method is only 728 * supported by the Liferay repository. 729 * 730 * @param repositoryId the primary key of the file rank's repository 731 * @param companyId the primary key of the file rank's company 732 * @param userId the primary key of the file rank's creator/owner 733 * @param fileEntryId the primary key of the file rank's file entry 734 * @param serviceContext the service context to be applied 735 * @return the file rank 736 */ 737 @Override 738 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 739 long repositoryId, long companyId, long userId, long fileEntryId, 740 com.liferay.portal.service.ServiceContext serviceContext) { 741 return _dlAppLocalService.updateFileRank(repositoryId, companyId, 742 userId, fileEntryId, serviceContext); 743 } 744 745 /** 746 * Updates a file shortcut to the existing file entry. This method is only 747 * supported by the Liferay repository. 748 * 749 * @param userId the primary key of the file shortcut's creator/owner 750 * @param fileShortcutId the primary key of the file shortcut 751 * @param folderId the primary key of the file shortcut's parent folder 752 * @param toFileEntryId the primary key of the file shortcut's file entry 753 * @param serviceContext the service context to be applied. Can set the 754 asset category IDs, asset tag names, and expando bridge 755 attributes for the file entry. 756 * @return the file shortcut 757 */ 758 @Override 759 public com.liferay.portal.kernel.repository.model.FileShortcut updateFileShortcut( 760 long userId, long fileShortcutId, long folderId, long toFileEntryId, 761 com.liferay.portal.service.ServiceContext serviceContext) 762 throws com.liferay.portal.kernel.exception.PortalException { 763 return _dlAppLocalService.updateFileShortcut(userId, fileShortcutId, 764 folderId, toFileEntryId, serviceContext); 765 } 766 767 /** 768 * Updates all file shortcuts to the existing file entry to the new file 769 * entry. This method is only supported by the Liferay repository. 770 * 771 * @param oldToFileEntryId the primary key of the old file entry pointed to 772 * @param newToFileEntryId the primary key of the new file entry to point to 773 */ 774 @Override 775 public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId) 776 throws com.liferay.portal.kernel.exception.PortalException { 777 _dlAppLocalService.updateFileShortcuts(oldToFileEntryId, 778 newToFileEntryId); 779 } 780 781 /** 782 * Deprecated as of 7.0.0, replaced by {@link #updateFileShortcuts(long, 783 * long)} 784 */ 785 @Deprecated 786 @Override 787 public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId, 788 long newToFileEntryId) 789 throws com.liferay.portal.kernel.exception.PortalException { 790 _dlAppLocalService.updateFileShortcuts(toRepositoryId, 791 oldToFileEntryId, newToFileEntryId); 792 } 793 794 /** 795 * Updates the folder. 796 * 797 * @param folderId the primary key of the folder 798 * @param parentFolderId the primary key of the folder's new parent folder 799 * @param name the folder's new name 800 * @param description the folder's new description 801 * @param serviceContext the service context to be applied. In a Liferay 802 repository, it may include: <ul> <li> defaultFileEntryTypeId - 803 the file entry type to default all Liferay file entries to </li> 804 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 805 comma-delimited list of file entry type primary keys allowed in 806 the given folder and all descendants </li> <li> restrictionType - 807 specifying restriction type of file entry types allowed </li> 808 <li> workflowDefinitionXYZ - the workflow definition name 809 specified per file entry type. The parameter name must be the 810 string <code>workflowDefinition</code> appended by the 811 <code>fileEntryTypeId</code> (optionally <code>0</code>).</li> 812 </ul> 813 * @return the folder 814 */ 815 @Override 816 public com.liferay.portal.kernel.repository.model.Folder updateFolder( 817 long folderId, long parentFolderId, java.lang.String name, 818 java.lang.String description, 819 com.liferay.portal.service.ServiceContext serviceContext) 820 throws com.liferay.portal.kernel.exception.PortalException { 821 return _dlAppLocalService.updateFolder(folderId, parentFolderId, name, 822 description, serviceContext); 823 } 824 825 @Override 826 public DLAppLocalService getWrappedService() { 827 return _dlAppLocalService; 828 } 829 830 @Override 831 public void setWrappedService(DLAppLocalService dlAppLocalService) { 832 _dlAppLocalService = dlAppLocalService; 833 } 834 835 private DLAppLocalService _dlAppLocalService; 836 }