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