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 public com.liferay.portal.kernel.repository.model.Folder moveFolder( 413 long userId, long folderId, long parentFolderId, 414 com.liferay.portal.service.ServiceContext serviceContext) 415 throws PortalException; 416 417 /** 418 * Subscribe the user to changes in documents of the file entry type. This 419 * method is only supported by the Liferay repository. 420 * 421 * @param userId the primary key of the user 422 * @param groupId the primary key of the file entry type's group 423 * @param fileEntryTypeId the primary key of the file entry type 424 */ 425 public void subscribeFileEntryType(long userId, long groupId, 426 long fileEntryTypeId) throws PortalException; 427 428 /** 429 * Subscribe the user to document changes in the folder. This method is only 430 * supported by the Liferay repository. 431 * 432 * @param userId the primary key of the user 433 * @param groupId the primary key of the folder's group 434 * @param folderId the primary key of the folder 435 */ 436 public void subscribeFolder(long userId, long groupId, long folderId) 437 throws PortalException; 438 439 /** 440 * Unsubscribe the user from changes in documents of the file entry type. 441 * This method is only supported by the Liferay repository. 442 * 443 * @param userId the primary key of the user 444 * @param groupId the primary key of the file entry type's group 445 * @param fileEntryTypeId the primary key of the file entry type 446 */ 447 public void unsubscribeFileEntryType(long userId, long groupId, 448 long fileEntryTypeId) throws PortalException; 449 450 /** 451 * Unsubscribe the user from document changes in the folder. This method is 452 * only supported by the Liferay repository. 453 * 454 * @param userId the primary key of the user 455 * @param groupId the primary key of the folder's group 456 * @param folderId the primary key of the folder 457 */ 458 public void unsubscribeFolder(long userId, long groupId, long folderId) 459 throws PortalException; 460 461 /** 462 * Updates the file entry's asset replacing its asset categories, tags, and 463 * links. 464 * 465 * @param userId the primary key of the user 466 * @param fileEntry the file entry to update 467 * @param fileVersion the file version to update 468 * @param assetCategoryIds the primary keys of the new asset categories 469 * @param assetTagNames the new asset tag names 470 * @param assetLinkEntryIds the primary keys of the new asset link entries 471 */ 472 public void updateAsset(long userId, 473 com.liferay.portal.kernel.repository.model.FileEntry fileEntry, 474 com.liferay.portal.kernel.repository.model.FileVersion fileVersion, 475 long[] assetCategoryIds, java.lang.String[] assetTagNames, 476 long[] assetLinkEntryIds) throws PortalException; 477 478 /** 479 * Updates a file entry and associated metadata based on a byte array 480 * object. If the file data is <code>null</code>, then only the associated 481 * metadata (i.e., <code>title</code>, <code>description</code>, and 482 * parameters in the <code>serviceContext</code>) will be updated. 483 * 484 * <p> 485 * This method takes two file names, the <code>sourceFileName</code> and the 486 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 487 * name of the actual file being uploaded. The <code>title</code> 488 * corresponds to a name the client wishes to assign this file after it has 489 * been uploaded to the portal. 490 * </p> 491 * 492 * @param userId the primary key of the user 493 * @param fileEntryId the primary key of the file entry 494 * @param sourceFileName the original file's name (optionally 495 <code>null</code>) 496 * @param mimeType the file's MIME type (optionally <code>null</code>) 497 * @param title the new name to be assigned to the file (optionally <code> 498 <code>null</code></code>) 499 * @param description the file's new description 500 * @param changeLog the file's version change log (optionally 501 <code>null</code>) 502 * @param majorVersion whether the new file version is a major version 503 * @param bytes the file's data (optionally <code>null</code>) 504 * @param serviceContext the service context to be applied. Can set the 505 asset category IDs, asset tag names, and expando bridge 506 attributes for the file entry. In a Liferay repository, it may 507 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 508 type </li> <li> fieldsMap - mapping for fields associated with a 509 custom file entry type </li> </ul> 510 * @return the file entry 511 */ 512 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 513 long userId, long fileEntryId, java.lang.String sourceFileName, 514 java.lang.String mimeType, java.lang.String title, 515 java.lang.String description, java.lang.String changeLog, 516 boolean majorVersion, byte[] bytes, 517 com.liferay.portal.service.ServiceContext serviceContext) 518 throws PortalException; 519 520 /** 521 * Updates a file entry and associated metadata based on a {@link File} 522 * object. If the file data is <code>null</code>, then only the associated 523 * metadata (i.e., <code>title</code>, <code>description</code>, and 524 * parameters in the <code>serviceContext</code>) will be updated. 525 * 526 * <p> 527 * This method takes two file names, the <code>sourceFileName</code> and the 528 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 529 * name of the actual file being uploaded. The <code>title</code> 530 * corresponds to a name the client wishes to assign this file after it has 531 * been uploaded to the portal. 532 * </p> 533 * 534 * @param userId the primary key of the user 535 * @param fileEntryId the primary key of the file entry 536 * @param sourceFileName the original file's name (optionally 537 <code>null</code>) 538 * @param mimeType the file's MIME type (optionally <code>null</code>) 539 * @param title the new name to be assigned to the file (optionally <code> 540 <code>null</code></code>) 541 * @param description the file's new description 542 * @param changeLog the file's version change log (optionally 543 <code>null</code>) 544 * @param majorVersion whether the new file version is a major version 545 * @param file the file's data (optionally <code>null</code>) 546 * @param serviceContext the service context to be applied. Can set the 547 asset category IDs, asset tag names, and expando bridge 548 attributes for the file entry. In a Liferay repository, it may 549 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 550 type </li> <li> fieldsMap - mapping for fields associated with a 551 custom file entry type </li> </ul> 552 * @return the file entry 553 */ 554 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 555 long userId, long fileEntryId, java.lang.String sourceFileName, 556 java.lang.String mimeType, java.lang.String title, 557 java.lang.String description, java.lang.String changeLog, 558 boolean majorVersion, java.io.File file, 559 com.liferay.portal.service.ServiceContext serviceContext) 560 throws PortalException; 561 562 /** 563 * Updates a file entry and associated metadata based on an {@link 564 * InputStream} object. If the file data is <code>null</code>, then only the 565 * associated metadata (i.e., <code>title</code>, <code>description</code>, 566 * and parameters in the <code>serviceContext</code>) will be updated. 567 * 568 * <p> 569 * This method takes two file names, the <code>sourceFileName</code> and the 570 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 571 * name of the actual file being uploaded. The <code>title</code> 572 * corresponds to a name the client wishes to assign this file after it has 573 * been uploaded to the portal. 574 * </p> 575 * 576 * @param userId the primary key of the user 577 * @param fileEntryId the primary key of the file entry 578 * @param sourceFileName the original file's name (optionally 579 <code>null</code>) 580 * @param mimeType the file's MIME type (optionally <code>null</code>) 581 * @param title the new name to be assigned to the file (optionally <code> 582 <code>null</code></code>) 583 * @param description the file's new description 584 * @param changeLog the file's version change log (optionally 585 <code>null</code>) 586 * @param majorVersion whether the new file version is a major version 587 * @param is the file's data (optionally <code>null</code>) 588 * @param size the file's size (optionally <code>0</code>) 589 * @param serviceContext the service context to be applied. Can set the 590 asset category IDs, asset tag names, and expando bridge 591 attributes for the file entry. In a Liferay repository, it may 592 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 593 type </li> <li> fieldsMap - mapping for fields associated with a 594 custom file entry type </li> </ul> 595 * @return the file entry 596 */ 597 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 598 long userId, long fileEntryId, java.lang.String sourceFileName, 599 java.lang.String mimeType, java.lang.String title, 600 java.lang.String description, java.lang.String changeLog, 601 boolean majorVersion, java.io.InputStream is, long size, 602 com.liferay.portal.service.ServiceContext serviceContext) 603 throws PortalException; 604 605 /** 606 * Updates a file rank to the existing file entry. This method is only 607 * supported by the Liferay repository. 608 * 609 * @param repositoryId the primary key of the file rank's repository 610 * @param companyId the primary key of the file rank's company 611 * @param userId the primary key of the file rank's creator/owner 612 * @param fileEntryId the primary key of the file rank's file entry 613 * @param serviceContext the service context to be applied 614 * @return the file rank 615 */ 616 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 617 long repositoryId, long companyId, long userId, long fileEntryId, 618 com.liferay.portal.service.ServiceContext serviceContext); 619 620 /** 621 * Updates a file shortcut to the existing file entry. This method is only 622 * supported by the Liferay repository. 623 * 624 * @param userId the primary key of the file shortcut's creator/owner 625 * @param fileShortcutId the primary key of the file shortcut 626 * @param folderId the primary key of the file shortcut's parent folder 627 * @param toFileEntryId the primary key of the file shortcut's file entry 628 * @param serviceContext the service context to be applied. Can set the 629 asset category IDs, asset tag names, and expando bridge 630 attributes for the file entry. 631 * @return the file shortcut 632 */ 633 public com.liferay.portal.kernel.repository.model.FileShortcut updateFileShortcut( 634 long userId, long fileShortcutId, long folderId, long toFileEntryId, 635 com.liferay.portal.service.ServiceContext serviceContext) 636 throws PortalException; 637 638 /** 639 * Updates all file shortcuts to the existing file entry to the new file 640 * entry. This method is only supported by the Liferay repository. 641 * 642 * @param oldToFileEntryId the primary key of the old file entry pointed to 643 * @param newToFileEntryId the primary key of the new file entry to point to 644 */ 645 public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId) 646 throws PortalException; 647 648 /** 649 * Deprecated as of 7.0.0, replaced by {@link #updateFileShortcuts(long, 650 * long)} 651 */ 652 @java.lang.Deprecated 653 public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId, 654 long newToFileEntryId) throws PortalException; 655 656 /** 657 * Updates the folder. 658 * 659 * @param folderId the primary key of the folder 660 * @param parentFolderId the primary key of the folder's new parent folder 661 * @param name the folder's new name 662 * @param description the folder's new description 663 * @param serviceContext the service context to be applied. In a Liferay 664 repository, it may include: <ul> <li> defaultFileEntryTypeId - 665 the file entry type to default all Liferay file entries to </li> 666 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 667 comma-delimited list of file entry type primary keys allowed in 668 the given folder and all descendants </li> <li> restrictionType - 669 specifying restriction type of file entry types allowed </li> 670 <li> workflowDefinitionXYZ - the workflow definition name 671 specified per file entry type. The parameter name must be the 672 string <code>workflowDefinition</code> appended by the 673 <code>fileEntryTypeId</code> (optionally <code>0</code>).</li> 674 </ul> 675 * @return the folder 676 */ 677 public com.liferay.portal.kernel.repository.model.Folder updateFolder( 678 long folderId, long parentFolderId, java.lang.String name, 679 java.lang.String description, 680 com.liferay.portal.service.ServiceContext serviceContext) 681 throws PortalException; 682 }