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