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