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.kernel.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.transaction.Isolation; 022 import com.liferay.portal.kernel.transaction.Propagation; 023 import com.liferay.portal.kernel.transaction.Transactional; 024 import com.liferay.portal.service.BaseLocalService; 025 026 /** 027 * Provides the local service interface for DLApp. Methods of this 028 * service will not have security checks based on the propagated JAAS 029 * credentials because this service can only be accessed from within the same 030 * VM. 031 * 032 * @author Brian Wing Shun Chan 033 * @see DLAppLocalServiceUtil 034 * @see com.liferay.portlet.documentlibrary.service.base.DLAppLocalServiceBaseImpl 035 * @see com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl 036 * @generated 037 */ 038 @ProviderType 039 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 040 PortalException.class, SystemException.class}) 041 public interface DLAppLocalService extends BaseLocalService { 042 /* 043 * NOTE FOR DEVELOPERS: 044 * 045 * Never modify or reference this interface directly. Always use {@link DLAppLocalServiceUtil} to access the d l app local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 046 */ 047 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 048 long userId, long repositoryId, long folderId, 049 java.lang.String sourceFileName, java.lang.String mimeType, 050 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext) 051 throws PortalException; 052 053 /** 054 * Adds a file entry and associated metadata based on a byte array. 055 * 056 * <p> 057 * This method takes two file names, the <code>sourceFileName</code> and the 058 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 059 * name of the actual file being uploaded. The <code>title</code> 060 * corresponds to a name the client wishes to assign this file after it has 061 * been uploaded to the portal. If it is <code>null</code>, the <code> 062 * sourceFileName</code> will be used. 063 * </p> 064 * 065 * @param userId the primary key of the file entry's creator/owner 066 * @param repositoryId the primary key of the file entry's repository 067 * @param folderId the primary key of the file entry's parent folder 068 * @param sourceFileName the original file's name 069 * @param mimeType the file's MIME type 070 * @param title the name to be assigned to the file (optionally <code>null 071 </code>) 072 * @param description the file's description 073 * @param changeLog the file's version change log 074 * @param bytes the file's data (optionally <code>null</code>) 075 * @param serviceContext the service context to be applied. Can set the 076 asset category IDs, asset tag names, and expando bridge 077 attributes for the file entry. In a Liferay repository, it may 078 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 079 type </li> <li> fieldsMap - mapping for fields associated with a 080 custom file entry type </li> </ul> 081 * @return the file entry 082 */ 083 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 084 long userId, long repositoryId, long folderId, 085 java.lang.String sourceFileName, java.lang.String mimeType, 086 java.lang.String title, java.lang.String description, 087 java.lang.String changeLog, byte[] bytes, 088 com.liferay.portal.service.ServiceContext serviceContext) 089 throws PortalException; 090 091 /** 092 * Adds a file entry and associated metadata based on a {@link File} object. 093 * 094 * <p> 095 * This method takes two file names, the <code>sourceFileName</code> and the 096 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 097 * name of the actual file being uploaded. The <code>title</code> 098 * corresponds to a name the client wishes to assign this file after it has 099 * been uploaded to the portal. If it is <code>null</code>, the <code> 100 * sourceFileName</code> will be used. 101 * </p> 102 * 103 * @param userId the primary key of the file entry's creator/owner 104 * @param repositoryId the primary key of the repository 105 * @param folderId the primary key of the file entry's parent folder 106 * @param sourceFileName the original file's name 107 * @param mimeType the file's MIME type 108 * @param title the name to be assigned to the file (optionally <code>null 109 </code>) 110 * @param description the file's description 111 * @param changeLog the file's version change log 112 * @param file the file's data (optionally <code>null</code>) 113 * @param serviceContext the service context to be applied. Can set the 114 asset category IDs, asset tag names, and expando bridge 115 attributes for the file entry. In a Liferay repository, it may 116 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 117 type </li> <li> fieldsMap - mapping for fields associated with a 118 custom file entry type </li> </ul> 119 * @return the file entry 120 */ 121 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 122 long userId, long repositoryId, long folderId, 123 java.lang.String sourceFileName, java.lang.String mimeType, 124 java.lang.String title, java.lang.String description, 125 java.lang.String changeLog, java.io.File file, 126 com.liferay.portal.service.ServiceContext serviceContext) 127 throws PortalException; 128 129 /** 130 * Adds a file entry and associated metadata based on an {@link InputStream} 131 * object. 132 * 133 * <p> 134 * This method takes two file names, the <code>sourceFileName</code> and the 135 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 136 * name of the actual file being uploaded. The <code>title</code> 137 * corresponds to a name the client wishes to assign this file after it has 138 * been uploaded to the portal. If it is <code>null</code>, the <code> 139 * sourceFileName</code> will be used. 140 * </p> 141 * 142 * @param userId the primary key of the file entry's creator/owner 143 * @param repositoryId the primary key of the repository 144 * @param folderId the primary key of the file entry's parent folder 145 * @param sourceFileName the original file's name 146 * @param mimeType the file's MIME type 147 * @param title the name to be assigned to the file (optionally <code>null 148 </code>) 149 * @param description the file's description 150 * @param changeLog the file's version change log 151 * @param is the file's data (optionally <code>null</code>) 152 * @param size the file's size (optionally <code>0</code>) 153 * @param serviceContext the service context to be applied. Can set the 154 asset category IDs, asset tag names, and expando bridge 155 attributes for the file entry. In a Liferay repository, it may 156 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 157 type </li> <li> fieldsMap - mapping for fields associated with a 158 custom file entry type </li> </ul> 159 * @return the file entry 160 */ 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 PortalException; 168 169 /** 170 * Adds the file rank to the existing file entry. This method is only 171 * supported by the Liferay repository. 172 * 173 * @param repositoryId the primary key of the repository 174 * @param companyId the primary key of the company 175 * @param userId the primary key of the file rank's creator/owner 176 * @param fileEntryId the primary key of the file entry 177 * @param serviceContext the service context to be applied 178 * @return the file rank 179 */ 180 public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank( 181 long repositoryId, long companyId, long userId, long fileEntryId, 182 com.liferay.portal.service.ServiceContext serviceContext); 183 184 /** 185 * Adds the file shortcut to the existing file entry. This method is only 186 * supported by the Liferay repository. 187 * 188 * @param userId the primary key of the file shortcut's creator/owner 189 * @param repositoryId the primary key of the repository 190 * @param folderId the primary key of the file shortcut's parent folder 191 * @param toFileEntryId the primary key of the file entry to point to 192 * @param serviceContext the service context to be applied. Can set the 193 asset category IDs, asset tag names, and expando bridge 194 attributes for the file entry. 195 * @return the file shortcut 196 */ 197 public com.liferay.portal.kernel.repository.model.FileShortcut addFileShortcut( 198 long userId, long repositoryId, long folderId, long toFileEntryId, 199 com.liferay.portal.service.ServiceContext serviceContext) 200 throws PortalException; 201 202 /** 203 * Adds a folder. 204 * 205 * @param userId the primary key of the folder's creator/owner 206 * @param repositoryId the primary key of the repository 207 * @param parentFolderId the primary key of the folder's parent folder 208 * @param name the folder's name 209 * @param description the folder's description 210 * @param serviceContext the service context to be applied. In a Liferay 211 repository, it may include mountPoint which is a boolean 212 specifying whether the folder is a facade for mounting a 213 third-party repository 214 * @return the folder 215 */ 216 public com.liferay.portal.kernel.repository.model.Folder addFolder( 217 long userId, long repositoryId, long parentFolderId, 218 java.lang.String name, java.lang.String description, 219 com.liferay.portal.service.ServiceContext serviceContext) 220 throws PortalException; 221 222 /** 223 * Delete all data associated to the given repository. This method is only 224 * supported by the Liferay repository. 225 * 226 * @param repositoryId the primary key of the data's repository 227 */ 228 public void deleteAll(long repositoryId) throws PortalException; 229 230 public void deleteAllRepositories(long groupId) throws PortalException; 231 232 /** 233 * Deletes the file entry. 234 * 235 * @param fileEntryId the primary key of the file entry 236 */ 237 public void deleteFileEntry(long fileEntryId) throws PortalException; 238 239 /** 240 * Deletes the file ranks associated to a given file entry. This method is 241 * only supported by the Liferay repository. 242 * 243 * @param fileEntryId the primary key of the file entry 244 */ 245 public void deleteFileRanksByFileEntryId(long fileEntryId); 246 247 /** 248 * Deletes the file ranks associated to a given user. This method is only 249 * supported by the Liferay repository. 250 * 251 * @param userId the primary key of the user 252 */ 253 public void deleteFileRanksByUserId(long userId); 254 255 /** 256 * Deletes the file shortcut. This method is only supported by the Liferay 257 * repository. 258 * 259 * @param fileShortcut the file shortcut 260 */ 261 public void deleteFileShortcut( 262 com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut) 263 throws PortalException; 264 265 /** 266 * Deletes the file shortcut. This method is only supported by the Liferay 267 * repository. 268 * 269 * @param fileShortcutId the primary key of the file shortcut 270 */ 271 public void deleteFileShortcut(long fileShortcutId) 272 throws PortalException; 273 274 /** 275 * Deletes all file shortcuts associated to the file entry. This method is 276 * only supported by the Liferay repository. 277 * 278 * @param toFileEntryId the primary key of the associated file entry 279 */ 280 public void deleteFileShortcuts(long toFileEntryId) 281 throws PortalException; 282 283 /** 284 * Deletes the folder and all of its subfolders and file entries. 285 * 286 * @param folderId the primary key of the folder 287 */ 288 public void deleteFolder(long folderId) throws PortalException; 289 290 /** 291 * Returns the file entry with the primary key. 292 * 293 * @param fileEntryId the primary key of the file entry 294 * @return the file entry with the primary key 295 */ 296 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 297 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 298 long fileEntryId) throws PortalException; 299 300 /** 301 * Returns the file entry with the title in the folder. 302 * 303 * @param groupId the primary key of the file entry's group 304 * @param folderId the primary key of the file entry's folder 305 * @param title the file entry's title 306 * @return the file entry with the title in the folder 307 */ 308 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 309 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 310 long groupId, long folderId, java.lang.String title) 311 throws PortalException; 312 313 /** 314 * Returns the file entry with the UUID and group. 315 * 316 * @param uuid the file entry's UUID 317 * @param groupId the primary key of the file entry's group 318 * @return the file entry with the UUID and group 319 */ 320 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 321 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId( 322 java.lang.String uuid, long groupId) throws PortalException; 323 324 /** 325 * Returns the file ranks from the user. This method is only supported by 326 * the Liferay repository. 327 * 328 * @param repositoryId the primary key of the repository 329 * @param userId the primary key of the user 330 * @return the file ranks from the user 331 */ 332 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 333 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks( 334 long repositoryId, long userId); 335 336 /** 337 * Returns the file shortcut with the primary key. This method is only 338 * supported by the Liferay repository. 339 * 340 * @param fileShortcutId the primary key of the file shortcut 341 * @return the file shortcut with the primary key 342 */ 343 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 344 public com.liferay.portal.kernel.repository.model.FileShortcut getFileShortcut( 345 long fileShortcutId) throws PortalException; 346 347 /** 348 * Returns the file version with the primary key. 349 * 350 * @param fileVersionId the primary key of the file version 351 * @return the file version with the primary key 352 */ 353 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 354 public com.liferay.portal.kernel.repository.model.FileVersion getFileVersion( 355 long fileVersionId) throws PortalException; 356 357 /** 358 * Returns the folder with the primary key. 359 * 360 * @param folderId the primary key of the folder 361 * @return the folder with the primary key 362 */ 363 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 364 public com.liferay.portal.kernel.repository.model.Folder getFolder( 365 long folderId) throws PortalException; 366 367 /** 368 * Returns the folder with the name in the parent folder. 369 * 370 * @param repositoryId the primary key of the folder's repository 371 * @param parentFolderId the primary key of the folder's parent folder 372 * @param name the folder's name 373 * @return the folder with the name in the parent folder 374 */ 375 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 376 public com.liferay.portal.kernel.repository.model.Folder getFolder( 377 long repositoryId, long parentFolderId, java.lang.String name) 378 throws PortalException; 379 380 /** 381 * Returns the mount folder of the repository with the primary key. This 382 * method is only supported by the Liferay repository. 383 * 384 * @param repositoryId the primary key of the repository 385 * @return the folder used for mounting third-party repositories 386 */ 387 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 388 public com.liferay.portal.kernel.repository.model.Folder getMountFolder( 389 long repositoryId) throws PortalException; 390 391 /** 392 * Returns the OSGi service identifier. 393 * 394 * @return the OSGi service identifier 395 */ 396 public java.lang.String getOSGiServiceIdentifier(); 397 398 /** 399 * Moves the file entry to the new folder. 400 * 401 * @param userId the primary key of the user 402 * @param fileEntryId the primary key of the file entry 403 * @param newFolderId the primary key of the new folder 404 * @param serviceContext the service context to be applied 405 * @return the file entry 406 */ 407 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry( 408 long userId, long fileEntryId, long newFolderId, 409 com.liferay.portal.service.ServiceContext serviceContext) 410 throws PortalException; 411 412 /** 413 * @deprecated As of 7.0.0, replaced by {@link 414 RepositoryTrashUtil#moveFileEntryFromTrash(long, long, long, 415 long, ServiceContext)} 416 */ 417 @java.lang.Deprecated 418 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash( 419 long userId, long fileEntryId, long newFolderId, 420 com.liferay.portal.service.ServiceContext serviceContext) 421 throws PortalException; 422 423 /** 424 * @deprecated As of 7.0.0, replaced by {@link 425 RepositoryTrashUtil#moveFileEntryToTrash(long, long, long)} 426 */ 427 @java.lang.Deprecated 428 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash( 429 long userId, long fileEntryId) throws PortalException; 430 431 public com.liferay.portal.kernel.repository.model.Folder moveFolder( 432 long userId, long folderId, long parentFolderId, 433 com.liferay.portal.service.ServiceContext serviceContext) 434 throws PortalException; 435 436 /** 437 * @deprecated As of 7.0.0, replaced by {@link 438 RepositoryTrashUtil#restoreFileEntryFromTrash(long, long, 439 long)} 440 */ 441 @java.lang.Deprecated 442 public void restoreFileEntryFromTrash(long userId, long fileEntryId) 443 throws PortalException; 444 445 /** 446 * Subscribe the user to changes in documents of the file entry type. This 447 * method is only supported by the Liferay repository. 448 * 449 * @param userId the primary key of the user 450 * @param groupId the primary key of the file entry type's group 451 * @param fileEntryTypeId the primary key of the file entry type 452 */ 453 public void subscribeFileEntryType(long userId, long groupId, 454 long fileEntryTypeId) throws PortalException; 455 456 /** 457 * Subscribe the user to document changes in the folder. This method is only 458 * supported by the Liferay repository. 459 * 460 * @param userId the primary key of the user 461 * @param groupId the primary key of the folder's group 462 * @param folderId the primary key of the folder 463 */ 464 public void subscribeFolder(long userId, long groupId, long folderId) 465 throws PortalException; 466 467 /** 468 * Unsubscribe the user from changes in documents of the file entry type. 469 * This method is only supported by the Liferay repository. 470 * 471 * @param userId the primary key of the user 472 * @param groupId the primary key of the file entry type's group 473 * @param fileEntryTypeId the primary key of the file entry type 474 */ 475 public void unsubscribeFileEntryType(long userId, long groupId, 476 long fileEntryTypeId) throws PortalException; 477 478 /** 479 * Unsubscribe the user from document changes in the folder. This method is 480 * only supported by the Liferay repository. 481 * 482 * @param userId the primary key of the user 483 * @param groupId the primary key of the folder's group 484 * @param folderId the primary key of the folder 485 */ 486 public void unsubscribeFolder(long userId, long groupId, long folderId) 487 throws PortalException; 488 489 /** 490 * Updates the file entry's asset replacing its asset categories, tags, and 491 * links. 492 * 493 * @param userId the primary key of the user 494 * @param fileEntry the file entry to update 495 * @param fileVersion the file version to update 496 * @param assetCategoryIds the primary keys of the new asset categories 497 * @param assetTagNames the new asset tag names 498 * @param assetLinkEntryIds the primary keys of the new asset link entries 499 */ 500 public void updateAsset(long userId, 501 com.liferay.portal.kernel.repository.model.FileEntry fileEntry, 502 com.liferay.portal.kernel.repository.model.FileVersion fileVersion, 503 long[] assetCategoryIds, java.lang.String[] assetTagNames, 504 long[] assetLinkEntryIds) throws PortalException; 505 506 /** 507 * Updates a file entry and associated metadata based on a byte array 508 * object. If the file data is <code>null</code>, then only the associated 509 * metadata (i.e., <code>title</code>, <code>description</code>, and 510 * parameters in the <code>serviceContext</code>) will be updated. 511 * 512 * <p> 513 * This method takes two file names, the <code>sourceFileName</code> and the 514 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 515 * name of the actual file being uploaded. The <code>title</code> 516 * corresponds to a name the client wishes to assign this file after it has 517 * been uploaded to the portal. 518 * </p> 519 * 520 * @param userId the primary key of the user 521 * @param fileEntryId the primary key of the file entry 522 * @param sourceFileName the original file's name (optionally 523 <code>null</code>) 524 * @param mimeType the file's MIME type (optionally <code>null</code>) 525 * @param title the new name to be assigned to the file (optionally <code> 526 <code>null</code></code>) 527 * @param description the file's new description 528 * @param changeLog the file's version change log (optionally 529 <code>null</code>) 530 * @param majorVersion whether the new file version is a major version 531 * @param bytes the file's data (optionally <code>null</code>) 532 * @param serviceContext the service context to be applied. Can set the 533 asset category IDs, asset tag names, and expando bridge 534 attributes for the file entry. In a Liferay repository, it may 535 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 536 type </li> <li> fieldsMap - mapping for fields associated with a 537 custom file entry type </li> </ul> 538 * @return the file entry 539 */ 540 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 541 long userId, long fileEntryId, java.lang.String sourceFileName, 542 java.lang.String mimeType, java.lang.String title, 543 java.lang.String description, java.lang.String changeLog, 544 boolean majorVersion, byte[] bytes, 545 com.liferay.portal.service.ServiceContext serviceContext) 546 throws PortalException; 547 548 /** 549 * Updates a file entry and associated metadata based on a {@link File} 550 * object. If the file data is <code>null</code>, then only the associated 551 * metadata (i.e., <code>title</code>, <code>description</code>, and 552 * parameters in the <code>serviceContext</code>) will be updated. 553 * 554 * <p> 555 * This method takes two file names, the <code>sourceFileName</code> and the 556 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 557 * name of the actual file being uploaded. The <code>title</code> 558 * corresponds to a name the client wishes to assign this file after it has 559 * been uploaded to the portal. 560 * </p> 561 * 562 * @param userId the primary key of the user 563 * @param fileEntryId the primary key of the file entry 564 * @param sourceFileName the original file's name (optionally 565 <code>null</code>) 566 * @param mimeType the file's MIME type (optionally <code>null</code>) 567 * @param title the new name to be assigned to the file (optionally <code> 568 <code>null</code></code>) 569 * @param description the file's new description 570 * @param changeLog the file's version change log (optionally 571 <code>null</code>) 572 * @param majorVersion whether the new file version is a major version 573 * @param file the file's data (optionally <code>null</code>) 574 * @param serviceContext the service context to be applied. Can set the 575 asset category IDs, asset tag names, and expando bridge 576 attributes for the file entry. In a Liferay repository, it may 577 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 578 type </li> <li> fieldsMap - mapping for fields associated with a 579 custom file entry type </li> </ul> 580 * @return the file entry 581 */ 582 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 583 long userId, long fileEntryId, java.lang.String sourceFileName, 584 java.lang.String mimeType, java.lang.String title, 585 java.lang.String description, java.lang.String changeLog, 586 boolean majorVersion, java.io.File file, 587 com.liferay.portal.service.ServiceContext serviceContext) 588 throws PortalException; 589 590 /** 591 * Updates a file entry and associated metadata based on an {@link 592 * InputStream} object. If the file data is <code>null</code>, then only the 593 * associated metadata (i.e., <code>title</code>, <code>description</code>, 594 * and parameters in the <code>serviceContext</code>) will be updated. 595 * 596 * <p> 597 * This method takes two file names, the <code>sourceFileName</code> and the 598 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 599 * name of the actual file being uploaded. The <code>title</code> 600 * corresponds to a name the client wishes to assign this file after it has 601 * been uploaded to the portal. 602 * </p> 603 * 604 * @param userId the primary key of the user 605 * @param fileEntryId the primary key of the file entry 606 * @param sourceFileName the original file's name (optionally 607 <code>null</code>) 608 * @param mimeType the file's MIME type (optionally <code>null</code>) 609 * @param title the new name to be assigned to the file (optionally <code> 610 <code>null</code></code>) 611 * @param description the file's new description 612 * @param changeLog the file's version change log (optionally 613 <code>null</code>) 614 * @param majorVersion whether the new file version is a major version 615 * @param is the file's data (optionally <code>null</code>) 616 * @param size the file's size (optionally <code>0</code>) 617 * @param serviceContext the service context to be applied. Can set the 618 asset category IDs, asset tag names, and expando bridge 619 attributes for the file entry. In a Liferay repository, it may 620 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 621 type </li> <li> fieldsMap - mapping for fields associated with a 622 custom file entry type </li> </ul> 623 * @return the file entry 624 */ 625 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 626 long userId, long fileEntryId, java.lang.String sourceFileName, 627 java.lang.String mimeType, java.lang.String title, 628 java.lang.String description, java.lang.String changeLog, 629 boolean majorVersion, java.io.InputStream is, long size, 630 com.liferay.portal.service.ServiceContext serviceContext) 631 throws PortalException; 632 633 /** 634 * Updates a file rank to the existing file entry. This method is only 635 * supported by the Liferay repository. 636 * 637 * @param repositoryId the primary key of the file rank's repository 638 * @param companyId the primary key of the file rank's company 639 * @param userId the primary key of the file rank's creator/owner 640 * @param fileEntryId the primary key of the file rank's file entry 641 * @param serviceContext the service context to be applied 642 * @return the file rank 643 */ 644 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 645 long repositoryId, long companyId, long userId, long fileEntryId, 646 com.liferay.portal.service.ServiceContext serviceContext); 647 648 /** 649 * Updates a file shortcut to the existing file entry. This method is only 650 * supported by the Liferay repository. 651 * 652 * @param userId the primary key of the file shortcut's creator/owner 653 * @param fileShortcutId the primary key of the file shortcut 654 * @param folderId the primary key of the file shortcut's parent folder 655 * @param toFileEntryId the primary key of the file shortcut's file entry 656 * @param serviceContext the service context to be applied. Can set the 657 asset category IDs, asset tag names, and expando bridge 658 attributes for the file entry. 659 * @return the file shortcut 660 */ 661 public com.liferay.portal.kernel.repository.model.FileShortcut updateFileShortcut( 662 long userId, long fileShortcutId, long folderId, long toFileEntryId, 663 com.liferay.portal.service.ServiceContext serviceContext) 664 throws PortalException; 665 666 /** 667 * Updates all file shortcuts to the existing file entry to the new file 668 * entry. This method is only supported by the Liferay repository. 669 * 670 * @param oldToFileEntryId the primary key of the old file entry pointed to 671 * @param newToFileEntryId the primary key of the new file entry to point to 672 */ 673 public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId) 674 throws PortalException; 675 676 /** 677 * Deprecated as of 7.0.0, replaced by {@link #updateFileShortcuts(long, 678 * long)} 679 */ 680 @java.lang.Deprecated 681 public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId, 682 long newToFileEntryId) throws PortalException; 683 684 /** 685 * Updates the folder. 686 * 687 * @param folderId the primary key of the folder 688 * @param parentFolderId the primary key of the folder's new parent folder 689 * @param name the folder's new name 690 * @param description the folder's new description 691 * @param serviceContext the service context to be applied. In a Liferay 692 repository, it may include: <ul> <li> defaultFileEntryTypeId - 693 the file entry type to default all Liferay file entries to </li> 694 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 695 comma-delimited list of file entry type primary keys allowed in 696 the given folder and all descendants </li> <li> restrictionType - 697 specifying restriction type of file entry types allowed </li> 698 <li> workflowDefinitionXYZ - the workflow definition name 699 specified per file entry type. The parameter name must be the 700 string <code>workflowDefinition</code> appended by the 701 <code>fileEntryTypeId</code> (optionally <code>0</code>).</li> 702 </ul> 703 * @return the folder 704 */ 705 public com.liferay.portal.kernel.repository.model.Folder updateFolder( 706 long folderId, long parentFolderId, java.lang.String name, 707 java.lang.String description, 708 com.liferay.portal.service.ServiceContext serviceContext) 709 throws PortalException; 710 }