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.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.util.ReferenceRegistry; 019 020 /** 021 * Provides the remote service utility for DLApp. This utility wraps 022 * {@link com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl} and is the 023 * primary access point for service operations in application layer code running 024 * on a remote server. Methods of this service are expected to have security 025 * checks based on the propagated JAAS credentials because this service can be 026 * accessed remotely. 027 * 028 * @author Brian Wing Shun Chan 029 * @see DLAppService 030 * @see com.liferay.portlet.documentlibrary.service.base.DLAppServiceBaseImpl 031 * @see com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl 032 * @generated 033 */ 034 public class DLAppServiceUtil { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl} and rerun ServiceBuilder to regenerate this class. 039 */ 040 041 /** 042 * Returns the Spring bean ID for this bean. 043 * 044 * @return the Spring bean ID for this bean 045 */ 046 public static java.lang.String getBeanIdentifier() { 047 return getService().getBeanIdentifier(); 048 } 049 050 /** 051 * Sets the Spring bean ID for this bean. 052 * 053 * @param beanIdentifier the Spring bean ID for this bean 054 */ 055 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 056 getService().setBeanIdentifier(beanIdentifier); 057 } 058 059 /** 060 * Adds a file entry and associated metadata. It is created based on a byte 061 * array. 062 * 063 * <p> 064 * This method takes two file names, the <code>sourceFileName</code> and the 065 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 066 * name of the actual file being uploaded. The <code>title</code> 067 * corresponds to a name the client wishes to assign this file after it has 068 * been uploaded to the portal. If it is <code>null</code>, the <code> 069 * sourceFileName</code> will be used. 070 * </p> 071 * 072 * @param repositoryId the primary key of the 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 static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 093 long repositoryId, long folderId, java.lang.String sourceFileName, 094 java.lang.String mimeType, java.lang.String title, 095 java.lang.String description, java.lang.String changeLog, byte[] bytes, 096 com.liferay.portal.service.ServiceContext serviceContext) 097 throws com.liferay.portal.kernel.exception.PortalException, 098 com.liferay.portal.kernel.exception.SystemException { 099 return getService() 100 .addFileEntry(repositoryId, folderId, sourceFileName, 101 mimeType, title, description, changeLog, bytes, serviceContext); 102 } 103 104 /** 105 * Adds a file entry and associated metadata. It is created based on a 106 * {@link java.io.File} object. 107 * 108 * <p> 109 * This method takes two file names, the <code>sourceFileName</code> and the 110 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 111 * name of the actual file being uploaded. The <code>title</code> 112 * corresponds to a name the client wishes to assign this file after it has 113 * been uploaded to the portal. If it is <code>null</code>, the <code> 114 * sourceFileName</code> will be used. 115 * </p> 116 * 117 * @param repositoryId the primary key of the repository 118 * @param folderId the primary key of the file entry's parent folder 119 * @param sourceFileName the original file's name 120 * @param mimeType the file's MIME type 121 * @param title the name to be assigned to the file (optionally <code>null 122 </code>) 123 * @param description the file's description 124 * @param changeLog the file's version change log 125 * @param file the file's data (optionally <code>null</code>) 126 * @param serviceContext the service context to be applied. Can set the 127 asset category IDs, asset tag names, and expando bridge 128 attributes for the file entry. In a Liferay repository, it may 129 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 130 type </li> <li> fieldsMap - mapping for fields associated with a 131 custom file entry type </li> </ul> 132 * @return the file entry 133 * @throws PortalException if the parent folder could not be found or if the 134 file entry's information was invalid 135 * @throws SystemException if a system exception occurred 136 */ 137 public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 138 long repositoryId, long folderId, java.lang.String sourceFileName, 139 java.lang.String mimeType, java.lang.String title, 140 java.lang.String description, java.lang.String changeLog, 141 java.io.File file, 142 com.liferay.portal.service.ServiceContext serviceContext) 143 throws com.liferay.portal.kernel.exception.PortalException, 144 com.liferay.portal.kernel.exception.SystemException { 145 return getService() 146 .addFileEntry(repositoryId, folderId, sourceFileName, 147 mimeType, title, description, changeLog, file, serviceContext); 148 } 149 150 /** 151 * Adds a file entry and associated metadata. It is created based on a 152 * {@link java.io.InputStream} object. 153 * 154 * <p> 155 * This method takes two file names, the <code>sourceFileName</code> and the 156 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 157 * name of the actual file being uploaded. The <code>title</code> 158 * corresponds to a name the client wishes to assign this file after it has 159 * been uploaded to the portal. If it is <code>null</code>, the <code> 160 * sourceFileName</code> will be used. 161 * </p> 162 * 163 * @param repositoryId the primary key of the repository 164 * @param folderId the primary key of the file entry's parent folder 165 * @param sourceFileName the original file's name 166 * @param mimeType the file's MIME type 167 * @param title the name to be assigned to the file (optionally <code>null 168 </code>) 169 * @param description the file's description 170 * @param changeLog the file's version change log 171 * @param is the file's data (optionally <code>null</code>) 172 * @param size the file's size (optionally <code>0</code>) 173 * @param serviceContext the service context to be applied. Can set the 174 asset category IDs, asset tag names, and expando bridge 175 attributes for the file entry. In a Liferay repository, it may 176 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 177 type </li> <li> fieldsMap - mapping for fields associated with a 178 custom file entry type </li> </ul> 179 * @return the file entry 180 * @throws PortalException if the parent folder could not be found or if the 181 file entry's information was invalid 182 * @throws SystemException if a system exception occurred 183 */ 184 public static com.liferay.portal.kernel.repository.model.FileEntry addFileEntry( 185 long repositoryId, long folderId, java.lang.String sourceFileName, 186 java.lang.String mimeType, java.lang.String title, 187 java.lang.String description, java.lang.String changeLog, 188 java.io.InputStream is, long size, 189 com.liferay.portal.service.ServiceContext serviceContext) 190 throws com.liferay.portal.kernel.exception.PortalException, 191 com.liferay.portal.kernel.exception.SystemException { 192 return getService() 193 .addFileEntry(repositoryId, folderId, sourceFileName, 194 mimeType, title, description, changeLog, is, size, serviceContext); 195 } 196 197 /** 198 * Adds a file shortcut to the existing file entry. This method is only 199 * supported by the Liferay repository. 200 * 201 * @param repositoryId the primary key of the repository 202 * @param folderId the primary key of the file shortcut's parent folder 203 * @param toFileEntryId the primary key of the file shortcut's file entry 204 * @param serviceContext the service context to be applied. Can set the 205 asset category IDs, asset tag names, and expando bridge 206 attributes for the file entry. 207 * @return the file shortcut 208 * @throws PortalException if the parent folder or file entry could not be 209 found, or if the file shortcut's information was invalid 210 * @throws SystemException if a system exception occurred 211 */ 212 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut( 213 long repositoryId, long folderId, long toFileEntryId, 214 com.liferay.portal.service.ServiceContext serviceContext) 215 throws com.liferay.portal.kernel.exception.PortalException, 216 com.liferay.portal.kernel.exception.SystemException { 217 return getService() 218 .addFileShortcut(repositoryId, folderId, toFileEntryId, 219 serviceContext); 220 } 221 222 /** 223 * Adds a folder. 224 * 225 * @param repositoryId the primary key of the repository 226 * @param parentFolderId the primary key of the folder's parent folder 227 * @param name the folder's name 228 * @param description the folder's description 229 * @param serviceContext the service context to be applied. In a Liferay 230 repository, it may include boolean mountPoint specifying whether 231 folder is a facade for mounting a third-party repository 232 * @return the folder 233 * @throws PortalException if the parent folder could not be found or if the 234 new folder's information was invalid 235 * @throws SystemException if a system exception occurred 236 */ 237 public static com.liferay.portal.kernel.repository.model.Folder addFolder( 238 long repositoryId, long parentFolderId, java.lang.String name, 239 java.lang.String description, 240 com.liferay.portal.service.ServiceContext serviceContext) 241 throws com.liferay.portal.kernel.exception.PortalException, 242 com.liferay.portal.kernel.exception.SystemException { 243 return getService() 244 .addFolder(repositoryId, parentFolderId, name, description, 245 serviceContext); 246 } 247 248 /** 249 * Adds a temporary file entry. 250 * 251 * <p> 252 * This allows a client to upload a file into a temporary location and 253 * manipulate its metadata prior to making it available for public usage. 254 * This is different from checking in and checking out a file entry. 255 * </p> 256 * 257 * @param groupId the primary key of the group 258 * @param folderId the primary key of the folder where the file entry will 259 eventually reside 260 * @param fileName the file's original name 261 * @param tempFolderName the temporary folder's name 262 * @param file Name the file's original name 263 * @param mimeType the file's MIME type 264 * @return the file's name 265 * @throws PortalException if the file name was invalid 266 * @throws SystemException if a system exception occurred 267 * @see com.liferay.portal.kernel.util.TempFileUtil 268 */ 269 public static com.liferay.portal.kernel.repository.model.FileEntry addTempFileEntry( 270 long groupId, long folderId, java.lang.String fileName, 271 java.lang.String tempFolderName, java.io.File file, 272 java.lang.String mimeType) 273 throws com.liferay.portal.kernel.exception.PortalException, 274 com.liferay.portal.kernel.exception.SystemException { 275 return getService() 276 .addTempFileEntry(groupId, folderId, fileName, 277 tempFolderName, file, mimeType); 278 } 279 280 public static com.liferay.portal.kernel.repository.model.FileEntry addTempFileEntry( 281 long groupId, long folderId, java.lang.String fileName, 282 java.lang.String tempFolderName, java.io.InputStream inputStream, 283 java.lang.String mimeType) 284 throws com.liferay.portal.kernel.exception.PortalException, 285 com.liferay.portal.kernel.exception.SystemException { 286 return getService() 287 .addTempFileEntry(groupId, folderId, fileName, 288 tempFolderName, inputStream, mimeType); 289 } 290 291 /** 292 * Cancels the check out of the file entry. If a user has not checked out 293 * the specified file entry, invoking this method will result in no changes. 294 * 295 * <p> 296 * When a file entry is checked out, a PWC (private working copy) is created 297 * and the original file entry is locked. A client can make as many changes 298 * to the PWC as he desires without those changes being visible to other 299 * users. If the user is satisfied with the changes, he may elect to check 300 * in his changes, resulting in a new file version based on the PWC; the PWC 301 * will be removed and the file entry will be unlocked. If the user is not 302 * satisfied with the changes, he may elect to cancel his check out; this 303 * results in the deletion of the PWC and unlocking of the file entry. 304 * </p> 305 * 306 * @param fileEntryId the primary key of the file entry to cancel the 307 checkout 308 * @throws PortalException if the file entry could not be found 309 * @throws SystemException if a system exception occurred 310 * @see #checkInFileEntry(long, boolean, String, ServiceContext) 311 * @see #checkOutFileEntry(long, ServiceContext) 312 */ 313 public static void cancelCheckOut(long fileEntryId) 314 throws com.liferay.portal.kernel.exception.PortalException, 315 com.liferay.portal.kernel.exception.SystemException { 316 getService().cancelCheckOut(fileEntryId); 317 } 318 319 /** 320 * Checks in the file entry. If a user has not checked out the specified 321 * file entry, invoking this method will result in no changes. 322 * 323 * <p> 324 * When a file entry is checked out, a PWC (private working copy) is created 325 * and the original file entry is locked. A client can make as many changes 326 * to the PWC as he desires without those changes being visible to other 327 * users. If the user is satisfied with the changes, he may elect to check 328 * in his changes, resulting in a new file version based on the PWC; the PWC 329 * will be removed and the file entry will be unlocked. If the user is not 330 * satisfied with the changes, he may elect to cancel his check out; this 331 * results in the deletion of the PWC and unlocking of the file entry. 332 * </p> 333 * 334 * @param fileEntryId the primary key of the file entry to check in 335 * @param majorVersion whether the new file version is a major version 336 * @param changeLog the file's version change log 337 * @param serviceContext the service context to be applied 338 * @throws PortalException if the file entry could not be found 339 * @throws SystemException if a system exception occurred 340 * @see #cancelCheckOut(long) 341 * @see #checkOutFileEntry(long, ServiceContext) 342 */ 343 public static void checkInFileEntry(long fileEntryId, boolean majorVersion, 344 java.lang.String changeLog, 345 com.liferay.portal.service.ServiceContext serviceContext) 346 throws com.liferay.portal.kernel.exception.PortalException, 347 com.liferay.portal.kernel.exception.SystemException { 348 getService() 349 .checkInFileEntry(fileEntryId, majorVersion, changeLog, 350 serviceContext); 351 } 352 353 /** 354 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 355 String, ServiceContext)} 356 */ 357 public static void checkInFileEntry(long fileEntryId, 358 java.lang.String lockUuid) 359 throws com.liferay.portal.kernel.exception.PortalException, 360 com.liferay.portal.kernel.exception.SystemException { 361 getService().checkInFileEntry(fileEntryId, lockUuid); 362 } 363 364 /** 365 * Checks in the file entry using the lock's UUID. If a user has not checked 366 * out the specified file entry, invoking this method will result in no 367 * changes. This method is primarily used by WebDAV. 368 * 369 * <p> 370 * When a file entry is checked out, a PWC (private working copy) is created 371 * and the original file entry is locked. A client can make as many changes 372 * to the PWC as he desires without those changes being visible to other 373 * users. If the user is satisfied with the changes, he may elect to check 374 * in his changes, resulting in a new file version based on the PWC; the PWC 375 * will be removed and the file entry will be unlocked. If the user is not 376 * satisfied with the changes, he may elect to cancel his check out; this 377 * results in the deletion of the PWC and unlocking of the file entry. 378 * </p> 379 * 380 * @param fileEntryId the primary key of the file entry to check in 381 * @param lockUuid the lock's UUID 382 * @param serviceContext the service context to be applied 383 * @throws PortalException if the file entry could not be found 384 * @throws SystemException if a system exception occurred 385 * @see #cancelCheckOut(long) 386 * @see #checkOutFileEntry(long, String, long, ServiceContext) 387 */ 388 public static void checkInFileEntry(long fileEntryId, 389 java.lang.String lockUuid, 390 com.liferay.portal.service.ServiceContext serviceContext) 391 throws com.liferay.portal.kernel.exception.PortalException, 392 com.liferay.portal.kernel.exception.SystemException { 393 getService().checkInFileEntry(fileEntryId, lockUuid, serviceContext); 394 } 395 396 /** 397 * Check out a file entry. 398 * 399 * <p> 400 * When a file entry is checked out, a PWC (private working copy) is created 401 * and the original file entry is locked. A client can make as many changes 402 * to the PWC as he desires without those changes being visible to other 403 * users. If the user is satisfied with the changes, he may elect to check 404 * in his changes, resulting in a new file version based on the PWC; the PWC 405 * will be removed and the file entry will be unlocked. If the user is not 406 * satisfied with the changes, he may elect to cancel his check out; this 407 * results in the deletion of the PWC and unlocking of the file entry. 408 * </p> 409 * 410 * @param fileEntryId the file entry to check out 411 * @param serviceContext the service context to be applied 412 * @throws PortalException if the file entry could not be found 413 * @throws SystemException if a system exception occurred 414 * @see #cancelCheckOut(long) 415 * @see #checkInFileEntry(long, boolean, String, ServiceContext) 416 */ 417 public static void checkOutFileEntry(long fileEntryId, 418 com.liferay.portal.service.ServiceContext serviceContext) 419 throws com.liferay.portal.kernel.exception.PortalException, 420 com.liferay.portal.kernel.exception.SystemException { 421 getService().checkOutFileEntry(fileEntryId, serviceContext); 422 } 423 424 /** 425 * Checks out the file entry. This method is primarily used by WebDAV. 426 * 427 * <p> 428 * When a file entry is checked out, a PWC (private working copy) is created 429 * and the original file entry is locked. A client can make as many changes 430 * to the PWC as he desires without those changes being visible to other 431 * users. If the user is satisfied with the changes, he may elect to check 432 * in his changes, resulting in a new file version based on the PWC; the PWC 433 * will be removed and the file entry will be unlocked. If the user is not 434 * satisfied with the changes, he may elect to cancel his check out; this 435 * results in the deletion of the PWC and unlocking of the file entry. 436 * </p> 437 * 438 * @param fileEntryId the file entry to check out 439 * @param owner the owner string for the checkout (optionally 440 <code>null</code>) 441 * @param expirationTime the time in milliseconds before the lock expires. 442 If the value is <code>0</code>, the default expiration time will 443 be used from <code>portal.properties>. 444 * @param serviceContext the service context to be applied 445 * @return the file entry 446 * @throws PortalException if the file entry could not be found 447 * @throws SystemException if a system exception occurred 448 * @see #cancelCheckOut(long) 449 * @see #checkInFileEntry(long, String) 450 */ 451 public static com.liferay.portal.kernel.repository.model.FileEntry checkOutFileEntry( 452 long fileEntryId, java.lang.String owner, long expirationTime, 453 com.liferay.portal.service.ServiceContext serviceContext) 454 throws com.liferay.portal.kernel.exception.PortalException, 455 com.liferay.portal.kernel.exception.SystemException { 456 return getService() 457 .checkOutFileEntry(fileEntryId, owner, expirationTime, 458 serviceContext); 459 } 460 461 /** 462 * Performs a deep copy of the folder. 463 * 464 * @param repositoryId the primary key of the repository 465 * @param sourceFolderId the primary key of the folder to copy 466 * @param parentFolderId the primary key of the new folder's parent folder 467 * @param name the new folder's name 468 * @param description the new folder's description 469 * @param serviceContext the service context to be applied 470 * @return the folder 471 * @throws PortalException if the source folder or the new parent folder 472 could not be found or if the new folder's information was invalid 473 * @throws SystemException if a system exception occurred 474 */ 475 public static com.liferay.portal.kernel.repository.model.Folder copyFolder( 476 long repositoryId, long sourceFolderId, long parentFolderId, 477 java.lang.String name, java.lang.String description, 478 com.liferay.portal.service.ServiceContext serviceContext) 479 throws com.liferay.portal.kernel.exception.PortalException, 480 com.liferay.portal.kernel.exception.SystemException { 481 return getService() 482 .copyFolder(repositoryId, sourceFolderId, parentFolderId, 483 name, description, serviceContext); 484 } 485 486 /** 487 * Deletes the file entry with the primary key. 488 * 489 * @param fileEntryId the primary key of the file entry 490 * @throws PortalException if the file entry could not be found 491 * @throws SystemException if a system exception occurred 492 */ 493 public static void deleteFileEntry(long fileEntryId) 494 throws com.liferay.portal.kernel.exception.PortalException, 495 com.liferay.portal.kernel.exception.SystemException { 496 getService().deleteFileEntry(fileEntryId); 497 } 498 499 /** 500 * Deletes the file entry with the title in the folder. 501 * 502 * @param repositoryId the primary key of the repository 503 * @param folderId the primary key of the file entry's parent folder 504 * @param title the file entry's title 505 * @throws PortalException if the file entry could not be found 506 * @throws SystemException if a system exception occurred 507 */ 508 public static void deleteFileEntryByTitle(long repositoryId, long folderId, 509 java.lang.String title) 510 throws com.liferay.portal.kernel.exception.PortalException, 511 com.liferay.portal.kernel.exception.SystemException { 512 getService().deleteFileEntryByTitle(repositoryId, folderId, title); 513 } 514 515 /** 516 * Deletes the file shortcut with the primary key. This method is only 517 * supported by the Liferay repository. 518 * 519 * @param fileShortcutId the primary key of the file shortcut 520 * @throws PortalException if the file shortcut could not be found 521 * @throws SystemException if a system exception occurred 522 */ 523 public static void deleteFileShortcut(long fileShortcutId) 524 throws com.liferay.portal.kernel.exception.PortalException, 525 com.liferay.portal.kernel.exception.SystemException { 526 getService().deleteFileShortcut(fileShortcutId); 527 } 528 529 /** 530 * Deletes the file version. File versions can only be deleted if it is 531 * approved and there are other approved file versions available. This 532 * method is only supported by the Liferay repository. 533 * 534 * @param fileEntryId the primary key of the file entry 535 * @param version the version label of the file version 536 * @throws PortalException if the file version could not be found or invalid 537 * @throws SystemException if a system exception occurred 538 */ 539 public static void deleteFileVersion(long fileEntryId, 540 java.lang.String version) 541 throws com.liferay.portal.kernel.exception.PortalException, 542 com.liferay.portal.kernel.exception.SystemException { 543 getService().deleteFileVersion(fileEntryId, version); 544 } 545 546 /** 547 * Deletes the folder with the primary key and all of its subfolders and 548 * file entries. 549 * 550 * @param folderId the primary key of the folder 551 * @throws PortalException if the folder could not be found 552 * @throws SystemException if a system exception occurred 553 */ 554 public static void deleteFolder(long folderId) 555 throws com.liferay.portal.kernel.exception.PortalException, 556 com.liferay.portal.kernel.exception.SystemException { 557 getService().deleteFolder(folderId); 558 } 559 560 /** 561 * Deletes the folder with the name in the parent folder and all of its 562 * subfolders and file entries. 563 * 564 * @param repositoryId the primary key of the repository 565 * @param parentFolderId the primary key of the folder's parent folder 566 * @param name the folder's name 567 * @throws PortalException if the folder could not be found 568 * @throws SystemException if a system exception occurred 569 */ 570 public static void deleteFolder(long repositoryId, long parentFolderId, 571 java.lang.String name) 572 throws com.liferay.portal.kernel.exception.PortalException, 573 com.liferay.portal.kernel.exception.SystemException { 574 getService().deleteFolder(repositoryId, parentFolderId, name); 575 } 576 577 /** 578 * Deletes the temporary file entry. 579 * 580 * @param groupId the primary key of the group 581 * @param folderId the primary key of the folder where the file entry was 582 eventually to reside 583 * @param fileName the file's original name 584 * @param tempFolderName the temporary folder's name 585 * @throws PortalException if the file name was invalid 586 * @throws SystemException if a system exception occurred 587 * @see com.liferay.portal.kernel.util.TempFileUtil 588 */ 589 public static void deleteTempFileEntry(long groupId, long folderId, 590 java.lang.String fileName, java.lang.String tempFolderName) 591 throws com.liferay.portal.kernel.exception.PortalException, 592 com.liferay.portal.kernel.exception.SystemException { 593 getService() 594 .deleteTempFileEntry(groupId, folderId, fileName, tempFolderName); 595 } 596 597 /** 598 * Returns all the file entries in the folder. 599 * 600 * @param repositoryId the primary key of the file entry's repository 601 * @param folderId the primary key of the file entry's folder 602 * @return the file entries in the folder 603 * @throws PortalException if the folder could not be found 604 * @throws SystemException if a system exception occurred 605 */ 606 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 607 long repositoryId, long folderId) 608 throws com.liferay.portal.kernel.exception.PortalException, 609 com.liferay.portal.kernel.exception.SystemException { 610 return getService().getFileEntries(repositoryId, folderId); 611 } 612 613 /** 614 * Returns a range of all the file entries in the folder. 615 * 616 * <p> 617 * Useful when paginating results. Returns a maximum of <code>end - 618 * start</code> instances. <code>start</code> and <code>end</code> are not 619 * primary keys, they are indexes in the result set. Thus, <code>0</code> 620 * refers to the first result in the set. Setting both <code>start</code> 621 * and <code>end</code> to {@link 622 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 623 * result set. 624 * </p> 625 * 626 * @param repositoryId the primary key of the file entry's repository 627 * @param folderId the primary key of the file entry's folder 628 * @param start the lower bound of the range of results 629 * @param end the upper bound of the range of results (not inclusive) 630 * @return the range of file entries in the folder 631 * @throws PortalException if the folder could not be found 632 * @throws SystemException if a system exception occurred 633 */ 634 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 635 long repositoryId, long folderId, int start, int end) 636 throws com.liferay.portal.kernel.exception.PortalException, 637 com.liferay.portal.kernel.exception.SystemException { 638 return getService().getFileEntries(repositoryId, folderId, start, end); 639 } 640 641 /** 642 * Returns an ordered range of all the file entries in the folder. 643 * 644 * <p> 645 * Useful when paginating results. Returns a maximum of <code>end - 646 * start</code> instances. <code>start</code> and <code>end</code> are not 647 * primary keys, they are indexes in the result set. Thus, <code>0</code> 648 * refers to the first result in the set. Setting both <code>start</code> 649 * and <code>end</code> to {@link 650 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 651 * result set. 652 * </p> 653 * 654 * @param repositoryId the primary key of the file entry's repository 655 * @param folderId the primary key of the file entry's folder 656 * @param start the lower bound of the range of results 657 * @param end the upper bound of the range of results (not inclusive) 658 * @param obc the comparator to order the file entries (optionally 659 <code>null</code>) 660 * @return the range of file entries in the folder ordered by comparator 661 <code>obc</code> 662 * @throws PortalException if the folder could not be found 663 * @throws SystemException if a system exception occurred 664 */ 665 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 666 long repositoryId, long folderId, int start, int end, 667 com.liferay.portal.kernel.util.OrderByComparator obc) 668 throws com.liferay.portal.kernel.exception.PortalException, 669 com.liferay.portal.kernel.exception.SystemException { 670 return getService() 671 .getFileEntries(repositoryId, folderId, start, end, obc); 672 } 673 674 /** 675 * Returns the file entries with the file entry type in the folder. 676 * 677 * @param repositoryId the primary key of the file entry's repository 678 * @param folderId the primary key of the file entry's folder 679 * @param fileEntryTypeId the primary key of the file entry type 680 * @return the file entries with the file entry type in the folder 681 * @throws PortalException if the folder could not be found 682 * @throws SystemException if a system exception occurred 683 */ 684 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 685 long repositoryId, long folderId, long fileEntryTypeId) 686 throws com.liferay.portal.kernel.exception.PortalException, 687 com.liferay.portal.kernel.exception.SystemException { 688 return getService() 689 .getFileEntries(repositoryId, folderId, fileEntryTypeId); 690 } 691 692 /** 693 * Returns a range of all the file entries with the file entry type in the 694 * folder. 695 * 696 * @param repositoryId the primary key of the file entry's repository 697 * @param folderId the primary key of the file entry's folder 698 * @param fileEntryTypeId the primary key of the file entry type 699 * @param start the lower bound of the range of results 700 * @param end the upper bound of the range of results (not inclusive) 701 * @return the file entries in the folder 702 * @throws PortalException if the folder could not be found 703 * @throws SystemException if a system exception occurred 704 */ 705 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 706 long repositoryId, long folderId, long fileEntryTypeId, int start, 707 int end) 708 throws com.liferay.portal.kernel.exception.PortalException, 709 com.liferay.portal.kernel.exception.SystemException { 710 return getService() 711 .getFileEntries(repositoryId, folderId, fileEntryTypeId, 712 start, end); 713 } 714 715 /** 716 * Returns an ordered range of all the file entries with the file entry type 717 * in the folder. 718 * 719 * @param repositoryId the primary key of the repository 720 * @param folderId the primary key of the folder 721 * @param fileEntryTypeId the primary key of the file entry type 722 * @param start the lower bound of the range of results 723 * @param end the upper bound of the range of results (not inclusive) 724 * @param obc the comparator to order the results by (optionally 725 <code>null</code>) 726 * @return the range of file entries with the file entry type in the folder 727 ordered by <code>null</code> 728 * @throws PortalException if the folder could not be found 729 * @throws SystemException if a system exception occurred 730 */ 731 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 732 long repositoryId, long folderId, long fileEntryTypeId, int start, 733 int end, com.liferay.portal.kernel.util.OrderByComparator obc) 734 throws com.liferay.portal.kernel.exception.PortalException, 735 com.liferay.portal.kernel.exception.SystemException { 736 return getService() 737 .getFileEntries(repositoryId, folderId, fileEntryTypeId, 738 start, end, obc); 739 } 740 741 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 742 long repositoryId, long folderId, java.lang.String[] mimeTypes) 743 throws com.liferay.portal.kernel.exception.PortalException, 744 com.liferay.portal.kernel.exception.SystemException { 745 return getService().getFileEntries(repositoryId, folderId, mimeTypes); 746 } 747 748 /** 749 * Returns a range of all the file entries and shortcuts in the folder. 750 * 751 * <p> 752 * Useful when paginating results. Returns a maximum of <code>end - 753 * start</code> instances. <code>start</code> and <code>end</code> are not 754 * primary keys, they are indexes in the result set. Thus, <code>0</code> 755 * refers to the first result in the set. Setting both <code>start</code> 756 * and <code>end</code> to {@link 757 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 758 * result set. 759 * </p> 760 * 761 * @param repositoryId the primary key of the repository 762 * @param folderId the primary key of the folder 763 * @param status the workflow status 764 * @param start the lower bound of the range of results 765 * @param end the upper bound of the range of results (not inclusive) 766 * @return the range of file entries and shortcuts in the folder 767 * @throws PortalException if the folder could not be found 768 * @throws SystemException if a system exception occurred 769 */ 770 public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts( 771 long repositoryId, long folderId, int status, int start, int end) 772 throws com.liferay.portal.kernel.exception.PortalException, 773 com.liferay.portal.kernel.exception.SystemException { 774 return getService() 775 .getFileEntriesAndFileShortcuts(repositoryId, folderId, 776 status, start, end); 777 } 778 779 /** 780 * Returns the number of file entries and shortcuts in the folder. 781 * 782 * @param repositoryId the primary key of the repository 783 * @param folderId the primary key of the folder 784 * @param status the workflow status 785 * @return the number of file entries and shortcuts in the folder 786 * @throws PortalException if the folder ould not be found 787 * @throws SystemException if a system exception occurred 788 */ 789 public static int getFileEntriesAndFileShortcutsCount(long repositoryId, 790 long folderId, int status) 791 throws com.liferay.portal.kernel.exception.PortalException, 792 com.liferay.portal.kernel.exception.SystemException { 793 return getService() 794 .getFileEntriesAndFileShortcutsCount(repositoryId, folderId, 795 status); 796 } 797 798 /** 799 * Returns the number of file entries and shortcuts in the folder. 800 * 801 * @param repositoryId the primary key of the repository 802 * @param folderId the primary key of the folder 803 * @param status the workflow status 804 * @param mimeTypes allowed media types 805 * @return the number of file entries and shortcuts in the folder 806 * @throws PortalException if the folder ould not be found 807 * @throws SystemException if a system exception occurred 808 */ 809 public static int getFileEntriesAndFileShortcutsCount(long repositoryId, 810 long folderId, int status, java.lang.String[] mimeTypes) 811 throws com.liferay.portal.kernel.exception.PortalException, 812 com.liferay.portal.kernel.exception.SystemException { 813 return getService() 814 .getFileEntriesAndFileShortcutsCount(repositoryId, folderId, 815 status, mimeTypes); 816 } 817 818 /** 819 * Returns the number of file entries in the folder. 820 * 821 * @param repositoryId the primary key of the file entry's repository 822 * @param folderId the primary key of the file entry's folder 823 * @return the number of file entries in the folder 824 * @throws PortalException if the folder could not be found 825 * @throws SystemException if a system exception occurred 826 */ 827 public static int getFileEntriesCount(long repositoryId, long folderId) 828 throws com.liferay.portal.kernel.exception.PortalException, 829 com.liferay.portal.kernel.exception.SystemException { 830 return getService().getFileEntriesCount(repositoryId, folderId); 831 } 832 833 /** 834 * Returns the number of file entries with the file entry type in the 835 * folder. 836 * 837 * @param repositoryId the primary key of the file entry's repository 838 * @param folderId the primary key of the file entry's folder 839 * @param fileEntryTypeId the primary key of the file entry type 840 * @return the number of file entries with the file entry type in the folder 841 * @throws PortalException if the folder could not be found 842 * @throws SystemException if a system exception occurred 843 */ 844 public static int getFileEntriesCount(long repositoryId, long folderId, 845 long fileEntryTypeId) 846 throws com.liferay.portal.kernel.exception.PortalException, 847 com.liferay.portal.kernel.exception.SystemException { 848 return getService() 849 .getFileEntriesCount(repositoryId, folderId, fileEntryTypeId); 850 } 851 852 /** 853 * Returns the file entry with the primary key. 854 * 855 * @param fileEntryId the primary key of the file entry 856 * @return the file entry with the primary key 857 * @throws PortalException if the file entry could not be found 858 * @throws SystemException if a system exception occurred 859 */ 860 public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 861 long fileEntryId) 862 throws com.liferay.portal.kernel.exception.PortalException, 863 com.liferay.portal.kernel.exception.SystemException { 864 return getService().getFileEntry(fileEntryId); 865 } 866 867 /** 868 * Returns the file entry with the title in the folder. 869 * 870 * @param groupId the primary key of the file entry's group 871 * @param folderId the primary key of the file entry's folder 872 * @param title the file entry's title 873 * @return the file entry with the title in the folder 874 * @throws PortalException if the file entry could not be found 875 * @throws SystemException if a system exception occurred 876 */ 877 public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 878 long groupId, long folderId, java.lang.String title) 879 throws com.liferay.portal.kernel.exception.PortalException, 880 com.liferay.portal.kernel.exception.SystemException { 881 return getService().getFileEntry(groupId, folderId, title); 882 } 883 884 /** 885 * Returns the file entry with the UUID and group. 886 * 887 * @param uuid the file entry's UUID 888 * @param groupId the primary key of the file entry's group 889 * @return the file entry with the UUID and group 890 * @throws PortalException if the file entry could not be found 891 * @throws SystemException if a system exception occurred 892 */ 893 public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId( 894 java.lang.String uuid, long groupId) 895 throws com.liferay.portal.kernel.exception.PortalException, 896 com.liferay.portal.kernel.exception.SystemException { 897 return getService().getFileEntryByUuidAndGroupId(uuid, groupId); 898 } 899 900 /** 901 * Returns the file shortcut with the primary key. This method is only 902 * supported by the Liferay repository. 903 * 904 * @param fileShortcutId the primary key of the file shortcut 905 * @return the file shortcut with the primary key 906 * @throws PortalException if the file shortcut could not be found 907 * @throws SystemException if a system exception occurred 908 */ 909 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut( 910 long fileShortcutId) 911 throws com.liferay.portal.kernel.exception.PortalException, 912 com.liferay.portal.kernel.exception.SystemException { 913 return getService().getFileShortcut(fileShortcutId); 914 } 915 916 /** 917 * Returns the folder with the primary key. 918 * 919 * @param folderId the primary key of the folder 920 * @return the folder with the primary key 921 * @throws PortalException if the folder could not be found 922 * @throws SystemException if a system exception occurred 923 */ 924 public static com.liferay.portal.kernel.repository.model.Folder getFolder( 925 long folderId) 926 throws com.liferay.portal.kernel.exception.PortalException, 927 com.liferay.portal.kernel.exception.SystemException { 928 return getService().getFolder(folderId); 929 } 930 931 /** 932 * Returns the folder with the name in the parent folder. 933 * 934 * @param repositoryId the primary key of the folder's repository 935 * @param parentFolderId the primary key of the folder's parent folder 936 * @param name the folder's name 937 * @return the folder with the name in the parent folder 938 * @throws PortalException if the folder could not be found 939 * @throws SystemException if a system exception occurred 940 */ 941 public static com.liferay.portal.kernel.repository.model.Folder getFolder( 942 long repositoryId, long parentFolderId, java.lang.String name) 943 throws com.liferay.portal.kernel.exception.PortalException, 944 com.liferay.portal.kernel.exception.SystemException { 945 return getService().getFolder(repositoryId, parentFolderId, name); 946 } 947 948 /** 949 * Returns all immediate subfolders of the parent folder. 950 * 951 * @param repositoryId the primary key of the folder's repository 952 * @param parentFolderId the primary key of the folder's parent folder 953 * @return the immediate subfolders of the parent folder 954 * @throws PortalException if the parent folder could not be found 955 * @throws SystemException if a system exception occurred 956 */ 957 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 958 long repositoryId, long parentFolderId) 959 throws com.liferay.portal.kernel.exception.PortalException, 960 com.liferay.portal.kernel.exception.SystemException { 961 return getService().getFolders(repositoryId, parentFolderId); 962 } 963 964 /** 965 * Returns all immediate subfolders of the parent folder, optionally 966 * including mount folders for third-party repositories. 967 * 968 * @param repositoryId the primary key of the folder's repository 969 * @param parentFolderId the primary key of the folder's parent folder 970 * @param includeMountFolders whether to include mount folders for 971 third-party repositories 972 * @return the immediate subfolders of the parent folder 973 * @throws PortalException if the parent folder could not be found 974 * @throws SystemException if a system exception occurred 975 */ 976 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 977 long repositoryId, long parentFolderId, boolean includeMountFolders) 978 throws com.liferay.portal.kernel.exception.PortalException, 979 com.liferay.portal.kernel.exception.SystemException { 980 return getService() 981 .getFolders(repositoryId, parentFolderId, includeMountFolders); 982 } 983 984 /** 985 * Returns a range of all the immediate subfolders of the parent folder, 986 * optionally including mount folders for third-party repositories. 987 * 988 * <p> 989 * Useful when paginating results. Returns a maximum of <code>end - 990 * start</code> instances. <code>start</code> and <code>end</code> are not 991 * primary keys, they are indexes in the result set. Thus, <code>0</code> 992 * refers to the first result in the set. Setting both <code>start</code> 993 * and <code>end</code> to {@link 994 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 995 * result set. 996 * </p> 997 * 998 * @param repositoryId the primary key of the folder's repository 999 * @param parentFolderId the primary key of the folder's parent folder 1000 * @param includeMountFolders whether to include mount folders for 1001 third-party repositories 1002 * @param start the lower bound of the range of results 1003 * @param end the upper bound of the range of results (not inclusive) 1004 * @return the range of immediate subfolders of the parent folder 1005 * @throws PortalException if the parent folder could not be found 1006 * @throws SystemException if a system exception occurred 1007 */ 1008 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 1009 long repositoryId, long parentFolderId, boolean includeMountFolders, 1010 int start, int end) 1011 throws com.liferay.portal.kernel.exception.PortalException, 1012 com.liferay.portal.kernel.exception.SystemException { 1013 return getService() 1014 .getFolders(repositoryId, parentFolderId, 1015 includeMountFolders, start, end); 1016 } 1017 1018 /** 1019 * Returns an ordered range of all the immediate subfolders of the parent 1020 * folder. 1021 * 1022 * <p> 1023 * Useful when paginating results. Returns a maximum of <code>end - 1024 * start</code> instances. <code>start</code> and <code>end</code> are not 1025 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1026 * refers to the first result in the set. Setting both <code>start</code> 1027 * and <code>end</code> to {@link 1028 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1029 * result set. 1030 * </p> 1031 * 1032 * @param repositoryId the primary key of the folder's repository 1033 * @param parentFolderId the primary key of the folder's parent folder 1034 * @param includeMountFolders whether to include mount folders for 1035 third-party repositories 1036 * @param start the lower bound of the range of results 1037 * @param end the upper bound of the range of results (not inclusive) 1038 * @param obc the comparator to order the folders (optionally 1039 <code>null</code>) 1040 * @return the range of immediate subfolders of the parent folder ordered by 1041 comparator <code>obc</code> 1042 * @throws PortalException if the parent folder could not be found 1043 * @throws SystemException if a system exception occurred 1044 */ 1045 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 1046 long repositoryId, long parentFolderId, boolean includeMountFolders, 1047 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1048 throws com.liferay.portal.kernel.exception.PortalException, 1049 com.liferay.portal.kernel.exception.SystemException { 1050 return getService() 1051 .getFolders(repositoryId, parentFolderId, 1052 includeMountFolders, start, end, obc); 1053 } 1054 1055 /** 1056 * Returns an ordered range of all the immediate subfolders of the parent 1057 * folder. 1058 * 1059 * <p> 1060 * Useful when paginating results. Returns a maximum of <code>end - 1061 * start</code> instances. <code>start</code> and <code>end</code> are not 1062 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1063 * refers to the first result in the set. Setting both <code>start</code> 1064 * and <code>end</code> to {@link 1065 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1066 * result set. 1067 * </p> 1068 * 1069 * @param repositoryId the primary key of the folder's repository 1070 * @param parentFolderId the primary key of the folder's parent folder 1071 * @param status the workflow status 1072 * @param includeMountFolders whether to include mount folders for 1073 third-party repositories 1074 * @param start the lower bound of the range of results 1075 * @param end the upper bound of the range of results (not inclusive) 1076 * @param obc the comparator to order the folders (optionally 1077 <code>null</code>) 1078 * @return the range of immediate subfolders of the parent folder ordered by 1079 comparator <code>obc</code> 1080 * @throws PortalException if the parent folder could not be found 1081 * @throws SystemException if a system exception occurred 1082 */ 1083 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 1084 long repositoryId, long parentFolderId, int status, 1085 boolean includeMountFolders, int start, int end, 1086 com.liferay.portal.kernel.util.OrderByComparator obc) 1087 throws com.liferay.portal.kernel.exception.PortalException, 1088 com.liferay.portal.kernel.exception.SystemException { 1089 return getService() 1090 .getFolders(repositoryId, parentFolderId, status, 1091 includeMountFolders, start, end, obc); 1092 } 1093 1094 /** 1095 * Returns a range of all the immediate subfolders of the parent folder. 1096 * 1097 * <p> 1098 * Useful when paginating results. Returns a maximum of <code>end - 1099 * start</code> instances. <code>start</code> and <code>end</code> are not 1100 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1101 * refers to the first result in the set. Setting both <code>start</code> 1102 * and <code>end</code> to {@link 1103 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1104 * result set. 1105 * </p> 1106 * 1107 * @param repositoryId the primary key of the folder's repository 1108 * @param parentFolderId the primary key of the folder's parent folder 1109 * @param start the lower bound of the range of results 1110 * @param end the upper bound of the range of results (not inclusive) 1111 * @return the range of immediate subfolders of the parent folder 1112 * @throws PortalException if the parent folder could not be found 1113 * @throws SystemException if a system exception occurred 1114 */ 1115 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 1116 long repositoryId, long parentFolderId, int start, int end) 1117 throws com.liferay.portal.kernel.exception.PortalException, 1118 com.liferay.portal.kernel.exception.SystemException { 1119 return getService().getFolders(repositoryId, parentFolderId, start, end); 1120 } 1121 1122 /** 1123 * Returns an ordered range of all the immediate subfolders of the parent 1124 * folder. 1125 * 1126 * <p> 1127 * Useful when paginating results. Returns a maximum of <code>end - 1128 * start</code> instances. <code>start</code> and <code>end</code> are not 1129 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1130 * refers to the first result in the set. Setting both <code>start</code> 1131 * and <code>end</code> to {@link 1132 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1133 * result set. 1134 * </p> 1135 * 1136 * @param repositoryId the primary key of the folder's repository 1137 * @param parentFolderId the primary key of the folder's parent folder 1138 * @param start the lower bound of the range of results 1139 * @param end the upper bound of the range of results (not inclusive) 1140 * @param obc the comparator to order the folders (optionally 1141 <code>null</code>) 1142 * @return the range of immediate subfolders of the parent folder ordered by 1143 comparator <code>obc</code> 1144 * @throws PortalException if the parent folder could not be found 1145 * @throws SystemException if a system exception occurred 1146 */ 1147 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 1148 long repositoryId, long parentFolderId, int start, int end, 1149 com.liferay.portal.kernel.util.OrderByComparator obc) 1150 throws com.liferay.portal.kernel.exception.PortalException, 1151 com.liferay.portal.kernel.exception.SystemException { 1152 return getService() 1153 .getFolders(repositoryId, parentFolderId, start, end, obc); 1154 } 1155 1156 /** 1157 * Returns a range of all the immediate subfolders, file entries, and file 1158 * shortcuts in the parent folder. 1159 * 1160 * <p> 1161 * Useful when paginating results. Returns a maximum of <code>end - 1162 * start</code> instances. <code>start</code> and <code>end</code> are not 1163 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1164 * refers to the first result in the set. Setting both <code>start</code> 1165 * and <code>end</code> to {@link 1166 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1167 * result set. 1168 * </p> 1169 * 1170 * @param repositoryId the primary key of the repository 1171 * @param folderId the primary key of the parent folder 1172 * @param status the workflow status 1173 * @param includeMountFolders whether to include mount folders for 1174 third-party repositories 1175 * @param start the lower bound of the range of results 1176 * @param end the upper bound of the range of results (not inclusive) 1177 * @return the range of immediate subfolders, file entries, and file 1178 shortcuts in the parent folder ordered by comparator 1179 <code>obc</code> 1180 * @throws PortalException if the parent folder could not be found 1181 * @throws SystemException if a system exception occurred 1182 */ 1183 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1184 long repositoryId, long folderId, int status, 1185 boolean includeMountFolders, int start, int end) 1186 throws com.liferay.portal.kernel.exception.PortalException, 1187 com.liferay.portal.kernel.exception.SystemException { 1188 return getService() 1189 .getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 1190 folderId, status, includeMountFolders, start, end); 1191 } 1192 1193 /** 1194 * Returns an ordered range of all the immediate subfolders, file entries, 1195 * and file shortcuts in the parent folder. 1196 * 1197 * <p> 1198 * Useful when paginating results. Returns a maximum of <code>end - 1199 * start</code> instances. <code>start</code> and <code>end</code> are not 1200 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1201 * refers to the first result in the set. Setting both <code>start</code> 1202 * and <code>end</code> to {@link 1203 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1204 * result set. 1205 * </p> 1206 * 1207 * @param repositoryId the primary key of the repository 1208 * @param folderId the primary key of the parent folder 1209 * @param status the workflow status 1210 * @param includeMountFolders whether to include mount folders for 1211 third-party repositories 1212 * @param start the lower bound of the range of results 1213 * @param end the upper bound of the range of results (not inclusive) 1214 * @param obc the comparator to order the results (optionally 1215 <code>null</code>) 1216 * @return the range of immediate subfolders, file entries, and file 1217 shortcuts in the parent folder ordered by comparator 1218 <code>obc</code> 1219 * @throws PortalException if the parent folder could not be found 1220 * @throws SystemException if a system exception occurred 1221 */ 1222 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1223 long repositoryId, long folderId, int status, 1224 boolean includeMountFolders, int start, int end, 1225 com.liferay.portal.kernel.util.OrderByComparator obc) 1226 throws com.liferay.portal.kernel.exception.PortalException, 1227 com.liferay.portal.kernel.exception.SystemException { 1228 return getService() 1229 .getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 1230 folderId, status, includeMountFolders, start, end, obc); 1231 } 1232 1233 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1234 long repositoryId, long folderId, int status, 1235 java.lang.String[] mimeTypes, boolean includeMountFolders, int start, 1236 int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1237 throws com.liferay.portal.kernel.exception.PortalException, 1238 com.liferay.portal.kernel.exception.SystemException { 1239 return getService() 1240 .getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 1241 folderId, status, mimeTypes, includeMountFolders, start, end, obc); 1242 } 1243 1244 /** 1245 * Returns the number of immediate subfolders, file entries, and file 1246 * shortcuts in the parent folder. 1247 * 1248 * @param repositoryId the primary key of the repository 1249 * @param folderId the primary key of the parent folder 1250 * @param status the workflow status 1251 * @param includeMountFolders whether to include mount folders for 1252 third-party repositories 1253 * @return the number of immediate subfolders, file entries, and file 1254 shortcuts in the parent folder 1255 * @throws PortalException if the folder could not be found 1256 * @throws SystemException if a system exception occurred 1257 */ 1258 public static int getFoldersAndFileEntriesAndFileShortcutsCount( 1259 long repositoryId, long folderId, int status, 1260 boolean includeMountFolders) 1261 throws com.liferay.portal.kernel.exception.PortalException, 1262 com.liferay.portal.kernel.exception.SystemException { 1263 return getService() 1264 .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 1265 folderId, status, includeMountFolders); 1266 } 1267 1268 public static int getFoldersAndFileEntriesAndFileShortcutsCount( 1269 long repositoryId, long folderId, int status, 1270 java.lang.String[] mimeTypes, boolean includeMountFolders) 1271 throws com.liferay.portal.kernel.exception.PortalException, 1272 com.liferay.portal.kernel.exception.SystemException { 1273 return getService() 1274 .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 1275 folderId, status, mimeTypes, includeMountFolders); 1276 } 1277 1278 /** 1279 * Returns the number of immediate subfolders of the parent folder. 1280 * 1281 * @param repositoryId the primary key of the folder's repository 1282 * @param parentFolderId the primary key of the folder's parent folder 1283 * @return the number of immediate subfolders of the parent folder 1284 * @throws PortalException if the parent folder could not be found 1285 * @throws SystemException if a system exception occurred 1286 */ 1287 public static int getFoldersCount(long repositoryId, long parentFolderId) 1288 throws com.liferay.portal.kernel.exception.PortalException, 1289 com.liferay.portal.kernel.exception.SystemException { 1290 return getService().getFoldersCount(repositoryId, parentFolderId); 1291 } 1292 1293 /** 1294 * Returns the number of immediate subfolders of the parent folder, 1295 * optionally including mount folders for third-party repositories. 1296 * 1297 * @param repositoryId the primary key of the folder's repository 1298 * @param parentFolderId the primary key of the folder's parent folder 1299 * @param includeMountFolders whether to include mount folders for 1300 third-party repositories 1301 * @return the number of immediate subfolders of the parent folder 1302 * @throws PortalException if the parent folder could not be found 1303 * @throws SystemException if a system exception occurred 1304 */ 1305 public static int getFoldersCount(long repositoryId, long parentFolderId, 1306 boolean includeMountFolders) 1307 throws com.liferay.portal.kernel.exception.PortalException, 1308 com.liferay.portal.kernel.exception.SystemException { 1309 return getService() 1310 .getFoldersCount(repositoryId, parentFolderId, 1311 includeMountFolders); 1312 } 1313 1314 /** 1315 * Returns the number of immediate subfolders of the parent folder, 1316 * optionally including mount folders for third-party repositories. 1317 * 1318 * @param repositoryId the primary key of the folder's repository 1319 * @param parentFolderId the primary key of the folder's parent folder 1320 * @param status the workflow status 1321 * @param includeMountFolders whether to include mount folders for 1322 third-party repositories 1323 * @return the number of immediate subfolders of the parent folder 1324 * @throws PortalException if the parent folder could not be found 1325 * @throws SystemException if a system exception occurred 1326 */ 1327 public static int getFoldersCount(long repositoryId, long parentFolderId, 1328 int status, boolean includeMountFolders) 1329 throws com.liferay.portal.kernel.exception.PortalException, 1330 com.liferay.portal.kernel.exception.SystemException { 1331 return getService() 1332 .getFoldersCount(repositoryId, parentFolderId, status, 1333 includeMountFolders); 1334 } 1335 1336 /** 1337 * Returns the number of immediate subfolders and file entries across the 1338 * folders. 1339 * 1340 * @param repositoryId the primary key of the repository 1341 * @param folderIds the primary keys of folders from which to count 1342 immediate subfolders and file entries 1343 * @param status the workflow status 1344 * @return the number of immediate subfolders and file entries across the 1345 folders 1346 * @throws PortalException if the repository could not be found 1347 * @throws SystemException if a system exception occurred 1348 */ 1349 public static int getFoldersFileEntriesCount(long repositoryId, 1350 java.util.List<java.lang.Long> folderIds, int status) 1351 throws com.liferay.portal.kernel.exception.PortalException, 1352 com.liferay.portal.kernel.exception.SystemException { 1353 return getService() 1354 .getFoldersFileEntriesCount(repositoryId, folderIds, status); 1355 } 1356 1357 /** 1358 * Returns an ordered range of all the file entries in the group starting at 1359 * the repository default parent folder that are stored within the Liferay 1360 * repository. This method is primarily used to search for recently modified 1361 * file entries. It can be limited to the file entries modified by a given 1362 * user. 1363 * 1364 * <p> 1365 * Useful when paginating results. Returns a maximum of <code>end - 1366 * start</code> instances. <code>start</code> and <code>end</code> are not 1367 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1368 * refers to the first result in the set. Setting both <code>start</code> 1369 * and <code>end</code> to {@link 1370 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1371 * result set. 1372 * </p> 1373 * 1374 * @param groupId the primary key of the group 1375 * @param userId the primary key of the user who created the file 1376 (optionally <code>0</code>) 1377 * @param start the lower bound of the range of results 1378 * @param end the upper bound of the range of results (not inclusive) 1379 * @return the range of matching file entries ordered by date modified 1380 * @throws PortalException if the group could not be found 1381 * @throws SystemException if a system exception occurred 1382 */ 1383 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1384 long groupId, long userId, int start, int end) 1385 throws com.liferay.portal.kernel.exception.PortalException, 1386 com.liferay.portal.kernel.exception.SystemException { 1387 return getService().getGroupFileEntries(groupId, userId, start, end); 1388 } 1389 1390 /** 1391 * Returns an ordered range of all the file entries in the group that are 1392 * stored within the Liferay repository. This method is primarily used to 1393 * search for recently modified file entries. It can be limited to the file 1394 * entries modified by a given user. 1395 * 1396 * <p> 1397 * Useful when paginating results. Returns a maximum of <code>end - 1398 * start</code> instances. <code>start</code> and <code>end</code> are not 1399 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1400 * refers to the first result in the set. Setting both <code>start</code> 1401 * and <code>end</code> to {@link 1402 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1403 * result set. 1404 * </p> 1405 * 1406 * @param groupId the primary key of the group 1407 * @param userId the primary key of the user who created the file 1408 (optionally <code>0</code>) 1409 * @param start the lower bound of the range of results 1410 * @param end the upper bound of the range of results (not inclusive) 1411 * @param obc the comparator to order the file entries (optionally 1412 <code>null</code>) 1413 * @return the range of matching file entries ordered by comparator 1414 <code>obc</code> 1415 * @throws PortalException if the group could not be found 1416 * @throws SystemException if a system exception occurred 1417 */ 1418 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1419 long groupId, long userId, int start, int end, 1420 com.liferay.portal.kernel.util.OrderByComparator obc) 1421 throws com.liferay.portal.kernel.exception.PortalException, 1422 com.liferay.portal.kernel.exception.SystemException { 1423 return getService().getGroupFileEntries(groupId, userId, start, end, obc); 1424 } 1425 1426 /** 1427 * Returns an ordered range of all the file entries in the group starting at 1428 * the root folder that are stored within the Liferay repository. This 1429 * method is primarily used to search for recently modified file entries. It 1430 * can be limited to the file entries modified by a given user. 1431 * 1432 * <p> 1433 * Useful when paginating results. Returns a maximum of <code>end - 1434 * start</code> instances. <code>start</code> and <code>end</code> are not 1435 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1436 * refers to the first result in the set. Setting both <code>start</code> 1437 * and <code>end</code> to {@link 1438 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1439 * result set. 1440 * </p> 1441 * 1442 * @param groupId the primary key of the group 1443 * @param userId the primary key of the user who created the file 1444 (optionally <code>0</code>) 1445 * @param rootFolderId the primary key of the root folder to begin the 1446 search 1447 * @param start the lower bound of the range of results 1448 * @param end the upper bound of the range of results (not inclusive) 1449 * @return the range of matching file entries ordered by date modified 1450 * @throws PortalException if the group could not be found 1451 * @throws SystemException if a system exception occurred 1452 */ 1453 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1454 long groupId, long userId, long rootFolderId, int start, int end) 1455 throws com.liferay.portal.kernel.exception.PortalException, 1456 com.liferay.portal.kernel.exception.SystemException { 1457 return getService() 1458 .getGroupFileEntries(groupId, userId, rootFolderId, start, 1459 end); 1460 } 1461 1462 /** 1463 * Returns an ordered range of all the file entries in the group starting at 1464 * the root folder that are stored within the Liferay repository. This 1465 * method is primarily used to search for recently modified file entries. It 1466 * can be limited to the file entries modified by a given user. 1467 * 1468 * <p> 1469 * Useful when paginating results. Returns a maximum of <code>end - 1470 * start</code> instances. <code>start</code> and <code>end</code> are not 1471 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1472 * refers to the first result in the set. Setting both <code>start</code> 1473 * and <code>end</code> to {@link 1474 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1475 * result set. 1476 * </p> 1477 * 1478 * @param groupId the primary key of the group 1479 * @param userId the primary key of the user who created the file 1480 (optionally <code>0</code>) 1481 * @param rootFolderId the primary key of the root folder to begin the 1482 search 1483 * @param start the lower bound of the range of results 1484 * @param end the upper bound of the range of results (not inclusive) 1485 * @param obc the comparator to order the file entries (optionally 1486 <code>null</code>) 1487 * @return the range of matching file entries ordered by comparator 1488 <code>obc</code> 1489 * @throws PortalException if the group could not be found 1490 * @throws SystemException if a system exception occurred 1491 */ 1492 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1493 long groupId, long userId, long rootFolderId, int start, int end, 1494 com.liferay.portal.kernel.util.OrderByComparator obc) 1495 throws com.liferay.portal.kernel.exception.PortalException, 1496 com.liferay.portal.kernel.exception.SystemException { 1497 return getService() 1498 .getGroupFileEntries(groupId, userId, rootFolderId, start, 1499 end, obc); 1500 } 1501 1502 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1503 long groupId, long userId, long rootFolderId, 1504 java.lang.String[] mimeTypes, int status, int start, int end, 1505 com.liferay.portal.kernel.util.OrderByComparator obc) 1506 throws com.liferay.portal.kernel.exception.PortalException, 1507 com.liferay.portal.kernel.exception.SystemException { 1508 return getService() 1509 .getGroupFileEntries(groupId, userId, rootFolderId, 1510 mimeTypes, status, start, end, obc); 1511 } 1512 1513 /** 1514 * Returns the number of file entries in a group starting at the repository 1515 * default parent folder that are stored within the Liferay repository. This 1516 * method is primarily used to search for recently modified file entries. It 1517 * can be limited to the file entries modified by a given user. 1518 * 1519 * @param groupId the primary key of the group 1520 * @param userId the primary key of the user who created the file 1521 (optionally <code>0</code>) 1522 * @return the number of matching file entries 1523 * @throws PortalException if the group could not be found 1524 * @throws SystemException if a system exception occurred 1525 */ 1526 public static int getGroupFileEntriesCount(long groupId, long userId) 1527 throws com.liferay.portal.kernel.exception.PortalException, 1528 com.liferay.portal.kernel.exception.SystemException { 1529 return getService().getGroupFileEntriesCount(groupId, userId); 1530 } 1531 1532 /** 1533 * Returns the number of file entries in a group starting at the root folder 1534 * that are stored within the Liferay repository. This method is primarily 1535 * used to search for recently modified file entries. It can be limited to 1536 * the file entries modified by a given user. 1537 * 1538 * @param groupId the primary key of the group 1539 * @param userId the primary key of the user who created the file 1540 (optionally <code>0</code>) 1541 * @param rootFolderId the primary key of the root folder to begin the 1542 search 1543 * @return the number of matching file entries 1544 * @throws PortalException if the group could not be found 1545 * @throws SystemException if a system exception occurred 1546 */ 1547 public static int getGroupFileEntriesCount(long groupId, long userId, 1548 long rootFolderId) 1549 throws com.liferay.portal.kernel.exception.PortalException, 1550 com.liferay.portal.kernel.exception.SystemException { 1551 return getService() 1552 .getGroupFileEntriesCount(groupId, userId, rootFolderId); 1553 } 1554 1555 public static int getGroupFileEntriesCount(long groupId, long userId, 1556 long rootFolderId, java.lang.String[] mimeTypes, int status) 1557 throws com.liferay.portal.kernel.exception.PortalException, 1558 com.liferay.portal.kernel.exception.SystemException { 1559 return getService() 1560 .getGroupFileEntriesCount(groupId, userId, rootFolderId, 1561 mimeTypes, status); 1562 } 1563 1564 /** 1565 * Returns all immediate subfolders of the parent folder that are used for 1566 * mounting third-party repositories. This method is only supported by the 1567 * Liferay repository. 1568 * 1569 * @param repositoryId the primary key of the folder's repository 1570 * @param parentFolderId the primary key of the folder's parent folder 1571 * @return the immediate subfolders of the parent folder that are used for 1572 mounting third-party repositories 1573 * @throws PortalException if the repository or parent folder could not be 1574 found 1575 * @throws SystemException if a system exception occurred 1576 */ 1577 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1578 long repositoryId, long parentFolderId) 1579 throws com.liferay.portal.kernel.exception.PortalException, 1580 com.liferay.portal.kernel.exception.SystemException { 1581 return getService().getMountFolders(repositoryId, parentFolderId); 1582 } 1583 1584 /** 1585 * Returns a range of all the immediate subfolders of the parent folder that 1586 * are used for mounting third-party repositories. This method is only 1587 * supported by the Liferay repository. 1588 * 1589 * <p> 1590 * Useful when paginating results. Returns a maximum of <code>end - 1591 * start</code> instances. <code>start</code> and <code>end</code> are not 1592 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1593 * refers to the first result in the set. Setting both <code>start</code> 1594 * and <code>end</code> to {@link 1595 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1596 * result set. 1597 * </p> 1598 * 1599 * @param repositoryId the primary key of the repository 1600 * @param parentFolderId the primary key of the parent folder 1601 * @param start the lower bound of the range of results 1602 * @param end the upper bound of the range of results (not inclusive) 1603 * @return the range of immediate subfolders of the parent folder that are 1604 used for mounting third-party repositories 1605 * @throws PortalException if the repository or parent folder could not be 1606 found 1607 * @throws SystemException if a system exception occurred 1608 */ 1609 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1610 long repositoryId, long parentFolderId, int start, int end) 1611 throws com.liferay.portal.kernel.exception.PortalException, 1612 com.liferay.portal.kernel.exception.SystemException { 1613 return getService() 1614 .getMountFolders(repositoryId, parentFolderId, start, end); 1615 } 1616 1617 /** 1618 * Returns an ordered range of all the immediate subfolders of the parent 1619 * folder that are used for mounting third-party repositories. This method 1620 * is only supported by the Liferay repository. 1621 * 1622 * <p> 1623 * Useful when paginating results. Returns a maximum of <code>end - 1624 * start</code> instances. <code>start</code> and <code>end</code> are not 1625 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1626 * refers to the first result in the set. Setting both <code>start</code> 1627 * and <code>end</code> to {@link 1628 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1629 * result set. 1630 * </p> 1631 * 1632 * @param repositoryId the primary key of the folder's repository 1633 * @param parentFolderId the primary key of the folder's parent folder 1634 * @param start the lower bound of the range of results 1635 * @param end the upper bound of the range of results (not inclusive) 1636 * @param obc the comparator to order the folders (optionally 1637 <code>null</code>) 1638 * @return the range of immediate subfolders of the parent folder that are 1639 used for mounting third-party repositories ordered by comparator 1640 <code>obc</code> 1641 * @throws PortalException if the repository or parent folder could not be 1642 found 1643 * @throws SystemException if a system exception occurred 1644 */ 1645 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1646 long repositoryId, long parentFolderId, int start, int end, 1647 com.liferay.portal.kernel.util.OrderByComparator obc) 1648 throws com.liferay.portal.kernel.exception.PortalException, 1649 com.liferay.portal.kernel.exception.SystemException { 1650 return getService() 1651 .getMountFolders(repositoryId, parentFolderId, start, end, 1652 obc); 1653 } 1654 1655 /** 1656 * Returns the number of immediate subfolders of the parent folder that are 1657 * used for mounting third-party repositories. This method is only supported 1658 * by the Liferay repository. 1659 * 1660 * @param repositoryId the primary key of the repository 1661 * @param parentFolderId the primary key of the parent folder 1662 * @return the number of folders of the parent folder that are used for 1663 mounting third-party repositories 1664 * @throws PortalException if the repository or parent folder could not be 1665 found 1666 * @throws SystemException if a system exception occurred 1667 */ 1668 public static int getMountFoldersCount(long repositoryId, 1669 long parentFolderId) 1670 throws com.liferay.portal.kernel.exception.PortalException, 1671 com.liferay.portal.kernel.exception.SystemException { 1672 return getService().getMountFoldersCount(repositoryId, parentFolderId); 1673 } 1674 1675 public static void getSubfolderIds(long repositoryId, 1676 java.util.List<java.lang.Long> folderIds, long folderId) 1677 throws com.liferay.portal.kernel.exception.PortalException, 1678 com.liferay.portal.kernel.exception.SystemException { 1679 getService().getSubfolderIds(repositoryId, folderIds, folderId); 1680 } 1681 1682 /** 1683 * Returns all the descendant folders of the folder with the primary key. 1684 * 1685 * @param repositoryId the primary key of the repository 1686 * @param folderId the primary key of the folder 1687 * @return the descendant folders of the folder with the primary key 1688 * @throws PortalException if the repository or parent folder could not be 1689 found 1690 * @throws SystemException if a system exception occurred 1691 */ 1692 public static java.util.List<java.lang.Long> getSubfolderIds( 1693 long repositoryId, long folderId) 1694 throws com.liferay.portal.kernel.exception.PortalException, 1695 com.liferay.portal.kernel.exception.SystemException { 1696 return getService().getSubfolderIds(repositoryId, folderId); 1697 } 1698 1699 /** 1700 * Returns descendant folders of the folder with the primary key, optionally 1701 * limiting to one level deep. 1702 * 1703 * @param repositoryId the primary key of the repository 1704 * @param folderId the primary key of the folder 1705 * @param recurse whether to recurse through each subfolder 1706 * @return the descendant folders of the folder with the primary key 1707 * @throws PortalException if the repository or parent folder could not be 1708 found 1709 * @throws SystemException if a system exception occurred 1710 */ 1711 public static java.util.List<java.lang.Long> getSubfolderIds( 1712 long repositoryId, long folderId, boolean recurse) 1713 throws com.liferay.portal.kernel.exception.PortalException, 1714 com.liferay.portal.kernel.exception.SystemException { 1715 return getService().getSubfolderIds(repositoryId, folderId, recurse); 1716 } 1717 1718 /** 1719 * Returns all the temporary file entry names. 1720 * 1721 * @param groupId the primary key of the group 1722 * @param folderId the primary key of the folder where the file entry will 1723 eventually reside 1724 * @param tempFolderName the temporary folder's name 1725 * @return the temporary file entry names 1726 * @throws PortalException if the folder was invalid 1727 * @throws SystemException if a system exception occurred 1728 * @see #addTempFileEntry(long, long, String, String, File, String) 1729 * @see com.liferay.portal.kernel.util.TempFileUtil 1730 */ 1731 public static java.lang.String[] getTempFileEntryNames(long groupId, 1732 long folderId, java.lang.String tempFolderName) 1733 throws com.liferay.portal.kernel.exception.PortalException, 1734 com.liferay.portal.kernel.exception.SystemException { 1735 return getService() 1736 .getTempFileEntryNames(groupId, folderId, tempFolderName); 1737 } 1738 1739 /** 1740 * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long, 1741 ServiceContext)} 1742 */ 1743 public static com.liferay.portal.model.Lock lockFileEntry(long fileEntryId) 1744 throws com.liferay.portal.kernel.exception.PortalException, 1745 com.liferay.portal.kernel.exception.SystemException { 1746 return getService().lockFileEntry(fileEntryId); 1747 } 1748 1749 /** 1750 * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long, 1751 String, long, ServiceContext)} 1752 */ 1753 public static com.liferay.portal.model.Lock lockFileEntry( 1754 long fileEntryId, java.lang.String owner, long expirationTime) 1755 throws com.liferay.portal.kernel.exception.PortalException, 1756 com.liferay.portal.kernel.exception.SystemException { 1757 return getService().lockFileEntry(fileEntryId, owner, expirationTime); 1758 } 1759 1760 /** 1761 * Locks the folder. This method is primarily used by WebDAV. 1762 * 1763 * @param repositoryId the primary key of the repository 1764 * @param folderId the primary key of the folder 1765 * @return the lock object 1766 * @throws PortalException if the repository or folder could not be found 1767 * @throws SystemException if a system exception occurred 1768 */ 1769 public static com.liferay.portal.model.Lock lockFolder(long repositoryId, 1770 long folderId) 1771 throws com.liferay.portal.kernel.exception.PortalException, 1772 com.liferay.portal.kernel.exception.SystemException { 1773 return getService().lockFolder(repositoryId, folderId); 1774 } 1775 1776 /** 1777 * Locks the folder. This method is primarily used by WebDAV. 1778 * 1779 * @param repositoryId the primary key of the repository 1780 * @param folderId the primary key of the folder 1781 * @param owner the owner string for the checkout (optionally 1782 <code>null</code>) 1783 * @param inheritable whether the lock must propagate to descendants 1784 * @param expirationTime the time in milliseconds before the lock expires. 1785 If the value is <code>0</code>, the default expiration time will 1786 be used from <code>portal.properties>. 1787 * @return the lock object 1788 * @throws PortalException if the repository or folder could not be found 1789 * @throws SystemException if a system exception occurred 1790 */ 1791 public static com.liferay.portal.model.Lock lockFolder(long repositoryId, 1792 long folderId, java.lang.String owner, boolean inheritable, 1793 long expirationTime) 1794 throws com.liferay.portal.kernel.exception.PortalException, 1795 com.liferay.portal.kernel.exception.SystemException { 1796 return getService() 1797 .lockFolder(repositoryId, folderId, owner, inheritable, 1798 expirationTime); 1799 } 1800 1801 /** 1802 * Moves the file entry to the new folder. 1803 * 1804 * @param fileEntryId the primary key of the file entry 1805 * @param newFolderId the primary key of the new folder 1806 * @param serviceContext the service context to be applied 1807 * @return the file entry 1808 * @throws PortalException if the file entry or the new folder could not be 1809 found 1810 * @throws SystemException if a system exception occurred 1811 */ 1812 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry( 1813 long fileEntryId, long newFolderId, 1814 com.liferay.portal.service.ServiceContext serviceContext) 1815 throws com.liferay.portal.kernel.exception.PortalException, 1816 com.liferay.portal.kernel.exception.SystemException { 1817 return getService() 1818 .moveFileEntry(fileEntryId, newFolderId, serviceContext); 1819 } 1820 1821 /** 1822 * Moves the file entry from a trashed folder to the new folder. 1823 * 1824 * @param fileEntryId the primary key of the file entry 1825 * @param newFolderId the primary key of the new folder 1826 * @param serviceContext the service context to be applied 1827 * @return the file entry 1828 * @throws PortalException if the file entry or the new folder could not be 1829 found 1830 * @throws SystemException if a system exception occurred 1831 */ 1832 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash( 1833 long fileEntryId, long newFolderId, 1834 com.liferay.portal.service.ServiceContext serviceContext) 1835 throws com.liferay.portal.kernel.exception.PortalException, 1836 com.liferay.portal.kernel.exception.SystemException { 1837 return getService() 1838 .moveFileEntryFromTrash(fileEntryId, newFolderId, 1839 serviceContext); 1840 } 1841 1842 /** 1843 * Moves the file entry with the primary key to the trash portlet. 1844 * 1845 * @param fileEntryId the primary key of the file entry 1846 * @return the file entry 1847 * @throws PortalException if the file entry could not be found 1848 * @throws SystemException if a system exception occurred 1849 */ 1850 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash( 1851 long fileEntryId) 1852 throws com.liferay.portal.kernel.exception.PortalException, 1853 com.liferay.portal.kernel.exception.SystemException { 1854 return getService().moveFileEntryToTrash(fileEntryId); 1855 } 1856 1857 /** 1858 * Moves the file shortcut from a trashed folder to the new folder. 1859 * 1860 * @param fileShortcutId the primary key of the file shortcut 1861 * @param newFolderId the primary key of the new folder 1862 * @param serviceContext the service context to be applied 1863 * @return the file shortcut 1864 * @throws PortalException if the file entry or the new folder could not be 1865 found 1866 * @throws SystemException if a system exception occurred 1867 */ 1868 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutFromTrash( 1869 long fileShortcutId, long newFolderId, 1870 com.liferay.portal.service.ServiceContext serviceContext) 1871 throws com.liferay.portal.kernel.exception.PortalException, 1872 com.liferay.portal.kernel.exception.SystemException { 1873 return getService() 1874 .moveFileShortcutFromTrash(fileShortcutId, newFolderId, 1875 serviceContext); 1876 } 1877 1878 /** 1879 * Moves the file shortcut with the primary key to the trash portlet. 1880 * 1881 * @param fileShortcutId the primary key of the file shortcut 1882 * @return the file shortcut 1883 * @throws PortalException if the file shortcut could not be found 1884 * @throws SystemException if a system exception occurred 1885 */ 1886 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutToTrash( 1887 long fileShortcutId) 1888 throws com.liferay.portal.kernel.exception.PortalException, 1889 com.liferay.portal.kernel.exception.SystemException { 1890 return getService().moveFileShortcutToTrash(fileShortcutId); 1891 } 1892 1893 /** 1894 * Moves the folder to the new parent folder with the primary key. 1895 * 1896 * @param folderId the primary key of the folder 1897 * @param parentFolderId the primary key of the new parent folder 1898 * @param serviceContext the service context to be applied 1899 * @return the file entry 1900 * @throws PortalException if the folder could not be found 1901 * @throws SystemException if a system exception occurred 1902 */ 1903 public static com.liferay.portal.kernel.repository.model.Folder moveFolder( 1904 long folderId, long parentFolderId, 1905 com.liferay.portal.service.ServiceContext serviceContext) 1906 throws com.liferay.portal.kernel.exception.PortalException, 1907 com.liferay.portal.kernel.exception.SystemException { 1908 return getService().moveFolder(folderId, parentFolderId, serviceContext); 1909 } 1910 1911 /** 1912 * Moves the folder with the primary key from the trash portlet to the new 1913 * parent folder with the primary key. 1914 * 1915 * @param folderId the primary key of the folder 1916 * @param parentFolderId the primary key of the new parent folder 1917 * @param serviceContext the service context to be applied 1918 * @return the file entry 1919 * @throws PortalException if the folder could not be found 1920 * @throws SystemException if a system exception occurred 1921 */ 1922 public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash( 1923 long folderId, long parentFolderId, 1924 com.liferay.portal.service.ServiceContext serviceContext) 1925 throws com.liferay.portal.kernel.exception.PortalException, 1926 com.liferay.portal.kernel.exception.SystemException { 1927 return getService() 1928 .moveFolderFromTrash(folderId, parentFolderId, serviceContext); 1929 } 1930 1931 /** 1932 * Moves the folder with the primary key to the trash portlet. 1933 * 1934 * @param folderId the primary key of the folder 1935 * @return the file entry 1936 * @throws PortalException if the folder could not be found 1937 * @throws SystemException if a system exception occurred 1938 */ 1939 public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash( 1940 long folderId) 1941 throws com.liferay.portal.kernel.exception.PortalException, 1942 com.liferay.portal.kernel.exception.SystemException { 1943 return getService().moveFolderToTrash(folderId); 1944 } 1945 1946 /** 1947 * Refreshes the lock for the file entry. This method is primarily used by 1948 * WebDAV. 1949 * 1950 * @param lockUuid the lock's UUID 1951 * @param companyId the primary key of the file entry's company 1952 * @param expirationTime the time in milliseconds before the lock expires. 1953 If the value is <code>0</code>, the default expiration time will 1954 be used from <code>portal.properties>. 1955 * @return the lock object 1956 * @throws PortalException if the file entry or lock could not be found 1957 * @throws SystemException if a system exception occurred 1958 */ 1959 public static com.liferay.portal.model.Lock refreshFileEntryLock( 1960 java.lang.String lockUuid, long companyId, long expirationTime) 1961 throws com.liferay.portal.kernel.exception.PortalException, 1962 com.liferay.portal.kernel.exception.SystemException { 1963 return getService() 1964 .refreshFileEntryLock(lockUuid, companyId, expirationTime); 1965 } 1966 1967 /** 1968 * Refreshes the lock for the folder. This method is primarily used by 1969 * WebDAV. 1970 * 1971 * @param lockUuid the lock's UUID 1972 * @param companyId the primary key of the file entry's company 1973 * @param expirationTime the time in milliseconds before the lock expires. 1974 If the value is <code>0</code>, the default expiration time will 1975 be used from <code>portal.properties>. 1976 * @return the lock object 1977 * @throws PortalException if the folder or lock could not be found 1978 * @throws SystemException if a system exception occurred 1979 */ 1980 public static com.liferay.portal.model.Lock refreshFolderLock( 1981 java.lang.String lockUuid, long companyId, long expirationTime) 1982 throws com.liferay.portal.kernel.exception.PortalException, 1983 com.liferay.portal.kernel.exception.SystemException { 1984 return getService() 1985 .refreshFolderLock(lockUuid, companyId, expirationTime); 1986 } 1987 1988 /** 1989 * Restores the file entry with the primary key from the trash portlet. 1990 * 1991 * @param fileEntryId the primary key of the file entry 1992 * @throws PortalException if the file entry could not be found 1993 * @throws SystemException if a system exception occurred 1994 */ 1995 public static void restoreFileEntryFromTrash(long fileEntryId) 1996 throws com.liferay.portal.kernel.exception.PortalException, 1997 com.liferay.portal.kernel.exception.SystemException { 1998 getService().restoreFileEntryFromTrash(fileEntryId); 1999 } 2000 2001 /** 2002 * Restores the file shortcut with the primary key from the trash portlet. 2003 * 2004 * @param fileShortcutId the primary key of the file shortcut 2005 * @throws PortalException if the file shortcut could not be found 2006 * @throws SystemException if a system exception occurred 2007 */ 2008 public static void restoreFileShortcutFromTrash(long fileShortcutId) 2009 throws com.liferay.portal.kernel.exception.PortalException, 2010 com.liferay.portal.kernel.exception.SystemException { 2011 getService().restoreFileShortcutFromTrash(fileShortcutId); 2012 } 2013 2014 /** 2015 * Restores the folder with the primary key from the trash portlet. 2016 * 2017 * @param folderId the primary key of the folder 2018 * @throws PortalException if the folder could not be found 2019 * @throws SystemException if a system exception occurred 2020 */ 2021 public static void restoreFolderFromTrash(long folderId) 2022 throws com.liferay.portal.kernel.exception.PortalException, 2023 com.liferay.portal.kernel.exception.SystemException { 2024 getService().restoreFolderFromTrash(folderId); 2025 } 2026 2027 /** 2028 * Reverts the file entry to a previous version. A new version will be 2029 * created based on the previous version and metadata. 2030 * 2031 * @param fileEntryId the primary key of the file entry 2032 * @param version the version to revert back to 2033 * @param serviceContext the service context to be applied 2034 * @throws PortalException if the file entry or version could not be found 2035 * @throws SystemException if a system exception occurred 2036 */ 2037 public static void revertFileEntry(long fileEntryId, 2038 java.lang.String version, 2039 com.liferay.portal.service.ServiceContext serviceContext) 2040 throws com.liferay.portal.kernel.exception.PortalException, 2041 com.liferay.portal.kernel.exception.SystemException { 2042 getService().revertFileEntry(fileEntryId, version, serviceContext); 2043 } 2044 2045 public static com.liferay.portal.kernel.search.Hits search( 2046 long repositoryId, long creatorUserId, int status, int start, int end) 2047 throws com.liferay.portal.kernel.exception.PortalException, 2048 com.liferay.portal.kernel.exception.SystemException { 2049 return getService() 2050 .search(repositoryId, creatorUserId, status, start, end); 2051 } 2052 2053 public static com.liferay.portal.kernel.search.Hits search( 2054 long repositoryId, long creatorUserId, long folderId, 2055 java.lang.String[] mimeTypes, int status, int start, int end) 2056 throws com.liferay.portal.kernel.exception.PortalException, 2057 com.liferay.portal.kernel.exception.SystemException { 2058 return getService() 2059 .search(repositoryId, creatorUserId, folderId, mimeTypes, 2060 status, start, end); 2061 } 2062 2063 public static com.liferay.portal.kernel.search.Hits search( 2064 long repositoryId, 2065 com.liferay.portal.kernel.search.SearchContext searchContext) 2066 throws com.liferay.portal.kernel.search.SearchException { 2067 return getService().search(repositoryId, searchContext); 2068 } 2069 2070 public static com.liferay.portal.kernel.search.Hits search( 2071 long repositoryId, 2072 com.liferay.portal.kernel.search.SearchContext searchContext, 2073 com.liferay.portal.kernel.search.Query query) 2074 throws com.liferay.portal.kernel.search.SearchException { 2075 return getService().search(repositoryId, searchContext, query); 2076 } 2077 2078 /** 2079 * Subscribe the user to changes in documents of the file entry type. This 2080 * method is only supported by the Liferay repository. 2081 * 2082 * @param groupId the primary key of the file entry type's group 2083 * @param fileEntryTypeId the primary key of the file entry type 2084 * @throws PortalException if the user or group could not be found, or if 2085 subscribing was not permissible 2086 * @throws SystemException if a system exception occurred 2087 */ 2088 public static void subscribeFileEntryType(long groupId, long fileEntryTypeId) 2089 throws com.liferay.portal.kernel.exception.PortalException, 2090 com.liferay.portal.kernel.exception.SystemException { 2091 getService().subscribeFileEntryType(groupId, fileEntryTypeId); 2092 } 2093 2094 /** 2095 * Subscribe the user to document changes in the folder. This method is only 2096 * supported by the Liferay repository. 2097 * 2098 * @param groupId the primary key of the folder's group 2099 * @param folderId the primary key of the folder 2100 * @throws PortalException if the user or group could not be found, or if 2101 subscribing was not permissible 2102 * @throws SystemException if a system exception occurred 2103 */ 2104 public static void subscribeFolder(long groupId, long folderId) 2105 throws com.liferay.portal.kernel.exception.PortalException, 2106 com.liferay.portal.kernel.exception.SystemException { 2107 getService().subscribeFolder(groupId, folderId); 2108 } 2109 2110 /** 2111 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 2112 boolean, String, ServiceContext)}. 2113 */ 2114 public static void unlockFileEntry(long fileEntryId) 2115 throws com.liferay.portal.kernel.exception.PortalException, 2116 com.liferay.portal.kernel.exception.SystemException { 2117 getService().unlockFileEntry(fileEntryId); 2118 } 2119 2120 /** 2121 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 2122 String)}. 2123 */ 2124 public static void unlockFileEntry(long fileEntryId, 2125 java.lang.String lockUuid) 2126 throws com.liferay.portal.kernel.exception.PortalException, 2127 com.liferay.portal.kernel.exception.SystemException { 2128 getService().unlockFileEntry(fileEntryId, lockUuid); 2129 } 2130 2131 /** 2132 * Unlocks the folder. This method is primarily used by WebDAV. 2133 * 2134 * @param repositoryId the primary key of the repository 2135 * @param folderId the primary key of the folder 2136 * @param lockUuid the lock's UUID 2137 * @throws PortalException if the repository or folder could not be found 2138 * @throws SystemException if a system exception occurred 2139 */ 2140 public static void unlockFolder(long repositoryId, long folderId, 2141 java.lang.String lockUuid) 2142 throws com.liferay.portal.kernel.exception.PortalException, 2143 com.liferay.portal.kernel.exception.SystemException { 2144 getService().unlockFolder(repositoryId, folderId, lockUuid); 2145 } 2146 2147 /** 2148 * Unlocks the folder. This method is primarily used by WebDAV. 2149 * 2150 * @param repositoryId the primary key of the repository 2151 * @param parentFolderId the primary key of the parent folder 2152 * @param name the folder's name 2153 * @param lockUuid the lock's UUID 2154 * @throws PortalException if the repository or folder could not be found 2155 * @throws SystemException if a system exception occurred 2156 */ 2157 public static void unlockFolder(long repositoryId, long parentFolderId, 2158 java.lang.String name, java.lang.String lockUuid) 2159 throws com.liferay.portal.kernel.exception.PortalException, 2160 com.liferay.portal.kernel.exception.SystemException { 2161 getService().unlockFolder(repositoryId, parentFolderId, name, lockUuid); 2162 } 2163 2164 /** 2165 * Unsubscribe the user from changes in documents of the file entry type. 2166 * This method is only supported by the Liferay repository. 2167 * 2168 * @param groupId the primary key of the file entry type's group 2169 * @param fileEntryTypeId the primary key of the file entry type 2170 * @throws PortalException if the user or group could not be found, or if 2171 unsubscribing was not permissible 2172 * @throws SystemException if a system exception occurred 2173 */ 2174 public static void unsubscribeFileEntryType(long groupId, 2175 long fileEntryTypeId) 2176 throws com.liferay.portal.kernel.exception.PortalException, 2177 com.liferay.portal.kernel.exception.SystemException { 2178 getService().unsubscribeFileEntryType(groupId, fileEntryTypeId); 2179 } 2180 2181 /** 2182 * Unsubscribe the user from document changes in the folder. This method is 2183 * only supported by the Liferay repository. 2184 * 2185 * @param groupId the primary key of the folder's group 2186 * @param folderId the primary key of the folder 2187 * @throws PortalException if the user or group could not be found, or if 2188 unsubscribing was not permissible 2189 * @throws SystemException if a system exception occurred 2190 */ 2191 public static void unsubscribeFolder(long groupId, long folderId) 2192 throws com.liferay.portal.kernel.exception.PortalException, 2193 com.liferay.portal.kernel.exception.SystemException { 2194 getService().unsubscribeFolder(groupId, folderId); 2195 } 2196 2197 /** 2198 * Updates a file entry and associated metadata based on a byte array 2199 * object. If the file data is <code>null</code>, then only the associated 2200 * metadata (i.e., <code>title</code>, <code>description</code>, and 2201 * parameters in the <code>serviceContext</code>) will be updated. 2202 * 2203 * <p> 2204 * This method takes two file names, the <code>sourceFileName</code> and the 2205 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 2206 * name of the actual file being uploaded. The <code>title</code> 2207 * corresponds to a name the client wishes to assign this file after it has 2208 * been uploaded to the portal. 2209 * </p> 2210 * 2211 * @param fileEntryId the primary key of the file entry 2212 * @param sourceFileName the original file's name (optionally 2213 <code>null</code>) 2214 * @param mimeType the file's MIME type (optionally <code>null</code>) 2215 * @param title the new name to be assigned to the file (optionally <code> 2216 <code>null</code></code>) 2217 * @param description the file's new description 2218 * @param changeLog the file's version change log (optionally 2219 <code>null</code>) 2220 * @param majorVersion whether the new file version is a major version 2221 * @param bytes the file's data (optionally <code>null</code>) 2222 * @param serviceContext the service context to be applied. Can set the 2223 asset category IDs, asset tag names, and expando bridge 2224 attributes for the file entry. In a Liferay repository, it may 2225 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 2226 type </li> <li> fieldsMap - mapping for fields associated with a 2227 custom file entry type </li> </ul> 2228 * @return the file entry 2229 * @throws PortalException if the file entry could not be found 2230 * @throws SystemException if a system exception occurred 2231 */ 2232 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 2233 long fileEntryId, java.lang.String sourceFileName, 2234 java.lang.String mimeType, java.lang.String title, 2235 java.lang.String description, java.lang.String changeLog, 2236 boolean majorVersion, byte[] bytes, 2237 com.liferay.portal.service.ServiceContext serviceContext) 2238 throws com.liferay.portal.kernel.exception.PortalException, 2239 com.liferay.portal.kernel.exception.SystemException { 2240 return getService() 2241 .updateFileEntry(fileEntryId, sourceFileName, mimeType, 2242 title, description, changeLog, majorVersion, bytes, serviceContext); 2243 } 2244 2245 /** 2246 * Updates a file entry and associated metadata based on a {@link 2247 * java.io.File} object. If the file data is <code>null</code>, then only 2248 * the associated metadata (i.e., <code>title</code>, 2249 * <code>description</code>, and parameters in the 2250 * <code>serviceContext</code>) will be updated. 2251 * 2252 * <p> 2253 * This method takes two file names, the <code>sourceFileName</code> and the 2254 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 2255 * name of the actual file being uploaded. The <code>title</code> 2256 * corresponds to a name the client wishes to assign this file after it has 2257 * been uploaded to the portal. 2258 * </p> 2259 * 2260 * @param fileEntryId the primary key of the file entry 2261 * @param sourceFileName the original file's name (optionally 2262 <code>null</code>) 2263 * @param mimeType the file's MIME type (optionally <code>null</code>) 2264 * @param title the new name to be assigned to the file (optionally <code> 2265 <code>null</code></code>) 2266 * @param description the file's new description 2267 * @param changeLog the file's version change log (optionally 2268 <code>null</code>) 2269 * @param majorVersion whether the new file version is a major version 2270 * @param file EntryId the primary key of the file entry 2271 * @param serviceContext the service context to be applied. Can set the 2272 asset category IDs, asset tag names, and expando bridge 2273 attributes for the file entry. In a Liferay repository, it may 2274 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 2275 type </li> <li> fieldsMap - mapping for fields associated with a 2276 custom file entry type </li> </ul> 2277 * @return the file entry 2278 * @throws PortalException if the file entry could not be found 2279 * @throws SystemException if a system exception occurred 2280 */ 2281 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 2282 long fileEntryId, java.lang.String sourceFileName, 2283 java.lang.String mimeType, java.lang.String title, 2284 java.lang.String description, java.lang.String changeLog, 2285 boolean majorVersion, java.io.File file, 2286 com.liferay.portal.service.ServiceContext serviceContext) 2287 throws com.liferay.portal.kernel.exception.PortalException, 2288 com.liferay.portal.kernel.exception.SystemException { 2289 return getService() 2290 .updateFileEntry(fileEntryId, sourceFileName, mimeType, 2291 title, description, changeLog, majorVersion, file, serviceContext); 2292 } 2293 2294 /** 2295 * Updates a file entry and associated metadata based on an {@link java.io. 2296 * InputStream} object. If the file data is <code>null</code>, then only the 2297 * associated metadata (i.e., <code>title</code>, <code>description</code>, 2298 * and parameters in the <code>serviceContext</code>) will be updated. 2299 * 2300 * <p> 2301 * This method takes two file names, the <code>sourceFileName</code> and the 2302 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 2303 * name of the actual file being uploaded. The <code>title</code> 2304 * corresponds to a name the client wishes to assign this file after it has 2305 * been uploaded to the portal. 2306 * </p> 2307 * 2308 * @param fileEntryId the primary key of the file entry 2309 * @param sourceFileName the original file's name (optionally 2310 <code>null</code>) 2311 * @param mimeType the file's MIME type (optionally <code>null</code>) 2312 * @param title the new name to be assigned to the file (optionally <code> 2313 <code>null</code></code>) 2314 * @param description the file's new description 2315 * @param changeLog the file's version change log (optionally 2316 <code>null</code>) 2317 * @param majorVersion whether the new file version is a major version 2318 * @param is the file's data (optionally <code>null</code>) 2319 * @param size the file's size (optionally <code>0</code>) 2320 * @param serviceContext the service context to be applied. Can set the 2321 asset category IDs, asset tag names, and expando bridge 2322 attributes for the file entry. In a Liferay repository, it may 2323 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 2324 type </li> <li> fieldsMap - mapping for fields associated with a 2325 custom file entry type </li> </ul> 2326 * @return the file entry 2327 * @throws PortalException if the file entry could not be found 2328 * @throws SystemException if a system exception occurred 2329 */ 2330 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 2331 long fileEntryId, java.lang.String sourceFileName, 2332 java.lang.String mimeType, java.lang.String title, 2333 java.lang.String description, java.lang.String changeLog, 2334 boolean majorVersion, java.io.InputStream is, long size, 2335 com.liferay.portal.service.ServiceContext serviceContext) 2336 throws com.liferay.portal.kernel.exception.PortalException, 2337 com.liferay.portal.kernel.exception.SystemException { 2338 return getService() 2339 .updateFileEntry(fileEntryId, sourceFileName, mimeType, 2340 title, description, changeLog, majorVersion, is, size, 2341 serviceContext); 2342 } 2343 2344 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn( 2345 long fileEntryId, java.lang.String sourceFileName, 2346 java.lang.String mimeType, java.lang.String title, 2347 java.lang.String description, java.lang.String changeLog, 2348 boolean majorVersion, java.io.File file, 2349 com.liferay.portal.service.ServiceContext serviceContext) 2350 throws com.liferay.portal.kernel.exception.PortalException, 2351 com.liferay.portal.kernel.exception.SystemException { 2352 return getService() 2353 .updateFileEntryAndCheckIn(fileEntryId, sourceFileName, 2354 mimeType, title, description, changeLog, majorVersion, file, 2355 serviceContext); 2356 } 2357 2358 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn( 2359 long fileEntryId, java.lang.String sourceFileName, 2360 java.lang.String mimeType, java.lang.String title, 2361 java.lang.String description, java.lang.String changeLog, 2362 boolean majorVersion, java.io.InputStream is, long size, 2363 com.liferay.portal.service.ServiceContext serviceContext) 2364 throws com.liferay.portal.kernel.exception.PortalException, 2365 com.liferay.portal.kernel.exception.SystemException { 2366 return getService() 2367 .updateFileEntryAndCheckIn(fileEntryId, sourceFileName, 2368 mimeType, title, description, changeLog, majorVersion, is, size, 2369 serviceContext); 2370 } 2371 2372 /** 2373 * Updates a file shortcut to the existing file entry. This method is only 2374 * supported by the Liferay repository. 2375 * 2376 * @param fileShortcutId the primary key of the file shortcut 2377 * @param folderId the primary key of the file shortcut's parent folder 2378 * @param toFileEntryId the primary key of the file shortcut's file entry 2379 * @param serviceContext the service context to be applied. Can set the 2380 asset category IDs, asset tag names, and expando bridge 2381 attributes for the file entry. 2382 * @return the file shortcut 2383 * @throws PortalException if the file shortcut, folder, or file entry could 2384 not be found 2385 * @throws SystemException if a system exception occurred 2386 */ 2387 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut( 2388 long fileShortcutId, long folderId, long toFileEntryId, 2389 com.liferay.portal.service.ServiceContext serviceContext) 2390 throws com.liferay.portal.kernel.exception.PortalException, 2391 com.liferay.portal.kernel.exception.SystemException { 2392 return getService() 2393 .updateFileShortcut(fileShortcutId, folderId, toFileEntryId, 2394 serviceContext); 2395 } 2396 2397 /** 2398 * Updates the folder. 2399 * 2400 * @param folderId the primary key of the folder 2401 * @param name the folder's new name 2402 * @param description the folder's new description 2403 * @param serviceContext the service context to be applied. In a Liferay 2404 repository, it may include: <ul> <li> defaultFileEntryTypeId - 2405 the file entry type to default all Liferay file entries to </li> 2406 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 2407 comma-delimited list of file entry type primary keys allowed in 2408 the given folder and all descendants </li> <li> 2409 overrideFileEntryTypes - boolean specifying whether to override 2410 ancestral folder's restriction of file entry types allowed </li> 2411 <li> workflowDefinitionXYZ - the workflow definition name 2412 specified per file entry type. The parameter name must be the 2413 string <code>workflowDefinition</code> appended by the <code> 2414 fileEntryTypeId</code> (optionally <code>0</code>). </li> </ul> 2415 * @return the folder 2416 * @throws PortalException if the current or new parent folder could not be 2417 found or if the new parent folder's information was invalid 2418 * @throws SystemException if a system exception occurred 2419 */ 2420 public static com.liferay.portal.kernel.repository.model.Folder updateFolder( 2421 long folderId, java.lang.String name, java.lang.String description, 2422 com.liferay.portal.service.ServiceContext serviceContext) 2423 throws com.liferay.portal.kernel.exception.PortalException, 2424 com.liferay.portal.kernel.exception.SystemException { 2425 return getService() 2426 .updateFolder(folderId, name, description, serviceContext); 2427 } 2428 2429 /** 2430 * Returns <code>true</code> if the file entry is checked out. This method 2431 * is primarily used by WebDAV. 2432 * 2433 * @param repositoryId the primary key for the repository 2434 * @param fileEntryId the primary key for the file entry 2435 * @param lockUuid the lock's UUID 2436 * @return <code>true</code> if the file entry is checked out; 2437 <code>false</code> otherwise 2438 * @throws PortalException if the file entry could not be found 2439 * @throws SystemException if a system exception occurred 2440 */ 2441 public static boolean verifyFileEntryCheckOut(long repositoryId, 2442 long fileEntryId, java.lang.String lockUuid) 2443 throws com.liferay.portal.kernel.exception.PortalException, 2444 com.liferay.portal.kernel.exception.SystemException { 2445 return getService() 2446 .verifyFileEntryCheckOut(repositoryId, fileEntryId, lockUuid); 2447 } 2448 2449 public static boolean verifyFileEntryLock(long repositoryId, 2450 long fileEntryId, java.lang.String lockUuid) 2451 throws com.liferay.portal.kernel.exception.PortalException, 2452 com.liferay.portal.kernel.exception.SystemException { 2453 return getService() 2454 .verifyFileEntryLock(repositoryId, fileEntryId, lockUuid); 2455 } 2456 2457 /** 2458 * Returns <code>true</code> if the inheritable lock exists. This method is 2459 * primarily used by WebDAV. 2460 * 2461 * @param repositoryId the primary key for the repository 2462 * @param folderId the primary key for the folder 2463 * @param lockUuid the lock's UUID 2464 * @return <code>true</code> if the inheritable lock exists; 2465 <code>false</code> otherwise 2466 * @throws PortalException if the folder could not be found 2467 * @throws SystemException if a system exception occurred 2468 */ 2469 public static boolean verifyInheritableLock(long repositoryId, 2470 long folderId, java.lang.String lockUuid) 2471 throws com.liferay.portal.kernel.exception.PortalException, 2472 com.liferay.portal.kernel.exception.SystemException { 2473 return getService() 2474 .verifyInheritableLock(repositoryId, folderId, lockUuid); 2475 } 2476 2477 public static DLAppService getService() { 2478 if (_service == null) { 2479 _service = (DLAppService)PortalBeanLocatorUtil.locate(DLAppService.class.getName()); 2480 2481 ReferenceRegistry.registerReference(DLAppServiceUtil.class, 2482 "_service"); 2483 } 2484 2485 return _service; 2486 } 2487 2488 /** 2489 * @deprecated As of 6.2.0 2490 */ 2491 public void setService(DLAppService service) { 2492 } 2493 2494 private static DLAppService _service; 2495 }