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