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.service.ServiceWrapper; 018 019 /** 020 * <p> 021 * This class is a wrapper for {@link DLAppLocalService}. 022 * </p> 023 * 024 * @author Brian Wing Shun Chan 025 * @see DLAppLocalService 026 * @generated 027 */ 028 public class DLAppLocalServiceWrapper implements DLAppLocalService, 029 ServiceWrapper<DLAppLocalService> { 030 public DLAppLocalServiceWrapper(DLAppLocalService dlAppLocalService) { 031 _dlAppLocalService = dlAppLocalService; 032 } 033 034 /** 035 * Returns the Spring bean ID for this bean. 036 * 037 * @return the Spring bean ID for this bean 038 */ 039 public java.lang.String getBeanIdentifier() { 040 return _dlAppLocalService.getBeanIdentifier(); 041 } 042 043 /** 044 * Sets the Spring bean ID for this bean. 045 * 046 * @param beanIdentifier the Spring bean ID for this bean 047 */ 048 public void setBeanIdentifier(java.lang.String beanIdentifier) { 049 _dlAppLocalService.setBeanIdentifier(beanIdentifier); 050 } 051 052 /** 053 * Adds a file entry and associated metadata based on a byte array. 054 * 055 * <p> 056 * This method takes two file names, the <code>sourceFileName</code> and the 057 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 058 * name of the actual file being uploaded. The <code>title</code> 059 * corresponds to a name the client wishes to assign this file after it has 060 * been uploaded to the portal. If it is <code>null</code>, the <code> 061 * sourceFileName</code> will be used. 062 * </p> 063 * 064 * @param userId the primary key of the file entry's creator/owner 065 * @param repositoryId the primary key of the file entry's repository 066 * @param folderId the primary key of the file entry's parent folder 067 * @param sourceFileName the original file's name 068 * @param mimeType the file's MIME type 069 * @param title the name to be assigned to the file (optionally <code>null 070 </code>) 071 * @param description the file's description 072 * @param changeLog the file's version change log 073 * @param bytes the file's data (optionally <code>null</code>) 074 * @param serviceContext the service context to be applied. Can set the 075 asset category IDs, asset tag names, and expando bridge 076 attributes for the file entry. In a Liferay repository, it may 077 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 078 type </li> <li> fieldsMap - mapping for fields associated with a 079 custom file entry type </li> </ul> 080 * @return the file entry 081 * @throws PortalException if the parent folder could not be found or if the 082 file entry's information was invalid 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 086 long userId, long repositoryId, long folderId, 087 java.lang.String sourceFileName, java.lang.String mimeType, 088 java.lang.String title, java.lang.String description, 089 java.lang.String changeLog, byte[] bytes, 090 com.liferay.portal.service.ServiceContext serviceContext) 091 throws com.liferay.portal.kernel.exception.PortalException, 092 com.liferay.portal.kernel.exception.SystemException { 093 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 094 sourceFileName, mimeType, title, description, changeLog, bytes, 095 serviceContext); 096 } 097 098 /** 099 * Adds a file entry and associated metadata based on a {@link File} object. 100 * 101 * <p> 102 * This method takes two file names, the <code>sourceFileName</code> and the 103 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 104 * name of the actual file being uploaded. The <code>title</code> 105 * corresponds to a name the client wishes to assign this file after it has 106 * been uploaded to the portal. If it is <code>null</code>, the <code> 107 * sourceFileName</code> will be used. 108 * </p> 109 * 110 * @param userId the primary key of the file entry's creator/owner 111 * @param repositoryId the primary key of the repository 112 * @param folderId the primary key of the file entry's parent folder 113 * @param sourceFileName the original file's name 114 * @param mimeType the file's MIME type 115 * @param title the name to be assigned to the file (optionally <code>null 116 </code>) 117 * @param description the file's description 118 * @param changeLog the file's version change log 119 * @param file the file's data (optionally <code>null</code>) 120 * @param serviceContext the service context to be applied. Can set the 121 asset category IDs, asset tag names, and expando bridge 122 attributes for the file entry. In a Liferay repository, it may 123 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 124 type </li> <li> fieldsMap - mapping for fields associated with a 125 custom file entry type </li> </ul> 126 * @return the file entry 127 * @throws PortalException if the parent folder could not be found or if the 128 file entry's information was invalid 129 * @throws SystemException if a system exception occurred 130 */ 131 public com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 132 long userId, long repositoryId, long folderId, 133 java.lang.String sourceFileName, java.lang.String mimeType, 134 java.lang.String title, java.lang.String description, 135 java.lang.String changeLog, java.io.File file, 136 com.liferay.portal.service.ServiceContext serviceContext) 137 throws com.liferay.portal.kernel.exception.PortalException, 138 com.liferay.portal.kernel.exception.SystemException { 139 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 140 sourceFileName, mimeType, title, description, changeLog, file, 141 serviceContext); 142 } 143 144 /** 145 * Adds a file entry and associated metadata based on an {@link InputStream} 146 * 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 return _dlAppLocalService.addFileEntry(userId, repositoryId, folderId, 188 sourceFileName, mimeType, title, description, changeLog, is, size, 189 serviceContext); 190 } 191 192 /** 193 * Adds the file rank to the existing file entry. This method is only 194 * supported by the Liferay repository. 195 * 196 * @param repositoryId the primary key of the repository 197 * @param companyId the primary key of the company 198 * @param userId the primary key of the file rank's creator/owner 199 * @param fileEntryId the primary key of the file entry 200 * @param serviceContext the service context to be applied 201 * @return the file rank 202 * @throws SystemException if a system exception occurred 203 */ 204 public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank( 205 long repositoryId, long companyId, long userId, long fileEntryId, 206 com.liferay.portal.service.ServiceContext serviceContext) 207 throws com.liferay.portal.kernel.exception.SystemException { 208 return _dlAppLocalService.addFileRank(repositoryId, companyId, userId, 209 fileEntryId, serviceContext); 210 } 211 212 /** 213 * Adds the file shortcut to the existing file entry. This method is only 214 * supported by the Liferay repository. 215 * 216 * @param userId the primary key of the file shortcut's creator/owner 217 * @param repositoryId the primary key of the repository 218 * @param folderId the primary key of the file shortcut's parent folder 219 * @param toFileEntryId the primary key of the file entry to point to 220 * @param serviceContext the service context to be applied. Can set the 221 asset category IDs, asset tag names, and expando bridge 222 attributes for the file entry. 223 * @return the file shortcut 224 * @throws PortalException if the parent folder or file entry could not be 225 found, or if the file shortcut's information was invalid 226 * @throws SystemException if a system exception occurred 227 */ 228 public com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut( 229 long userId, long repositoryId, long folderId, long toFileEntryId, 230 com.liferay.portal.service.ServiceContext serviceContext) 231 throws com.liferay.portal.kernel.exception.PortalException, 232 com.liferay.portal.kernel.exception.SystemException { 233 return _dlAppLocalService.addFileShortcut(userId, repositoryId, 234 folderId, toFileEntryId, serviceContext); 235 } 236 237 /** 238 * Adds a folder. 239 * 240 * @param userId the primary key of the folder's creator/owner 241 * @param repositoryId the primary key of the repository 242 * @param parentFolderId the primary key of the folder's parent folder 243 * @param name the folder's name 244 * @param description the folder's description 245 * @param serviceContext the service context to be applied. In a Liferay 246 repository, it may include mountPoint which is a boolean 247 specifying whether the folder is a facade for mounting a 248 third-party repository 249 * @return the folder 250 * @throws PortalException if the parent folder could not be found or if the 251 new folder's information was invalid 252 * @throws SystemException if a system exception occurred 253 */ 254 public com.liferay.portal.kernel.repository.model.Folder addFolder( 255 long userId, long repositoryId, long parentFolderId, 256 java.lang.String name, java.lang.String description, 257 com.liferay.portal.service.ServiceContext serviceContext) 258 throws com.liferay.portal.kernel.exception.PortalException, 259 com.liferay.portal.kernel.exception.SystemException { 260 return _dlAppLocalService.addFolder(userId, repositoryId, 261 parentFolderId, name, description, serviceContext); 262 } 263 264 /** 265 * Delete all data associated to the given repository. This method is only 266 * supported by the Liferay repository. 267 * 268 * @param repositoryId the primary key of the data's repository 269 * @throws PortalException if the repository could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public void deleteAll(long repositoryId) 273 throws com.liferay.portal.kernel.exception.PortalException, 274 com.liferay.portal.kernel.exception.SystemException { 275 _dlAppLocalService.deleteAll(repositoryId); 276 } 277 278 /** 279 * Deletes the file entry. 280 * 281 * @param fileEntryId the primary key of the file entry 282 * @throws PortalException if the file entry could not be found 283 * @throws SystemException if a system exception occurred 284 */ 285 public void deleteFileEntry(long fileEntryId) 286 throws com.liferay.portal.kernel.exception.PortalException, 287 com.liferay.portal.kernel.exception.SystemException { 288 _dlAppLocalService.deleteFileEntry(fileEntryId); 289 } 290 291 /** 292 * Deletes the file ranks associated to a given file entry. This method is 293 * only supported by the Liferay repository. 294 * 295 * @param fileEntryId the primary key of the file entry 296 * @throws SystemException if a system exception occurred 297 */ 298 public void deleteFileRanksByFileEntryId(long fileEntryId) 299 throws com.liferay.portal.kernel.exception.SystemException { 300 _dlAppLocalService.deleteFileRanksByFileEntryId(fileEntryId); 301 } 302 303 /** 304 * Deletes the file ranks associated to a given user. This method is only 305 * supported by the Liferay repository. 306 * 307 * @param userId the primary key of the user 308 * @throws SystemException if a system exception occurred 309 */ 310 public void deleteFileRanksByUserId(long userId) 311 throws com.liferay.portal.kernel.exception.SystemException { 312 _dlAppLocalService.deleteFileRanksByUserId(userId); 313 } 314 315 /** 316 * Deletes the file shortcut. This method is only supported by the Liferay 317 * repository. 318 * 319 * @param dlFileShortcut the file shortcut 320 * @throws PortalException if the file shortcut could not be found 321 * @throws SystemException if a system exception occurred 322 */ 323 public void deleteFileShortcut( 324 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut) 325 throws com.liferay.portal.kernel.exception.PortalException, 326 com.liferay.portal.kernel.exception.SystemException { 327 _dlAppLocalService.deleteFileShortcut(dlFileShortcut); 328 } 329 330 /** 331 * Deletes the file shortcut. This method is only supported by the Liferay 332 * repository. 333 * 334 * @param fileShortcutId the primary key of the file shortcut 335 * @throws PortalException if the file shortcut could not be found 336 * @throws SystemException if a system exception occurred 337 */ 338 public void deleteFileShortcut(long fileShortcutId) 339 throws com.liferay.portal.kernel.exception.PortalException, 340 com.liferay.portal.kernel.exception.SystemException { 341 _dlAppLocalService.deleteFileShortcut(fileShortcutId); 342 } 343 344 /** 345 * Deletes all file shortcuts associated to the file entry. This method is 346 * only supported by the Liferay repository. 347 * 348 * @param toFileEntryId the primary key of the associated file entry 349 * @throws PortalException if the file shortcut for the file entry could not 350 be found 351 * @throws SystemException if a system exception occurred 352 */ 353 public void deleteFileShortcuts(long toFileEntryId) 354 throws com.liferay.portal.kernel.exception.PortalException, 355 com.liferay.portal.kernel.exception.SystemException { 356 _dlAppLocalService.deleteFileShortcuts(toFileEntryId); 357 } 358 359 /** 360 * Deletes the folder and all of its subfolders and file entries. 361 * 362 * @param folderId the primary key of the folder 363 * @throws PortalException if the folder could not be found 364 * @throws SystemException if a system exception occurred 365 */ 366 public void deleteFolder(long folderId) 367 throws com.liferay.portal.kernel.exception.PortalException, 368 com.liferay.portal.kernel.exception.SystemException { 369 _dlAppLocalService.deleteFolder(folderId); 370 } 371 372 /** 373 * Returns the file entries in the folder. 374 * 375 * @param repositoryId the primary key of the file entry's repository 376 * @param folderId the primary key of the file entry's folder 377 * @return the file entries in the folder 378 * @throws PortalException if the folder could not be found 379 * @throws SystemException if a system exception occurred 380 */ 381 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 382 long repositoryId, long folderId) 383 throws com.liferay.portal.kernel.exception.PortalException, 384 com.liferay.portal.kernel.exception.SystemException { 385 return _dlAppLocalService.getFileEntries(repositoryId, folderId); 386 } 387 388 /** 389 * Returns a range of all the file entries in the folder. 390 * 391 * <p> 392 * Useful when paginating results. Returns a maximum of <code>end - 393 * start</code> instances. <code>start</code> and <code>end</code> are not 394 * primary keys, they are indexes in the result set. Thus, <code>0</code> 395 * refers to the first result in the set. Setting both <code>start</code> 396 * and <code>end</code> to {@link 397 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 398 * result set. 399 * </p> 400 * 401 * @param repositoryId the primary key of the file entry's repository 402 * @param folderId the primary key of the file entry's folder 403 * @param start the lower bound of the range of results 404 * @param end the upper bound of the range of results (not inclusive) 405 * @return the range of file entries in the folder 406 * @throws PortalException if the folder could not be found 407 * @throws SystemException if a system exception occurred 408 */ 409 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 410 long repositoryId, long folderId, int start, int end) 411 throws com.liferay.portal.kernel.exception.PortalException, 412 com.liferay.portal.kernel.exception.SystemException { 413 return _dlAppLocalService.getFileEntries(repositoryId, folderId, start, 414 end); 415 } 416 417 /** 418 * Returns an ordered range of all the file entries in the folder. 419 * 420 * <p> 421 * Useful when paginating results. Returns a maximum of <code>end - 422 * start</code> instances. <code>start</code> and <code>end</code> are not 423 * primary keys, they are indexes in the result set. Thus, <code>0</code> 424 * refers to the first result in the set. Setting both <code>start</code> 425 * and <code>end</code> to {@link 426 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 427 * result set. 428 * </p> 429 * 430 * @param repositoryId the primary key of the file entry's repository 431 * @param folderId the primary key of the file entry's folder 432 * @param start the lower bound of the range of results 433 * @param end the upper bound of the range of results (not inclusive) 434 * @param obc the comparator to order the file entries (optionally 435 <code>null</code>) 436 * @return the range of file entries in the folder ordered by comparator 437 <code>obc</code> 438 * @throws PortalException if the folder could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 442 long repositoryId, long folderId, int start, int end, 443 com.liferay.portal.kernel.util.OrderByComparator obc) 444 throws com.liferay.portal.kernel.exception.PortalException, 445 com.liferay.portal.kernel.exception.SystemException { 446 return _dlAppLocalService.getFileEntries(repositoryId, folderId, start, 447 end, obc); 448 } 449 450 /** 451 * Returns a range of all the file entries and shortcuts in the folder. 452 * 453 * <p> 454 * Useful when paginating results. Returns a maximum of <code>end - 455 * start</code> instances. <code>start</code> and <code>end</code> are not 456 * primary keys, they are indexes in the result set. Thus, <code>0</code> 457 * refers to the first result in the set. Setting both <code>start</code> 458 * and <code>end</code> to {@link 459 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 460 * result set. 461 * </p> 462 * 463 * @param repositoryId the primary key of the repository 464 * @param folderId the primary key of the folder 465 * @param status the workflow status 466 * @param start the lower bound of the range of results 467 * @param end the upper bound of the range of results (not inclusive) 468 * @return the range of file entries and shortcuts in the folder 469 * @throws PortalException if the folder could not be found 470 * @throws SystemException if a system exception occurred 471 */ 472 public java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts( 473 long repositoryId, long folderId, int status, int start, int end) 474 throws com.liferay.portal.kernel.exception.PortalException, 475 com.liferay.portal.kernel.exception.SystemException { 476 return _dlAppLocalService.getFileEntriesAndFileShortcuts(repositoryId, 477 folderId, status, start, end); 478 } 479 480 /** 481 * Returns the number of file entries and shortcuts in the folder. 482 * 483 * @param repositoryId the primary key of the repository 484 * @param folderId the primary key of the folder 485 * @param status the workflow status 486 * @return the number of file entries and shortcuts in the folder 487 * @throws PortalException if the folder could not be found 488 * @throws SystemException if a system exception occurred 489 */ 490 public int getFileEntriesAndFileShortcutsCount(long repositoryId, 491 long folderId, int status) 492 throws com.liferay.portal.kernel.exception.PortalException, 493 com.liferay.portal.kernel.exception.SystemException { 494 return _dlAppLocalService.getFileEntriesAndFileShortcutsCount(repositoryId, 495 folderId, status); 496 } 497 498 /** 499 * Returns the number of file entries in the folder. 500 * 501 * @param repositoryId the primary key of the file entry's repository 502 * @param folderId the primary key of the file entry's folder 503 * @return the number of file entries in the folder 504 * @throws PortalException if the folder could not be found 505 * @throws SystemException if a system exception occurred 506 */ 507 public int getFileEntriesCount(long repositoryId, long folderId) 508 throws com.liferay.portal.kernel.exception.PortalException, 509 com.liferay.portal.kernel.exception.SystemException { 510 return _dlAppLocalService.getFileEntriesCount(repositoryId, folderId); 511 } 512 513 /** 514 * Returns the file entry with the primary key. 515 * 516 * @param fileEntryId the primary key of the file entry 517 * @return the file entry with the primary key 518 * @throws PortalException if the file entry could not be found 519 * @throws SystemException if a system exception occurred 520 */ 521 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 522 long fileEntryId) 523 throws com.liferay.portal.kernel.exception.PortalException, 524 com.liferay.portal.kernel.exception.SystemException { 525 return _dlAppLocalService.getFileEntry(fileEntryId); 526 } 527 528 /** 529 * Returns the file entry with the title in the folder. 530 * 531 * @param groupId the primary key of the file entry's group 532 * @param folderId the primary key of the file entry's folder 533 * @param title the file entry's title 534 * @return the file entry with the title in the folder 535 * @throws PortalException if the file entry could not be found 536 * @throws SystemException if a system exception occurred 537 */ 538 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 539 long groupId, long folderId, java.lang.String title) 540 throws com.liferay.portal.kernel.exception.PortalException, 541 com.liferay.portal.kernel.exception.SystemException { 542 return _dlAppLocalService.getFileEntry(groupId, folderId, title); 543 } 544 545 /** 546 * Returns the file entry with the UUID and group. 547 * 548 * @param uuid the file entry's universally unique identifier 549 * @param groupId the primary key of the file entry's group 550 * @return the file entry with the UUID and group 551 * @throws PortalException if the file entry could not be found 552 * @throws SystemException if a system exception occurred 553 */ 554 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId( 555 java.lang.String uuid, long groupId) 556 throws com.liferay.portal.kernel.exception.PortalException, 557 com.liferay.portal.kernel.exception.SystemException { 558 return _dlAppLocalService.getFileEntryByUuidAndGroupId(uuid, groupId); 559 } 560 561 /** 562 * Returns the file ranks from the user. This method is only supported by 563 * the Liferay repository. 564 * 565 * @param repositoryId the primary key of the repository 566 * @param userId the primary key of the user 567 * @return the file ranks from the user 568 * @throws SystemException if a system exception occurred 569 */ 570 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks( 571 long repositoryId, long userId) 572 throws com.liferay.portal.kernel.exception.SystemException { 573 return _dlAppLocalService.getFileRanks(repositoryId, userId); 574 } 575 576 /** 577 * Returns the file shortcut with the primary key. This method is only 578 * supported by the Liferay repository. 579 * 580 * @param fileShortcutId the primary key of the file shortcut 581 * @return the file shortcut with the primary key 582 * @throws PortalException if the file shortcut could not be found 583 * @throws SystemException if a system exception occurred 584 */ 585 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut( 586 long fileShortcutId) 587 throws com.liferay.portal.kernel.exception.PortalException, 588 com.liferay.portal.kernel.exception.SystemException { 589 return _dlAppLocalService.getFileShortcut(fileShortcutId); 590 } 591 592 /** 593 * Returns the file version with the primary key. 594 * 595 * @param fileVersionId the primary key of the file version 596 * @return the file version with the primary key 597 * @throws PortalException if the file version could not be found 598 * @throws SystemException if a system exception occurred 599 */ 600 public com.liferay.portal.kernel.repository.model.FileVersion getFileVersion( 601 long fileVersionId) 602 throws com.liferay.portal.kernel.exception.PortalException, 603 com.liferay.portal.kernel.exception.SystemException { 604 return _dlAppLocalService.getFileVersion(fileVersionId); 605 } 606 607 /** 608 * Returns the folder with the primary key. 609 * 610 * @param folderId the primary key of the folder 611 * @return the folder with the primary key 612 * @throws PortalException if the folder could not be found 613 * @throws SystemException if a system exception occurred 614 */ 615 public com.liferay.portal.kernel.repository.model.Folder getFolder( 616 long folderId) 617 throws com.liferay.portal.kernel.exception.PortalException, 618 com.liferay.portal.kernel.exception.SystemException { 619 return _dlAppLocalService.getFolder(folderId); 620 } 621 622 /** 623 * Returns the folder with the name in the parent folder. 624 * 625 * @param repositoryId the primary key of the folder's repository 626 * @param parentFolderId the primary key of the folder's parent folder 627 * @param name the folder's name 628 * @return the folder with the name in the parent folder 629 * @throws PortalException if the folder could not be found 630 * @throws SystemException if a system exception occurred 631 */ 632 public com.liferay.portal.kernel.repository.model.Folder getFolder( 633 long repositoryId, long parentFolderId, java.lang.String name) 634 throws com.liferay.portal.kernel.exception.PortalException, 635 com.liferay.portal.kernel.exception.SystemException { 636 return _dlAppLocalService.getFolder(repositoryId, parentFolderId, name); 637 } 638 639 /** 640 * Returns all immediate subfolders of the parent folder. 641 * 642 * @param repositoryId the primary key of the folder's repository 643 * @param parentFolderId the primary key of the folder's parent folder 644 * @return the immediate subfolders of the parent folder 645 * @throws PortalException if the parent folder could not be found 646 * @throws SystemException if a system exception occurred 647 */ 648 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 649 long repositoryId, long parentFolderId) 650 throws com.liferay.portal.kernel.exception.PortalException, 651 com.liferay.portal.kernel.exception.SystemException { 652 return _dlAppLocalService.getFolders(repositoryId, parentFolderId); 653 } 654 655 /** 656 * Returns all immediate subfolders of the parent folder, optionally 657 * including mount folders for third-party repositories. 658 * 659 * @param repositoryId the primary key of the folder's repository 660 * @param parentFolderId the primary key of the folder's parent folder 661 * @param includeMountFolders whether to include mount folders for 662 third-party repositories 663 * @return the immediate subfolders of the parent folder 664 * @throws PortalException if the parent folder could not be found 665 * @throws SystemException if a system exception occurred 666 */ 667 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 668 long repositoryId, long parentFolderId, boolean includeMountFolders) 669 throws com.liferay.portal.kernel.exception.PortalException, 670 com.liferay.portal.kernel.exception.SystemException { 671 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 672 includeMountFolders); 673 } 674 675 /** 676 * Returns a range of all the immediate subfolders of the parent folder, 677 * optionally including mount folders for third-party repositories. 678 * 679 * <p> 680 * Useful when paginating results. Returns a maximum of <code>end - 681 * start</code> instances. <code>start</code> and <code>end</code> are not 682 * primary keys, they are indexes in the result set. Thus, <code>0</code> 683 * refers to the first result in the set. Setting both <code>start</code> 684 * and <code>end</code> to {@link 685 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 686 * result set. 687 * </p> 688 * 689 * @param repositoryId the primary key of the folder's repository 690 * @param parentFolderId the primary key of the folder's parent folder 691 * @param includeMountFolders whether to include mount folders for 692 third-party repositories 693 * @param start the lower bound of the range of results 694 * @param end the upper bound of the range of results (not inclusive) 695 * @return the range of immediate subfolders of the parent folder 696 * @throws PortalException if the parent folder could not be found 697 * @throws SystemException if a system exception occurred 698 */ 699 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 700 long repositoryId, long parentFolderId, boolean includeMountFolders, 701 int start, int end) 702 throws com.liferay.portal.kernel.exception.PortalException, 703 com.liferay.portal.kernel.exception.SystemException { 704 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 705 includeMountFolders, start, end); 706 } 707 708 /** 709 * Returns an ordered range of all the immediate subfolders of the parent 710 * folder. 711 * 712 * <p> 713 * Useful when paginating results. Returns a maximum of <code>end - 714 * start</code> instances. <code>start</code> and <code>end</code> are not 715 * primary keys, they are indexes in the result set. Thus, <code>0</code> 716 * refers to the first result in the set. Setting both <code>start</code> 717 * and <code>end</code> to {@link 718 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 719 * result set. 720 * </p> 721 * 722 * @param repositoryId the primary key of the folder's repository 723 * @param parentFolderId the primary key of the folder's parent folder 724 * @param includeMountFolders whether to include mount folders for 725 third-party repositories 726 * @param start the lower bound of the range of results 727 * @param end the upper bound of the range of results (not inclusive) 728 * @param obc the comparator to order the folders (optionally 729 <code>null</code>) 730 * @return the range of immediate subfolders of the parent folder ordered by 731 comparator <code>obc</code> 732 * @throws PortalException if the parent folder could not be found 733 * @throws SystemException if a system exception occurred 734 */ 735 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 736 long repositoryId, long parentFolderId, boolean includeMountFolders, 737 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 738 throws com.liferay.portal.kernel.exception.PortalException, 739 com.liferay.portal.kernel.exception.SystemException { 740 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 741 includeMountFolders, start, end, obc); 742 } 743 744 /** 745 * Returns a range of all the immediate subfolders of the parent folder. 746 * 747 * <p> 748 * Useful when paginating results. Returns a maximum of <code>end - 749 * start</code> instances. <code>start</code> and <code>end</code> are not 750 * primary keys, they are indexes in the result set. Thus, <code>0</code> 751 * refers to the first result in the set. Setting both <code>start</code> 752 * and <code>end</code> to {@link 753 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 754 * result set. 755 * </p> 756 * 757 * @param repositoryId the primary key of the folder's repository 758 * @param parentFolderId the primary key of the folder's parent folder 759 * @param start the lower bound of the range of results 760 * @param end the upper bound of the range of results (not inclusive) 761 * @return the range of immediate subfolders of the parent folder 762 * @throws PortalException if the parent folder could not be found 763 * @throws SystemException if a system exception occurred 764 */ 765 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 766 long repositoryId, long parentFolderId, int start, int end) 767 throws com.liferay.portal.kernel.exception.PortalException, 768 com.liferay.portal.kernel.exception.SystemException { 769 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 770 start, end); 771 } 772 773 /** 774 * Returns an ordered range of all the immediate subfolders of the parent 775 * folder. 776 * 777 * <p> 778 * Useful when paginating results. Returns a maximum of <code>end - 779 * start</code> instances. <code>start</code> and <code>end</code> are not 780 * primary keys, they are indexes in the result set. Thus, <code>0</code> 781 * refers to the first result in the set. Setting both <code>start</code> 782 * and <code>end</code> to {@link 783 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 784 * result set. 785 * </p> 786 * 787 * @param repositoryId the primary key of the folder's repository 788 * @param parentFolderId the primary key of the folder's parent folder 789 * @param start the lower bound of the range of results 790 * @param end the upper bound of the range of results (not inclusive) 791 * @param obc the comparator to order the folders (optionally 792 <code>null</code>) 793 * @return the range of immediate subfolders of the parent folder ordered by 794 comparator <code>obc</code> 795 * @throws PortalException if the parent folder could not be found 796 * @throws SystemException if a system exception occurred 797 */ 798 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 799 long repositoryId, long parentFolderId, int start, int end, 800 com.liferay.portal.kernel.util.OrderByComparator obc) 801 throws com.liferay.portal.kernel.exception.PortalException, 802 com.liferay.portal.kernel.exception.SystemException { 803 return _dlAppLocalService.getFolders(repositoryId, parentFolderId, 804 start, end, obc); 805 } 806 807 /** 808 * Returns an ordered range of all the immediate subfolders, file entries, 809 * and file shortcuts in the parent folder. 810 * 811 * <p> 812 * Useful when paginating results. Returns a maximum of <code>end - 813 * start</code> instances. <code>start</code> and <code>end</code> are not 814 * primary keys, they are indexes in the result set. Thus, <code>0</code> 815 * refers to the first result in the set. Setting both <code>start</code> 816 * and <code>end</code> to {@link 817 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 818 * result set. 819 * </p> 820 * 821 * @param repositoryId the primary key of the repository 822 * @param folderId the primary key of the parent folder 823 * @param status the workflow status 824 * @param includeMountFolders whether to include mount folders for 825 third-party repositories 826 * @param start the lower bound of the range of results 827 * @param end the upper bound of the range of results (not inclusive) 828 * @param obc the comparator to order the results (optionally 829 <code>null</code>) 830 * @return the range of immediate subfolders, file entries, and file 831 shortcuts in the parent folder ordered by comparator 832 <code>obc</code> 833 * @throws PortalException if the folder could not be found 834 * @throws SystemException if a system exception occurred 835 */ 836 public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 837 long repositoryId, long folderId, int status, 838 boolean includeMountFolders, int start, int end, 839 com.liferay.portal.kernel.util.OrderByComparator obc) 840 throws com.liferay.portal.kernel.exception.PortalException, 841 com.liferay.portal.kernel.exception.SystemException { 842 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 843 folderId, status, includeMountFolders, start, end, obc); 844 } 845 846 public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 847 long repositoryId, long folderId, int status, 848 java.lang.String[] mimeTypes, boolean includeMountFolders, int start, 849 int end, com.liferay.portal.kernel.util.OrderByComparator obc) 850 throws com.liferay.portal.kernel.exception.PortalException, 851 com.liferay.portal.kernel.exception.SystemException { 852 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 853 folderId, status, mimeTypes, includeMountFolders, start, end, obc); 854 } 855 856 /** 857 * Returns the number of immediate subfolders, file entries, and file 858 * shortcuts in the parent folder. 859 * 860 * @param repositoryId the primary key of the repository 861 * @param folderId the primary key of the parent folder 862 * @param status the workflow status 863 * @param includeMountFolders whether to include mount folders for 864 third-party repositories 865 * @return the number of immediate subfolders, file entries, and file 866 shortcuts in the parent folder 867 * @throws PortalException if the folder could not be found 868 * @throws SystemException if a system exception occurred 869 */ 870 public int getFoldersAndFileEntriesAndFileShortcutsCount( 871 long repositoryId, long folderId, int status, 872 boolean includeMountFolders) 873 throws com.liferay.portal.kernel.exception.PortalException, 874 com.liferay.portal.kernel.exception.SystemException { 875 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 876 folderId, status, includeMountFolders); 877 } 878 879 public int getFoldersAndFileEntriesAndFileShortcutsCount( 880 long repositoryId, long folderId, int status, 881 java.lang.String[] mimeTypes, boolean includeMountFolders) 882 throws com.liferay.portal.kernel.exception.PortalException, 883 com.liferay.portal.kernel.exception.SystemException { 884 return _dlAppLocalService.getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 885 folderId, status, mimeTypes, includeMountFolders); 886 } 887 888 /** 889 * Returns the number of immediate subfolders of the parent folder. 890 * 891 * @param repositoryId the primary key of the folder's repository 892 * @param parentFolderId the primary key of the folder's parent folder 893 * @return the number of immediate subfolders of the parent folder 894 * @throws PortalException if the parent folder could not be found 895 * @throws SystemException if a system exception occurred 896 */ 897 public int getFoldersCount(long repositoryId, long parentFolderId) 898 throws com.liferay.portal.kernel.exception.PortalException, 899 com.liferay.portal.kernel.exception.SystemException { 900 return _dlAppLocalService.getFoldersCount(repositoryId, parentFolderId); 901 } 902 903 /** 904 * Returns the number of immediate subfolders of the parent folder, 905 * optionally including mount folders for third-party repositories. 906 * 907 * @param repositoryId the primary key of the folder's repository 908 * @param parentFolderId the primary key of the folder's parent folder 909 * @param includeMountFolders whether to include mount folders for 910 third-party repositories 911 * @return the number of immediate subfolders of the parent folder 912 * @throws PortalException if the parent folder could not be found 913 * @throws SystemException if a system exception occurred 914 */ 915 public int getFoldersCount(long repositoryId, long parentFolderId, 916 boolean includeMountFolders) 917 throws com.liferay.portal.kernel.exception.PortalException, 918 com.liferay.portal.kernel.exception.SystemException { 919 return _dlAppLocalService.getFoldersCount(repositoryId, parentFolderId, 920 includeMountFolders); 921 } 922 923 /** 924 * Returns the number of immediate subfolders and file entries across the 925 * folders. 926 * 927 * @param repositoryId the primary key of the repository 928 * @param folderIds the primary keys of folders from which to count 929 immediate subfolders and file entries 930 * @param status the workflow status 931 * @return the number of immediate subfolders and file entries across the 932 folders 933 * @throws PortalException if the repository could not be found 934 * @throws SystemException if a system exception occurred 935 */ 936 public int getFoldersFileEntriesCount(long repositoryId, 937 java.util.List<java.lang.Long> folderIds, int status) 938 throws com.liferay.portal.kernel.exception.PortalException, 939 com.liferay.portal.kernel.exception.SystemException { 940 return _dlAppLocalService.getFoldersFileEntriesCount(repositoryId, 941 folderIds, status); 942 } 943 944 /** 945 * Returns the mount folder of the repository with the primary key. This 946 * method is only supported by the Liferay repository. 947 * 948 * @param repositoryId the primary key of the repository 949 * @return the folder used for mounting third-party repositories 950 * @throws PortalException if the repository or mount folder could not be 951 found 952 * @throws SystemException if a system exception occurred 953 */ 954 public com.liferay.portal.kernel.repository.model.Folder getMountFolder( 955 long repositoryId) 956 throws com.liferay.portal.kernel.exception.PortalException, 957 com.liferay.portal.kernel.exception.SystemException { 958 return _dlAppLocalService.getMountFolder(repositoryId); 959 } 960 961 /** 962 * Returns all immediate subfolders of the parent folder that are used for 963 * mounting third-party repositories. This method is only supported by the 964 * Liferay repository. 965 * 966 * @param repositoryId the primary key of the folder's repository 967 * @param parentFolderId the primary key of the folder's parent folder 968 * @return the immediate subfolders of the parent folder that are used for 969 mounting third-party repositories 970 * @throws PortalException if the repository or parent folder could not be 971 found 972 * @throws SystemException if a system exception occurred 973 */ 974 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 975 long repositoryId, long parentFolderId) 976 throws com.liferay.portal.kernel.exception.PortalException, 977 com.liferay.portal.kernel.exception.SystemException { 978 return _dlAppLocalService.getMountFolders(repositoryId, parentFolderId); 979 } 980 981 /** 982 * Returns a range of all the immediate subfolders of the parent folder that 983 * are used for mounting third-party repositories. This method is only 984 * supported by the Liferay repository. 985 * 986 * <p> 987 * Useful when paginating results. Returns a maximum of <code>end - 988 * start</code> instances. <code>start</code> and <code>end</code> are not 989 * primary keys, they are indexes in the result set. Thus, <code>0</code> 990 * refers to the first result in the set. Setting both <code>start</code> 991 * and <code>end</code> to {@link 992 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 993 * result set. 994 * </p> 995 * 996 * @param repositoryId the primary key of the repository 997 * @param parentFolderId the primary key of the parent folder 998 * @param start the lower bound of the range of results 999 * @param end the upper bound of the range of results (not inclusive) 1000 * @return the range of immediate subfolders of the parent folder that are 1001 used for mounting third-party repositories 1002 * @throws PortalException if the repository or parent folder could not be 1003 found 1004 * @throws SystemException if a system exception occurred 1005 */ 1006 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1007 long repositoryId, long parentFolderId, int start, int end) 1008 throws com.liferay.portal.kernel.exception.PortalException, 1009 com.liferay.portal.kernel.exception.SystemException { 1010 return _dlAppLocalService.getMountFolders(repositoryId, parentFolderId, 1011 start, end); 1012 } 1013 1014 /** 1015 * Returns an ordered range of all the immediate subfolders of the parent 1016 * folder that are used for mounting third-party repositories. This method 1017 * is only supported by the Liferay repository. 1018 * 1019 * <p> 1020 * Useful when paginating results. Returns a maximum of <code>end - 1021 * start</code> instances. <code>start</code> and <code>end</code> are not 1022 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1023 * refers to the first result in the set. Setting both <code>start</code> 1024 * and <code>end</code> to {@link 1025 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1026 * result set. 1027 * </p> 1028 * 1029 * @param repositoryId the primary key of the folder's repository 1030 * @param parentFolderId the primary key of the folder's parent folder 1031 * @param start the lower bound of the range of results 1032 * @param end the upper bound of the range of results (not inclusive) 1033 * @param obc the comparator to order the folders (optionally 1034 <code>null</code>) 1035 * @return the range of immediate subfolders of the parent folder that are 1036 used for mounting third-party repositories ordered by comparator 1037 <code>obc</code> 1038 * @throws PortalException if the repository or parent folder could not be 1039 found 1040 * @throws SystemException if a system exception occurred 1041 */ 1042 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1043 long repositoryId, long parentFolderId, int start, int end, 1044 com.liferay.portal.kernel.util.OrderByComparator obc) 1045 throws com.liferay.portal.kernel.exception.PortalException, 1046 com.liferay.portal.kernel.exception.SystemException { 1047 return _dlAppLocalService.getMountFolders(repositoryId, parentFolderId, 1048 start, end, obc); 1049 } 1050 1051 /** 1052 * Returns the number of immediate subfolders of the parent folder that are 1053 * used for mounting third-party repositories. This method is only supported 1054 * by the Liferay repository. 1055 * 1056 * @param repositoryId the primary key of the repository 1057 * @param parentFolderId the primary key of the parent folder 1058 * @return the number of folders of the parent folder that are used for 1059 mounting third-party repositories 1060 * @throws PortalException if the repository or parent folder could not be 1061 found 1062 * @throws SystemException if a system exception occurred 1063 */ 1064 public int getMountFoldersCount(long repositoryId, long parentFolderId) 1065 throws com.liferay.portal.kernel.exception.PortalException, 1066 com.liferay.portal.kernel.exception.SystemException { 1067 return _dlAppLocalService.getMountFoldersCount(repositoryId, 1068 parentFolderId); 1069 } 1070 1071 /** 1072 * Moves the file entry to the new folder. 1073 * 1074 * @param userId the primary key of the user 1075 * @param fileEntryId the primary key of the file entry 1076 * @param newFolderId the primary key of the new folder 1077 * @param serviceContext the service context to be applied 1078 * @return the file entry 1079 * @throws PortalException if the file entry or the new folder could not be 1080 found 1081 * @throws SystemException if a system exception occurred 1082 */ 1083 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry( 1084 long userId, long fileEntryId, long newFolderId, 1085 com.liferay.portal.service.ServiceContext serviceContext) 1086 throws com.liferay.portal.kernel.exception.PortalException, 1087 com.liferay.portal.kernel.exception.SystemException { 1088 return _dlAppLocalService.moveFileEntry(userId, fileEntryId, 1089 newFolderId, serviceContext); 1090 } 1091 1092 /** 1093 * Updates the file entry's asset replacing its asset categories, tags, and 1094 * links. 1095 * 1096 * @param userId the primary key of the user 1097 * @param fileEntry the file entry to update 1098 * @param fileVersion the file version to update 1099 * @param assetCategoryIds the primary keys of the new asset categories 1100 * @param assetTagNames the new asset tag names 1101 * @param assetLinkEntryIds the primary keys of the new asset link entries 1102 * @throws PortalException if the file entry or version could not be found 1103 * @throws SystemException if a system exception occurred 1104 */ 1105 public void updateAsset(long userId, 1106 com.liferay.portal.kernel.repository.model.FileEntry fileEntry, 1107 com.liferay.portal.kernel.repository.model.FileVersion fileVersion, 1108 long[] assetCategoryIds, java.lang.String[] assetTagNames, 1109 long[] assetLinkEntryIds) 1110 throws com.liferay.portal.kernel.exception.PortalException, 1111 com.liferay.portal.kernel.exception.SystemException { 1112 _dlAppLocalService.updateAsset(userId, fileEntry, fileVersion, 1113 assetCategoryIds, assetTagNames, assetLinkEntryIds); 1114 } 1115 1116 /** 1117 * Updates a file entry and associated metadata based on a byte array 1118 * object. If the file data is <code>null</code>, then only the associated 1119 * metadata (i.e., <code>title</code>, <code>description</code>, and 1120 * parameters in the <code>serviceContext</code>) will be updated. 1121 * 1122 * <p> 1123 * This method takes two file names, the <code>sourceFileName</code> and the 1124 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1125 * name of the actual file being uploaded. The <code>title</code> 1126 * corresponds to a name the client wishes to assign this file after it has 1127 * been uploaded to the portal. 1128 * </p> 1129 * 1130 * @param userId the primary key of the user 1131 * @param fileEntryId the primary key of the file entry 1132 * @param sourceFileName the original file's name (optionally 1133 <code>null</code>) 1134 * @param mimeType the file's MIME type (optionally <code>null</code>) 1135 * @param title the new name to be assigned to the file (optionally <code> 1136 <code>null</code></code>) 1137 * @param description the file's new description 1138 * @param changeLog the file's version change log (optionally 1139 <code>null</code>) 1140 * @param majorVersion whether the new file version is a major version 1141 * @param bytes the file's data (optionally <code>null</code>) 1142 * @param serviceContext the service context to be applied. Can set the 1143 asset category IDs, asset tag names, and expando bridge 1144 attributes for the file entry. In a Liferay repository, it may 1145 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1146 type </li> <li> fieldsMap - mapping for fields associated with a 1147 custom file entry type </li> </ul> 1148 * @return the file entry 1149 * @throws PortalException if the file entry could not be found 1150 * @throws SystemException if a system exception occurred 1151 */ 1152 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1153 long userId, long fileEntryId, java.lang.String sourceFileName, 1154 java.lang.String mimeType, java.lang.String title, 1155 java.lang.String description, java.lang.String changeLog, 1156 boolean majorVersion, byte[] bytes, 1157 com.liferay.portal.service.ServiceContext serviceContext) 1158 throws com.liferay.portal.kernel.exception.PortalException, 1159 com.liferay.portal.kernel.exception.SystemException { 1160 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 1161 sourceFileName, mimeType, title, description, changeLog, 1162 majorVersion, bytes, serviceContext); 1163 } 1164 1165 /** 1166 * Updates a file entry and associated metadata based on a {@link File} 1167 * object. If the file data is <code>null</code>, then only the associated 1168 * metadata (i.e., <code>title</code>, <code>description</code>, and 1169 * parameters in the <code>serviceContext</code>) will be updated. 1170 * 1171 * <p> 1172 * This method takes two file names, the <code>sourceFileName</code> and the 1173 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1174 * name of the actual file being uploaded. The <code>title</code> 1175 * corresponds to a name the client wishes to assign this file after it has 1176 * been uploaded to the portal. 1177 * </p> 1178 * 1179 * @param userId the primary key of the user 1180 * @param fileEntryId the primary key of the file entry 1181 * @param sourceFileName the original file's name (optionally 1182 <code>null</code>) 1183 * @param mimeType the file's MIME type (optionally <code>null</code>) 1184 * @param title the new name to be assigned to the file (optionally <code> 1185 <code>null</code></code>) 1186 * @param description the file's new description 1187 * @param changeLog the file's version change log (optionally 1188 <code>null</code>) 1189 * @param majorVersion whether the new file version is a major version 1190 * @param file EntryId the primary key of the file entry 1191 * @param serviceContext the service context to be applied. Can set the 1192 asset category IDs, asset tag names, and expando bridge 1193 attributes for the file entry. In a Liferay repository, it may 1194 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1195 type </li> <li> fieldsMap - mapping for fields associated with a 1196 custom file entry type </li> </ul> 1197 * @return the file entry 1198 * @throws PortalException if the file entry could not be found 1199 * @throws SystemException if a system exception occurred 1200 */ 1201 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1202 long userId, long fileEntryId, java.lang.String sourceFileName, 1203 java.lang.String mimeType, java.lang.String title, 1204 java.lang.String description, java.lang.String changeLog, 1205 boolean majorVersion, java.io.File file, 1206 com.liferay.portal.service.ServiceContext serviceContext) 1207 throws com.liferay.portal.kernel.exception.PortalException, 1208 com.liferay.portal.kernel.exception.SystemException { 1209 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 1210 sourceFileName, mimeType, title, description, changeLog, 1211 majorVersion, file, serviceContext); 1212 } 1213 1214 /** 1215 * Updates a file entry and associated metadata based on an {@link 1216 * InputStream} object. If the file data is <code>null</code>, then only the 1217 * associated metadata (i.e., <code>title</code>, <code>description</code>, 1218 * and parameters in the <code>serviceContext</code>) will be updated. 1219 * 1220 * <p> 1221 * This method takes two file names, the <code>sourceFileName</code> and the 1222 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1223 * name of the actual file being uploaded. The <code>title</code> 1224 * corresponds to a name the client wishes to assign this file after it has 1225 * been uploaded to the portal. 1226 * </p> 1227 * 1228 * @param userId the primary key of the user 1229 * @param fileEntryId the primary key of the file entry 1230 * @param sourceFileName the original file's name (optionally 1231 <code>null</code>) 1232 * @param mimeType the file's MIME type (optionally <code>null</code>) 1233 * @param title the new name to be assigned to the file (optionally <code> 1234 <code>null</code></code>) 1235 * @param description the file's new description 1236 * @param changeLog the file's version change log (optionally 1237 <code>null</code>) 1238 * @param majorVersion whether the new file version is a major version 1239 * @param is the file's data (optionally <code>null</code>) 1240 * @param size the file's size (optionally <code>0</code>) 1241 * @param serviceContext the service context to be applied. Can set the 1242 asset category IDs, asset tag names, and expando bridge 1243 attributes for the file entry. In a Liferay repository, it may 1244 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1245 type </li> <li> fieldsMap - mapping for fields associated with a 1246 custom file entry type </li> </ul> 1247 * @return the file entry 1248 * @throws PortalException if the file entry could not be found 1249 * @throws SystemException if a system exception occurred 1250 */ 1251 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1252 long userId, long fileEntryId, java.lang.String sourceFileName, 1253 java.lang.String mimeType, java.lang.String title, 1254 java.lang.String description, java.lang.String changeLog, 1255 boolean majorVersion, java.io.InputStream is, long size, 1256 com.liferay.portal.service.ServiceContext serviceContext) 1257 throws com.liferay.portal.kernel.exception.PortalException, 1258 com.liferay.portal.kernel.exception.SystemException { 1259 return _dlAppLocalService.updateFileEntry(userId, fileEntryId, 1260 sourceFileName, mimeType, title, description, changeLog, 1261 majorVersion, is, size, serviceContext); 1262 } 1263 1264 /** 1265 * Updates a file rank to the existing file entry. This method is only 1266 * supported by the Liferay repository. 1267 * 1268 * @param repositoryId the primary key of the file rank's repository 1269 * @param companyId the primary key of the file rank's company 1270 * @param userId the primary key of the file rank's creator/owner 1271 * @param fileEntryId the primary key of the file rank's file entry 1272 * @param serviceContext the service context to be applied 1273 * @return the file rank 1274 * @throws SystemException if a system exception occurred 1275 */ 1276 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 1277 long repositoryId, long companyId, long userId, long fileEntryId, 1278 com.liferay.portal.service.ServiceContext serviceContext) 1279 throws com.liferay.portal.kernel.exception.SystemException { 1280 return _dlAppLocalService.updateFileRank(repositoryId, companyId, 1281 userId, fileEntryId, serviceContext); 1282 } 1283 1284 /** 1285 * Updates a file shortcut to the existing file entry. This method is only 1286 * supported by the Liferay repository. 1287 * 1288 * @param userId the primary key of the file shortcut's creator/owner 1289 * @param fileShortcutId the primary key of the file shortcut 1290 * @param folderId the primary key of the file shortcut's parent folder 1291 * @param toFileEntryId the primary key of the file shortcut's file entry 1292 * @param serviceContext the service context to be applied. Can set the 1293 asset category IDs, asset tag names, and expando bridge 1294 attributes for the file entry. 1295 * @return the file shortcut 1296 * @throws PortalException if the file shortcut, folder, or file entry could 1297 not be found 1298 * @throws SystemException if a system exception occurred 1299 */ 1300 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut( 1301 long userId, long fileShortcutId, long folderId, long toFileEntryId, 1302 com.liferay.portal.service.ServiceContext serviceContext) 1303 throws com.liferay.portal.kernel.exception.PortalException, 1304 com.liferay.portal.kernel.exception.SystemException { 1305 return _dlAppLocalService.updateFileShortcut(userId, fileShortcutId, 1306 folderId, toFileEntryId, serviceContext); 1307 } 1308 1309 /** 1310 * Updates all file shortcuts to the existing file entry to the new file 1311 * entry. This method is only supported by the Liferay repository. 1312 * 1313 * @param toRepositoryId the primary key of the repository 1314 * @param oldToFileEntryId the primary key of the old file entry pointed to 1315 * @param newToFileEntryId the primary key of the new file entry to point 1316 to 1317 * @throws SystemException if a system exception occurred 1318 */ 1319 public void updateFileShortcuts(long toRepositoryId, long oldToFileEntryId, 1320 long newToFileEntryId) 1321 throws com.liferay.portal.kernel.exception.SystemException { 1322 _dlAppLocalService.updateFileShortcuts(toRepositoryId, 1323 oldToFileEntryId, newToFileEntryId); 1324 } 1325 1326 /** 1327 * Updates the folder. 1328 * 1329 * @param folderId the primary key of the folder 1330 * @param parentFolderId the primary key of the folder's new parent folder 1331 * @param name the folder's new name 1332 * @param description the folder's new description 1333 * @param serviceContext the service context to be applied. In a Liferay 1334 repository, it may include: <ul> <li> defaultFileEntryTypeId - 1335 the file entry type to default all Liferay file entries to </li> 1336 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 1337 comma-delimited list of file entry type primary keys allowed in 1338 the given folder and all descendants </li> <li> 1339 overrideFileEntryTypes - boolean specifying whether to override 1340 ancestral folder's restriction of file entry types allowed </li> 1341 <li> workflowDefinitionXYZ - the workflow definition name 1342 specified per file entry type. The parameter name must be the 1343 string <code>workflowDefinition</code> appended by the <code> 1344 fileEntryTypeId</code> (optionally <code>0</code>). </li> </ul> 1345 * @return the folder 1346 * @throws PortalException if the current or new parent folder could not be 1347 found, or if the new parent folder's information was invalid 1348 * @throws SystemException if a system exception occurred 1349 */ 1350 public com.liferay.portal.kernel.repository.model.Folder updateFolder( 1351 long folderId, long parentFolderId, java.lang.String name, 1352 java.lang.String description, 1353 com.liferay.portal.service.ServiceContext serviceContext) 1354 throws com.liferay.portal.kernel.exception.PortalException, 1355 com.liferay.portal.kernel.exception.SystemException { 1356 return _dlAppLocalService.updateFolder(folderId, parentFolderId, name, 1357 description, serviceContext); 1358 } 1359 1360 /** 1361 * @deprecated Renamed to {@link #getWrappedService} 1362 */ 1363 public DLAppLocalService getWrappedDLAppLocalService() { 1364 return _dlAppLocalService; 1365 } 1366 1367 /** 1368 * @deprecated Renamed to {@link #setWrappedService} 1369 */ 1370 public void setWrappedDLAppLocalService(DLAppLocalService dlAppLocalService) { 1371 _dlAppLocalService = dlAppLocalService; 1372 } 1373 1374 public DLAppLocalService getWrappedService() { 1375 return _dlAppLocalService; 1376 } 1377 1378 public void setWrappedService(DLAppLocalService dlAppLocalService) { 1379 _dlAppLocalService = dlAppLocalService; 1380 } 1381 1382 private DLAppLocalService _dlAppLocalService; 1383 }