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