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