001 /** 002 * Copyright (c) 2000-2011 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 in the folder. 740 * 741 * @param repositoryId the primary key of the file entry's repository 742 * @param folderId the primary key of the file entry's folder 743 * @return the number of file entries in the folder 744 * @throws PortalException if the folder could not be found 745 * @throws SystemException if a system exception occurred 746 */ 747 public static int getFileEntriesCount(long repositoryId, long folderId) 748 throws com.liferay.portal.kernel.exception.PortalException, 749 com.liferay.portal.kernel.exception.SystemException { 750 return getService().getFileEntriesCount(repositoryId, folderId); 751 } 752 753 /** 754 * Returns the number of file entries with the file entry type in the 755 * folder. 756 * 757 * @param repositoryId the primary key of the file entry's repository 758 * @param folderId the primary key of the file entry's folder 759 * @param fileEntryTypeId the primary key of the file entry type 760 * @return the number of file entries with the file entry type in the folder 761 * @throws PortalException if the folder could not be found 762 * @throws SystemException if a system exception occurred 763 */ 764 public static int getFileEntriesCount(long repositoryId, long folderId, 765 long fileEntryTypeId) 766 throws com.liferay.portal.kernel.exception.PortalException, 767 com.liferay.portal.kernel.exception.SystemException { 768 return getService() 769 .getFileEntriesCount(repositoryId, folderId, fileEntryTypeId); 770 } 771 772 /** 773 * Returns the file entry with the primary key. 774 * 775 * @param fileEntryId the primary key of the file entry 776 * @return the file entry with the primary key 777 * @throws PortalException if the file entry could not be found 778 * @throws SystemException if a system exception occurred 779 */ 780 public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 781 long fileEntryId) 782 throws com.liferay.portal.kernel.exception.PortalException, 783 com.liferay.portal.kernel.exception.SystemException { 784 return getService().getFileEntry(fileEntryId); 785 } 786 787 /** 788 * Returns the file entry with the title in the folder. 789 * 790 * @param groupId the primary key of the file entry's group 791 * @param folderId the primary key of the file entry's folder 792 * @param title the file entry's title 793 * @return the file entry with the title in the folder 794 * @throws PortalException if the file entry could not be found 795 * @throws SystemException if a system exception occurred 796 */ 797 public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 798 long groupId, long folderId, java.lang.String title) 799 throws com.liferay.portal.kernel.exception.PortalException, 800 com.liferay.portal.kernel.exception.SystemException { 801 return getService().getFileEntry(groupId, folderId, title); 802 } 803 804 /** 805 * Returns the file entry with the UUID and group. 806 * 807 * @param uuid the file entry's universally unique identifier 808 * @param groupId the primary key of the file entry's group 809 * @return the file entry with the UUID and group 810 * @throws PortalException if the file entry could not be found 811 * @throws SystemException if a system exception occurred 812 */ 813 public static com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId( 814 java.lang.String uuid, long groupId) 815 throws com.liferay.portal.kernel.exception.PortalException, 816 com.liferay.portal.kernel.exception.SystemException { 817 return getService().getFileEntryByUuidAndGroupId(uuid, groupId); 818 } 819 820 /** 821 * Returns the file shortcut with the primary key. This method is only 822 * supported by the Liferay repository. 823 * 824 * @param fileShortcutId the primary key of the file shortcut 825 * @return the file shortcut with the primary key 826 * @throws PortalException if the file shortcut could not be found 827 * @throws SystemException if a system exception occurred 828 */ 829 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut( 830 long fileShortcutId) 831 throws com.liferay.portal.kernel.exception.PortalException, 832 com.liferay.portal.kernel.exception.SystemException { 833 return getService().getFileShortcut(fileShortcutId); 834 } 835 836 /** 837 * Returns the folder with the primary key. 838 * 839 * @param folderId the primary key of the folder 840 * @return the folder with the primary key 841 * @throws PortalException if the folder could not be found 842 * @throws SystemException if a system exception occurred 843 */ 844 public static com.liferay.portal.kernel.repository.model.Folder getFolder( 845 long folderId) 846 throws com.liferay.portal.kernel.exception.PortalException, 847 com.liferay.portal.kernel.exception.SystemException { 848 return getService().getFolder(folderId); 849 } 850 851 /** 852 * Returns the folder with the name in the parent folder. 853 * 854 * @param repositoryId the primary key of the folder's repository 855 * @param parentFolderId the primary key of the folder's parent folder 856 * @param name the folder's name 857 * @return the folder with the name in the parent folder 858 * @throws PortalException if the folder could not be found 859 * @throws SystemException if a system exception occurred 860 */ 861 public static com.liferay.portal.kernel.repository.model.Folder getFolder( 862 long repositoryId, long parentFolderId, java.lang.String name) 863 throws com.liferay.portal.kernel.exception.PortalException, 864 com.liferay.portal.kernel.exception.SystemException { 865 return getService().getFolder(repositoryId, parentFolderId, name); 866 } 867 868 /** 869 * Returns all immediate subfolders of the parent folder. 870 * 871 * @param repositoryId the primary key of the folder's repository 872 * @param parentFolderId the primary key of the folder's parent folder 873 * @return the immediate subfolders of the parent folder 874 * @throws PortalException if the parent folder could not be found 875 * @throws SystemException if a system exception occurred 876 */ 877 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 878 long repositoryId, long parentFolderId) 879 throws com.liferay.portal.kernel.exception.PortalException, 880 com.liferay.portal.kernel.exception.SystemException { 881 return getService().getFolders(repositoryId, parentFolderId); 882 } 883 884 /** 885 * Returns all immediate subfolders of the parent folder, optionally 886 * including mount folders for third-party repositories. 887 * 888 * @param repositoryId the primary key of the folder's repository 889 * @param parentFolderId the primary key of the folder's parent folder 890 * @param includeMountFolders whether to include mount folders for 891 third-party repositories 892 * @return the immediate subfolders of the parent folder 893 * @throws PortalException if the parent folder could not be found 894 * @throws SystemException if a system exception occurred 895 */ 896 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 897 long repositoryId, long parentFolderId, boolean includeMountFolders) 898 throws com.liferay.portal.kernel.exception.PortalException, 899 com.liferay.portal.kernel.exception.SystemException { 900 return getService() 901 .getFolders(repositoryId, parentFolderId, includeMountFolders); 902 } 903 904 /** 905 * Returns a range of all the immediate subfolders of the parent folder, 906 * optionally including mount folders for third-party repositories. 907 * 908 * <p> 909 * Useful when paginating results. Returns a maximum of <code>end - 910 * start</code> instances. <code>start</code> and <code>end</code> are not 911 * primary keys, they are indexes in the result set. Thus, <code>0</code> 912 * refers to the first result in the set. Setting both <code>start</code> 913 * and <code>end</code> to {@link 914 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 915 * result set. 916 * </p> 917 * 918 * @param repositoryId the primary key of the folder's repository 919 * @param parentFolderId the primary key of the folder's parent folder 920 * @param includeMountFolders whether to include mount folders for 921 third-party repositories 922 * @param start the lower bound of the range of results 923 * @param end the upper bound of the range of results (not inclusive) 924 * @return the range of immediate subfolders of the parent folder 925 * @throws PortalException if the parent folder could not be found 926 * @throws SystemException if a system exception occurred 927 */ 928 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 929 long repositoryId, long parentFolderId, boolean includeMountFolders, 930 int start, int end) 931 throws com.liferay.portal.kernel.exception.PortalException, 932 com.liferay.portal.kernel.exception.SystemException { 933 return getService() 934 .getFolders(repositoryId, parentFolderId, 935 includeMountFolders, start, end); 936 } 937 938 /** 939 * Returns an ordered range of all the immediate subfolders of the parent 940 * folder. 941 * 942 * <p> 943 * Useful when paginating results. Returns a maximum of <code>end - 944 * start</code> instances. <code>start</code> and <code>end</code> are not 945 * primary keys, they are indexes in the result set. Thus, <code>0</code> 946 * refers to the first result in the set. Setting both <code>start</code> 947 * and <code>end</code> to {@link 948 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 949 * result set. 950 * </p> 951 * 952 * @param repositoryId the primary key of the folder's repository 953 * @param parentFolderId the primary key of the folder's parent folder 954 * @param includeMountFolders whether to include mount folders for 955 third-party repositories 956 * @param start the lower bound of the range of results 957 * @param end the upper bound of the range of results (not inclusive) 958 * @param obc the comparator to order the folders (optionally 959 <code>null</code>) 960 * @return the range of immediate subfolders of the parent folder ordered by 961 comparator <code>obc</code> 962 * @throws PortalException if the parent folder could not be found 963 * @throws SystemException if a system exception occurred 964 */ 965 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 966 long repositoryId, long parentFolderId, boolean includeMountFolders, 967 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 968 throws com.liferay.portal.kernel.exception.PortalException, 969 com.liferay.portal.kernel.exception.SystemException { 970 return getService() 971 .getFolders(repositoryId, parentFolderId, 972 includeMountFolders, start, end, obc); 973 } 974 975 /** 976 * Returns a range of all the immediate subfolders of the parent folder. 977 * 978 * <p> 979 * Useful when paginating results. Returns a maximum of <code>end - 980 * start</code> instances. <code>start</code> and <code>end</code> are not 981 * primary keys, they are indexes in the result set. Thus, <code>0</code> 982 * refers to the first result in the set. Setting both <code>start</code> 983 * and <code>end</code> to {@link 984 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 985 * result set. 986 * </p> 987 * 988 * @param repositoryId the primary key of the folder's repository 989 * @param parentFolderId the primary key of the folder's parent folder 990 * @param start the lower bound of the range of results 991 * @param end the upper bound of the range of results (not inclusive) 992 * @return the range of immediate subfolders of the parent folder 993 * @throws PortalException if the parent folder could not be found 994 * @throws SystemException if a system exception occurred 995 */ 996 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 997 long repositoryId, long parentFolderId, int start, int end) 998 throws com.liferay.portal.kernel.exception.PortalException, 999 com.liferay.portal.kernel.exception.SystemException { 1000 return getService().getFolders(repositoryId, parentFolderId, start, end); 1001 } 1002 1003 /** 1004 * Returns an ordered range of all the immediate subfolders of the parent 1005 * folder. 1006 * 1007 * <p> 1008 * Useful when paginating results. Returns a maximum of <code>end - 1009 * start</code> instances. <code>start</code> and <code>end</code> are not 1010 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1011 * refers to the first result in the set. Setting both <code>start</code> 1012 * and <code>end</code> to {@link 1013 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1014 * result set. 1015 * </p> 1016 * 1017 * @param repositoryId the primary key of the folder's repository 1018 * @param parentFolderId the primary key of the folder's parent folder 1019 * @param start the lower bound of the range of results 1020 * @param end the upper bound of the range of results (not inclusive) 1021 * @param obc the comparator to order the folders (optionally 1022 <code>null</code>) 1023 * @return the range of immediate subfolders of the parent folder ordered by 1024 comparator <code>obc</code> 1025 * @throws PortalException if the parent folder could not be found 1026 * @throws SystemException if a system exception occurred 1027 */ 1028 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 1029 long repositoryId, long parentFolderId, int start, int end, 1030 com.liferay.portal.kernel.util.OrderByComparator obc) 1031 throws com.liferay.portal.kernel.exception.PortalException, 1032 com.liferay.portal.kernel.exception.SystemException { 1033 return getService() 1034 .getFolders(repositoryId, parentFolderId, start, end, obc); 1035 } 1036 1037 /** 1038 * Returns a range of all the immediate subfolders, file entries, and file 1039 * shortcuts in the parent folder. 1040 * 1041 * <p> 1042 * Useful when paginating results. Returns a maximum of <code>end - 1043 * start</code> instances. <code>start</code> and <code>end</code> are not 1044 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1045 * refers to the first result in the set. Setting both <code>start</code> 1046 * and <code>end</code> to {@link 1047 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1048 * result set. 1049 * </p> 1050 * 1051 * @param repositoryId the primary key of the repository 1052 * @param folderId the primary key of the parent folder 1053 * @param status the workflow status 1054 * @param includeMountFolders whether to include mount folders for 1055 third-party repositories 1056 * @param start the lower bound of the range of results 1057 * @param end the upper bound of the range of results (not inclusive) 1058 * @return the range of immediate subfolders, file entries, and file 1059 shortcuts in the parent folder ordered by comparator 1060 <code>obc</code> 1061 * @throws PortalException if the parent folder could not be found 1062 * @throws SystemException if a system exception occurred 1063 */ 1064 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1065 long repositoryId, long folderId, int status, 1066 boolean includeMountFolders, int start, int end) 1067 throws com.liferay.portal.kernel.exception.PortalException, 1068 com.liferay.portal.kernel.exception.SystemException { 1069 return getService() 1070 .getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 1071 folderId, status, includeMountFolders, start, end); 1072 } 1073 1074 /** 1075 * Returns an ordered range of all the immediate subfolders, file entries, 1076 * and file shortcuts in the parent folder. 1077 * 1078 * <p> 1079 * Useful when paginating results. Returns a maximum of <code>end - 1080 * start</code> instances. <code>start</code> and <code>end</code> are not 1081 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1082 * refers to the first result in the set. Setting both <code>start</code> 1083 * and <code>end</code> to {@link 1084 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1085 * result set. 1086 * </p> 1087 * 1088 * @param repositoryId the primary key of the repository 1089 * @param folderId the primary key of the parent folder 1090 * @param status the workflow status 1091 * @param includeMountFolders whether to include mount folders for 1092 third-party repositories 1093 * @param start the lower bound of the range of results 1094 * @param end the upper bound of the range of results (not inclusive) 1095 * @param obc the comparator to order the results (optionally 1096 <code>null</code>) 1097 * @return the range of immediate subfolders, file entries, and file 1098 shortcuts in the parent folder ordered by comparator 1099 <code>obc</code> 1100 * @throws PortalException if the parent folder could not be found 1101 * @throws SystemException if a system exception occurred 1102 */ 1103 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1104 long repositoryId, long folderId, int status, 1105 boolean includeMountFolders, int start, int end, 1106 com.liferay.portal.kernel.util.OrderByComparator obc) 1107 throws com.liferay.portal.kernel.exception.PortalException, 1108 com.liferay.portal.kernel.exception.SystemException { 1109 return getService() 1110 .getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 1111 folderId, status, includeMountFolders, start, end, obc); 1112 } 1113 1114 public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1115 long repositoryId, long folderId, int status, 1116 java.lang.String[] mimeTypes, boolean includeMountFolders, int start, 1117 int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1118 throws com.liferay.portal.kernel.exception.PortalException, 1119 com.liferay.portal.kernel.exception.SystemException { 1120 return getService() 1121 .getFoldersAndFileEntriesAndFileShortcuts(repositoryId, 1122 folderId, status, mimeTypes, includeMountFolders, start, end, obc); 1123 } 1124 1125 /** 1126 * Returns the number of immediate subfolders, file entries, and file 1127 * shortcuts in the parent folder. 1128 * 1129 * @param repositoryId the primary key of the repository 1130 * @param folderId the primary key of the parent folder 1131 * @param status the workflow status 1132 * @param includeMountFolders whether to include mount folders for 1133 third-party repositories 1134 * @return the number of immediate subfolders, file entries, and file 1135 shortcuts in the parent folder 1136 * @throws PortalException if the folder could not be found 1137 * @throws SystemException if a system exception occurred 1138 */ 1139 public static int getFoldersAndFileEntriesAndFileShortcutsCount( 1140 long repositoryId, long folderId, int status, 1141 boolean includeMountFolders) 1142 throws com.liferay.portal.kernel.exception.PortalException, 1143 com.liferay.portal.kernel.exception.SystemException { 1144 return getService() 1145 .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 1146 folderId, status, includeMountFolders); 1147 } 1148 1149 public static int getFoldersAndFileEntriesAndFileShortcutsCount( 1150 long repositoryId, long folderId, int status, 1151 java.lang.String[] mimeTypes, boolean includeMountFolders) 1152 throws com.liferay.portal.kernel.exception.PortalException, 1153 com.liferay.portal.kernel.exception.SystemException { 1154 return getService() 1155 .getFoldersAndFileEntriesAndFileShortcutsCount(repositoryId, 1156 folderId, status, mimeTypes, includeMountFolders); 1157 } 1158 1159 /** 1160 * Returns the number of immediate subfolders of the parent folder. 1161 * 1162 * @param repositoryId the primary key of the folder's repository 1163 * @param parentFolderId the primary key of the folder's parent folder 1164 * @return the number of immediate subfolders of the parent folder 1165 * @throws PortalException if the parent folder could not be found 1166 * @throws SystemException if a system exception occurred 1167 */ 1168 public static int getFoldersCount(long repositoryId, long parentFolderId) 1169 throws com.liferay.portal.kernel.exception.PortalException, 1170 com.liferay.portal.kernel.exception.SystemException { 1171 return getService().getFoldersCount(repositoryId, parentFolderId); 1172 } 1173 1174 /** 1175 * Returns the number of immediate subfolders of the parent folder, 1176 * optionally including mount folders for third-party repositories. 1177 * 1178 * @param repositoryId the primary key of the folder's repository 1179 * @param parentFolderId the primary key of the folder's parent folder 1180 * @param includeMountFolders whether to include mount folders for 1181 third-party repositories 1182 * @return the number of immediate subfolders of the parent folder 1183 * @throws PortalException if the parent folder could not be found 1184 * @throws SystemException if a system exception occurred 1185 */ 1186 public static int getFoldersCount(long repositoryId, long parentFolderId, 1187 boolean includeMountFolders) 1188 throws com.liferay.portal.kernel.exception.PortalException, 1189 com.liferay.portal.kernel.exception.SystemException { 1190 return getService() 1191 .getFoldersCount(repositoryId, parentFolderId, 1192 includeMountFolders); 1193 } 1194 1195 /** 1196 * Returns the number of immediate subfolders and file entries across the 1197 * folders. 1198 * 1199 * @param repositoryId the primary key of the repository 1200 * @param folderIds the primary keys of folders from which to count 1201 immediate subfolders and file entries 1202 * @param status the workflow status 1203 * @return the number of immediate subfolders and file entries across the 1204 folders 1205 * @throws PortalException if the repository could not be found 1206 * @throws SystemException if a system exception occurred 1207 */ 1208 public static int getFoldersFileEntriesCount(long repositoryId, 1209 java.util.List<java.lang.Long> folderIds, int status) 1210 throws com.liferay.portal.kernel.exception.PortalException, 1211 com.liferay.portal.kernel.exception.SystemException { 1212 return getService() 1213 .getFoldersFileEntriesCount(repositoryId, folderIds, status); 1214 } 1215 1216 /** 1217 * Returns an ordered range of all the file entries in the group starting at 1218 * the repository default parent folder that are stored within the Liferay 1219 * repository. This method is primarily used to search for recently modified 1220 * file entries. It can be limited to the file entries modified by a given 1221 * user. 1222 * 1223 * <p> 1224 * Useful when paginating results. Returns a maximum of <code>end - 1225 * start</code> instances. <code>start</code> and <code>end</code> are not 1226 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1227 * refers to the first result in the set. Setting both <code>start</code> 1228 * and <code>end</code> to {@link 1229 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1230 * result set. 1231 * </p> 1232 * 1233 * @param groupId the primary key of the group 1234 * @param userId the primary key of the user who created the file 1235 (optionally <code>0</code>) 1236 * @param start the lower bound of the range of results 1237 * @param end the upper bound of the range of results (not inclusive) 1238 * @return the range of matching file entries ordered by date modified 1239 * @throws PortalException if the group could not be found 1240 * @throws SystemException if a system exception occurred 1241 */ 1242 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1243 long groupId, long userId, int start, int end) 1244 throws com.liferay.portal.kernel.exception.PortalException, 1245 com.liferay.portal.kernel.exception.SystemException { 1246 return getService().getGroupFileEntries(groupId, userId, start, end); 1247 } 1248 1249 /** 1250 * Returns an ordered range of all the file entries in the group that are 1251 * stored within the Liferay repository. This method is primarily used to 1252 * search for recently modified file entries. It can be limited to the file 1253 * entries modified by a given user. 1254 * 1255 * <p> 1256 * Useful when paginating results. Returns a maximum of <code>end - 1257 * start</code> instances. <code>start</code> and <code>end</code> are not 1258 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1259 * refers to the first result in the set. Setting both <code>start</code> 1260 * and <code>end</code> to {@link 1261 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1262 * result set. 1263 * </p> 1264 * 1265 * @param groupId the primary key of the group 1266 * @param userId the primary key of the user who created the file 1267 (optionally <code>0</code>) 1268 * @param start the lower bound of the range of results 1269 * @param end the upper bound of the range of results (not inclusive) 1270 * @param obc the comparator to order the file entries (optionally 1271 <code>null</code>) 1272 * @return the range of matching file entries ordered by comparator 1273 <code>obc</code> 1274 * @throws PortalException if the group could not be found 1275 * @throws SystemException if a system exception occurred 1276 */ 1277 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1278 long groupId, long userId, int start, int end, 1279 com.liferay.portal.kernel.util.OrderByComparator obc) 1280 throws com.liferay.portal.kernel.exception.PortalException, 1281 com.liferay.portal.kernel.exception.SystemException { 1282 return getService().getGroupFileEntries(groupId, userId, start, end, obc); 1283 } 1284 1285 /** 1286 * Returns an ordered range of all the file entries in the group starting at 1287 * the root folder that are stored within the Liferay repository. This 1288 * method is primarily used to search for recently modified file entries. It 1289 * can be limited to the file entries modified by a given user. 1290 * 1291 * <p> 1292 * Useful when paginating results. Returns a maximum of <code>end - 1293 * start</code> instances. <code>start</code> and <code>end</code> are not 1294 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1295 * refers to the first result in the set. Setting both <code>start</code> 1296 * and <code>end</code> to {@link 1297 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1298 * result set. 1299 * </p> 1300 * 1301 * @param groupId the primary key of the group 1302 * @param userId the primary key of the user who created the file 1303 (optionally <code>0</code>) 1304 * @param rootFolderId the primary key of the root folder to begin the 1305 search 1306 * @param start the lower bound of the range of results 1307 * @param end the upper bound of the range of results (not inclusive) 1308 * @return the range of matching file entries ordered by date modified 1309 * @throws PortalException if the group could not be found 1310 * @throws SystemException if a system exception occurred 1311 */ 1312 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1313 long groupId, long userId, long rootFolderId, int start, int end) 1314 throws com.liferay.portal.kernel.exception.PortalException, 1315 com.liferay.portal.kernel.exception.SystemException { 1316 return getService() 1317 .getGroupFileEntries(groupId, userId, rootFolderId, start, 1318 end); 1319 } 1320 1321 /** 1322 * Returns an ordered range of all the file entries in the group starting at 1323 * the root folder that are stored within the Liferay repository. This 1324 * method is primarily used to search for recently modified file entries. It 1325 * can be limited to the file entries modified by a given user. 1326 * 1327 * <p> 1328 * Useful when paginating results. Returns a maximum of <code>end - 1329 * start</code> instances. <code>start</code> and <code>end</code> are not 1330 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1331 * refers to the first result in the set. Setting both <code>start</code> 1332 * and <code>end</code> to {@link 1333 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1334 * result set. 1335 * </p> 1336 * 1337 * @param groupId the primary key of the group 1338 * @param userId the primary key of the user who created the file 1339 (optionally <code>0</code>) 1340 * @param rootFolderId the primary key of the root folder to begin the 1341 search 1342 * @param start the lower bound of the range of results 1343 * @param end the upper bound of the range of results (not inclusive) 1344 * @param obc the comparator to order the file entries (optionally 1345 <code>null</code>) 1346 * @return the range of matching file entries ordered by comparator 1347 <code>obc</code> 1348 * @throws PortalException if the group could not be found 1349 * @throws SystemException if a system exception occurred 1350 */ 1351 public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1352 long groupId, long userId, long rootFolderId, int start, int end, 1353 com.liferay.portal.kernel.util.OrderByComparator obc) 1354 throws com.liferay.portal.kernel.exception.PortalException, 1355 com.liferay.portal.kernel.exception.SystemException { 1356 return getService() 1357 .getGroupFileEntries(groupId, userId, rootFolderId, start, 1358 end, obc); 1359 } 1360 1361 /** 1362 * Returns the number of file entries in a group starting at the repository 1363 * default parent folder that are stored within the Liferay repository. This 1364 * method is primarily used to search for recently modified file entries. It 1365 * can be limited to the file entries modified by a given user. 1366 * 1367 * @param groupId the primary key of the group 1368 * @param userId the primary key of the user who created the file 1369 (optionally <code>0</code>) 1370 * @return the number of matching file entries 1371 * @throws PortalException if the group could not be found 1372 * @throws SystemException if a system exception occurred 1373 */ 1374 public static int getGroupFileEntriesCount(long groupId, long userId) 1375 throws com.liferay.portal.kernel.exception.PortalException, 1376 com.liferay.portal.kernel.exception.SystemException { 1377 return getService().getGroupFileEntriesCount(groupId, userId); 1378 } 1379 1380 /** 1381 * Returns the number of file entries in a group starting at the root folder 1382 * that are stored within the Liferay repository. This method is primarily 1383 * used to search for recently modified file entries. It can be limited to 1384 * the file entries modified by a given user. 1385 * 1386 * @param groupId the primary key of the group 1387 * @param userId the primary key of the user who created the file 1388 (optionally <code>0</code>) 1389 * @param rootFolderId the primary key of the root folder to begin the 1390 search 1391 * @return the number of matching file entries 1392 * @throws PortalException if the group could not be found 1393 * @throws SystemException if a system exception occurred 1394 */ 1395 public static int getGroupFileEntriesCount(long groupId, long userId, 1396 long rootFolderId) 1397 throws com.liferay.portal.kernel.exception.PortalException, 1398 com.liferay.portal.kernel.exception.SystemException { 1399 return getService() 1400 .getGroupFileEntriesCount(groupId, userId, rootFolderId); 1401 } 1402 1403 /** 1404 * Returns all immediate subfolders of the parent folder that are used for 1405 * mounting third-party repositories. This method is only supported by the 1406 * Liferay repository. 1407 * 1408 * @param repositoryId the primary key of the folder's repository 1409 * @param parentFolderId the primary key of the folder's parent folder 1410 * @return the immediate subfolders of the parent folder that are used for 1411 mounting third-party repositories 1412 * @throws PortalException if the repository or parent folder could not be 1413 found 1414 * @throws SystemException if a system exception occurred 1415 */ 1416 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1417 long repositoryId, long parentFolderId) 1418 throws com.liferay.portal.kernel.exception.PortalException, 1419 com.liferay.portal.kernel.exception.SystemException { 1420 return getService().getMountFolders(repositoryId, parentFolderId); 1421 } 1422 1423 /** 1424 * Returns a range of all the immediate subfolders of the parent folder that 1425 * are used for mounting third-party repositories. This method is only 1426 * supported by the Liferay repository. 1427 * 1428 * <p> 1429 * Useful when paginating results. Returns a maximum of <code>end - 1430 * start</code> instances. <code>start</code> and <code>end</code> are not 1431 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1432 * refers to the first result in the set. Setting both <code>start</code> 1433 * and <code>end</code> to {@link 1434 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1435 * result set. 1436 * </p> 1437 * 1438 * @param repositoryId the primary key of the repository 1439 * @param parentFolderId the primary key of the parent folder 1440 * @param start the lower bound of the range of results 1441 * @param end the upper bound of the range of results (not inclusive) 1442 * @return the range of immediate subfolders of the parent folder that are 1443 used for mounting third-party repositories 1444 * @throws PortalException if the repository or parent folder could not be 1445 found 1446 * @throws SystemException if a system exception occurred 1447 */ 1448 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1449 long repositoryId, long parentFolderId, int start, int end) 1450 throws com.liferay.portal.kernel.exception.PortalException, 1451 com.liferay.portal.kernel.exception.SystemException { 1452 return getService() 1453 .getMountFolders(repositoryId, parentFolderId, start, end); 1454 } 1455 1456 /** 1457 * Returns an ordered range of all the immediate subfolders of the parent 1458 * folder that are used for mounting third-party repositories. This method 1459 * is only supported by the Liferay repository. 1460 * 1461 * <p> 1462 * Useful when paginating results. Returns a maximum of <code>end - 1463 * start</code> instances. <code>start</code> and <code>end</code> are not 1464 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1465 * refers to the first result in the set. Setting both <code>start</code> 1466 * and <code>end</code> to {@link 1467 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1468 * result set. 1469 * </p> 1470 * 1471 * @param repositoryId the primary key of the folder's repository 1472 * @param parentFolderId the primary key of the folder's parent folder 1473 * @param start the lower bound of the range of results 1474 * @param end the upper bound of the range of results (not inclusive) 1475 * @param obc the comparator to order the folders (optionally 1476 <code>null</code>) 1477 * @return the range of immediate subfolders of the parent folder that are 1478 used for mounting third-party repositories ordered by comparator 1479 <code>obc</code> 1480 * @throws PortalException if the repository or parent folder could not be 1481 found 1482 * @throws SystemException if a system exception occurred 1483 */ 1484 public static java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1485 long repositoryId, long parentFolderId, int start, int end, 1486 com.liferay.portal.kernel.util.OrderByComparator obc) 1487 throws com.liferay.portal.kernel.exception.PortalException, 1488 com.liferay.portal.kernel.exception.SystemException { 1489 return getService() 1490 .getMountFolders(repositoryId, parentFolderId, start, end, 1491 obc); 1492 } 1493 1494 public static void getSubfolderIds(long repositoryId, 1495 java.util.List<java.lang.Long> folderIds, long folderId) 1496 throws com.liferay.portal.kernel.exception.PortalException, 1497 com.liferay.portal.kernel.exception.SystemException { 1498 getService().getSubfolderIds(repositoryId, folderIds, folderId); 1499 } 1500 1501 /** 1502 * Returns all the descendant folders of the folder with the primary key. 1503 * 1504 * @param repositoryId the primary key of the repository 1505 * @param folderId the primary key of the folder 1506 * @return the descendant folders of the folder with the primary key 1507 * @throws PortalException if the repository or parent folder could not be 1508 found 1509 * @throws SystemException if a system exception occurred 1510 */ 1511 public static java.util.List<java.lang.Long> getSubfolderIds( 1512 long repositoryId, long folderId) 1513 throws com.liferay.portal.kernel.exception.PortalException, 1514 com.liferay.portal.kernel.exception.SystemException { 1515 return getService().getSubfolderIds(repositoryId, folderId); 1516 } 1517 1518 /** 1519 * Returns descendant folders of the folder with the primary key, optionally 1520 * limiting to one level deep. 1521 * 1522 * @param repositoryId the primary key of the repository 1523 * @param folderId the primary key of the folder 1524 * @param recurse whether to recurse through each subfolder 1525 * @return the descendant folders of the folder with the primary key 1526 * @throws PortalException if the repository or parent folder could not be 1527 found 1528 * @throws SystemException if a system exception occurred 1529 */ 1530 public static java.util.List<java.lang.Long> getSubfolderIds( 1531 long repositoryId, long folderId, boolean recurse) 1532 throws com.liferay.portal.kernel.exception.PortalException, 1533 com.liferay.portal.kernel.exception.SystemException { 1534 return getService().getSubfolderIds(repositoryId, folderId, recurse); 1535 } 1536 1537 /** 1538 * Returns all the temporary file entry names. 1539 * 1540 * @param groupId the primary key of the group 1541 * @param folderId the primary key of the folder where the file entry will 1542 eventually reside 1543 * @param tempFolderName the temporary folder's name 1544 * @return the temporary file entry names 1545 * @throws PortalException if the folder was invalid 1546 * @throws SystemException if a system exception occurred 1547 * @see #addTempFileEntry(long, long, String, String, File) 1548 * @see com.liferay.portal.kernel.util.TempFileUtil 1549 */ 1550 public static java.lang.String[] getTempFileEntryNames(long groupId, 1551 long folderId, java.lang.String tempFolderName) 1552 throws com.liferay.portal.kernel.exception.PortalException, 1553 com.liferay.portal.kernel.exception.SystemException { 1554 return getService() 1555 .getTempFileEntryNames(groupId, folderId, tempFolderName); 1556 } 1557 1558 /** 1559 * Locks the folder. This method is primarily used by WebDAV. 1560 * 1561 * @param repositoryId the primary key of the repository 1562 * @param folderId the primary key of the folder 1563 * @return the lock object 1564 * @throws PortalException if the repository or folder could not be found 1565 * @throws SystemException if a system exception occurred 1566 */ 1567 public static com.liferay.portal.model.Lock lockFolder(long repositoryId, 1568 long folderId) 1569 throws com.liferay.portal.kernel.exception.PortalException, 1570 com.liferay.portal.kernel.exception.SystemException { 1571 return getService().lockFolder(repositoryId, folderId); 1572 } 1573 1574 /** 1575 * Locks the folder. This method is primarily used by WebDAV. 1576 * 1577 * @param repositoryId the primary key of the repository 1578 * @param folderId the primary key of the folder 1579 * @param owner the owner string for the checkout (optionally 1580 <code>null</code>) 1581 * @param inheritable whether the lock must propagate to descendants 1582 * @param expirationTime the time in milliseconds before the lock expires. 1583 If the value is <code>0</code>, the default expiration time will 1584 be used from <code>portal.properties>. 1585 * @return the lock object 1586 * @throws PortalException if the repository or folder could not be found 1587 * @throws SystemException if a system exception occurred 1588 */ 1589 public static com.liferay.portal.model.Lock lockFolder(long repositoryId, 1590 long folderId, java.lang.String owner, boolean inheritable, 1591 long expirationTime) 1592 throws com.liferay.portal.kernel.exception.PortalException, 1593 com.liferay.portal.kernel.exception.SystemException { 1594 return getService() 1595 .lockFolder(repositoryId, folderId, owner, inheritable, 1596 expirationTime); 1597 } 1598 1599 /** 1600 * Moves the file entry to the new folder. 1601 * 1602 * @param fileEntryId the primary key of the file entry 1603 * @param newFolderId the primary key of the new folder 1604 * @param serviceContext the service context to be applied 1605 * @return the file entry 1606 * @throws PortalException if the file entry or the new folder could not be 1607 found 1608 * @throws SystemException if a system exception occurred 1609 */ 1610 public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry( 1611 long fileEntryId, long newFolderId, 1612 com.liferay.portal.service.ServiceContext serviceContext) 1613 throws com.liferay.portal.kernel.exception.PortalException, 1614 com.liferay.portal.kernel.exception.SystemException { 1615 return getService() 1616 .moveFileEntry(fileEntryId, newFolderId, serviceContext); 1617 } 1618 1619 /** 1620 * Moves the folder to the new parent folder with the primary key. 1621 * 1622 * @param folderId the primary key of the folder 1623 * @param parentFolderId the primary key of the new parent folder 1624 * @param serviceContext the service context to be applied 1625 * @return the file entry 1626 * @throws PortalException if the folder could not be found 1627 * @throws SystemException if a system exception occurred 1628 */ 1629 public static com.liferay.portal.kernel.repository.model.Folder moveFolder( 1630 long folderId, long parentFolderId, 1631 com.liferay.portal.service.ServiceContext serviceContext) 1632 throws com.liferay.portal.kernel.exception.PortalException, 1633 com.liferay.portal.kernel.exception.SystemException { 1634 return getService().moveFolder(folderId, parentFolderId, serviceContext); 1635 } 1636 1637 /** 1638 * Refreshes the lock for the file entry. This method is primarily used by 1639 * WebDAV. 1640 * 1641 * @param lockUuid the lock's universally unique identifier 1642 * @param expirationTime the time in milliseconds before the lock expires. 1643 If the value is <code>0</code>, the default expiration time will 1644 be used from <code>portal.properties>. 1645 * @return the lock object 1646 * @throws PortalException if the file entry or lock could not be found 1647 * @throws SystemException if a system exception occurred 1648 */ 1649 public static com.liferay.portal.model.Lock refreshFileEntryLock( 1650 java.lang.String lockUuid, long expirationTime) 1651 throws com.liferay.portal.kernel.exception.PortalException, 1652 com.liferay.portal.kernel.exception.SystemException { 1653 return getService().refreshFileEntryLock(lockUuid, expirationTime); 1654 } 1655 1656 /** 1657 * Refreshes the lock for the folder. This method is primarily used by 1658 * WebDAV. 1659 * 1660 * @param lockUuid the lock's universally unique identifier 1661 * @param expirationTime the time in milliseconds before the lock expires. 1662 If the value is <code>0</code>, the default expiration time will 1663 be used from <code>portal.properties>. 1664 * @return the lock object 1665 * @throws PortalException if the folder or lock could not be found 1666 * @throws SystemException if a system exception occurred 1667 */ 1668 public static com.liferay.portal.model.Lock refreshFolderLock( 1669 java.lang.String lockUuid, long expirationTime) 1670 throws com.liferay.portal.kernel.exception.PortalException, 1671 com.liferay.portal.kernel.exception.SystemException { 1672 return getService().refreshFolderLock(lockUuid, expirationTime); 1673 } 1674 1675 /** 1676 * Reverts the file entry to a previous version. A new version will be 1677 * created based on the previous version and metadata. 1678 * 1679 * @param fileEntryId the primary key of the file entry 1680 * @param version the version to revert back to 1681 * @param serviceContext the service context to be applied 1682 * @throws PortalException if the file entry or version could not be found 1683 * @throws SystemException if a system exception occurred 1684 */ 1685 public static void revertFileEntry(long fileEntryId, 1686 java.lang.String version, 1687 com.liferay.portal.service.ServiceContext serviceContext) 1688 throws com.liferay.portal.kernel.exception.PortalException, 1689 com.liferay.portal.kernel.exception.SystemException { 1690 getService().revertFileEntry(fileEntryId, version, serviceContext); 1691 } 1692 1693 public static com.liferay.portal.kernel.search.Hits search( 1694 long repositoryId, 1695 com.liferay.portal.kernel.search.SearchContext searchContext) 1696 throws com.liferay.portal.kernel.search.SearchException { 1697 return getService().search(repositoryId, searchContext); 1698 } 1699 1700 public static com.liferay.portal.kernel.search.Hits search( 1701 long repositoryId, 1702 com.liferay.portal.kernel.search.SearchContext searchContext, 1703 com.liferay.portal.kernel.search.Query query) 1704 throws com.liferay.portal.kernel.search.SearchException { 1705 return getService().search(repositoryId, searchContext, query); 1706 } 1707 1708 /** 1709 * Unlocks the folder. This method is primarily used by WebDAV. 1710 * 1711 * @param repositoryId the primary key of the repository 1712 * @param folderId the primary key of the folder 1713 * @param lockUuid the lock's universally unique identifier 1714 * @throws PortalException if the repository or folder could not be found 1715 * @throws SystemException if a system exception occurred 1716 */ 1717 public static void unlockFolder(long repositoryId, long folderId, 1718 java.lang.String lockUuid) 1719 throws com.liferay.portal.kernel.exception.PortalException, 1720 com.liferay.portal.kernel.exception.SystemException { 1721 getService().unlockFolder(repositoryId, folderId, lockUuid); 1722 } 1723 1724 /** 1725 * Unlocks the folder. This method is primarily used by WebDAV. 1726 * 1727 * @param repositoryId the primary key of the repository 1728 * @param parentFolderId the primary key of the parent folder 1729 * @param name the folder's name 1730 * @param lockUuid the lock's universally unique identifier 1731 * @throws PortalException if the repository or folder could not be found 1732 * @throws SystemException if a system exception occurred 1733 */ 1734 public static void unlockFolder(long repositoryId, long parentFolderId, 1735 java.lang.String name, java.lang.String lockUuid) 1736 throws com.liferay.portal.kernel.exception.PortalException, 1737 com.liferay.portal.kernel.exception.SystemException { 1738 getService().unlockFolder(repositoryId, parentFolderId, name, lockUuid); 1739 } 1740 1741 /** 1742 * Updates a file entry and associated metadata based on a byte array 1743 * object. If the file data is <code>null</code>, then only the associated 1744 * metadata (i.e., <code>title</code>, <code>description</code>, and 1745 * parameters in the <code>serviceContext</code>) will be updated. 1746 * 1747 * <p> 1748 * This method takes two file names, the <code>sourceFileName</code> and the 1749 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1750 * name of the actual file being uploaded. The <code>title</code> 1751 * corresponds to a name the client wishes to assign this file after it has 1752 * been uploaded to the portal. 1753 * </p> 1754 * 1755 * @param fileEntryId the primary key of the file entry 1756 * @param sourceFileName the original file's name (optionally 1757 <code>null</code>) 1758 * @param mimeType the file's MIME type (optionally <code>null</code>) 1759 * @param title the new name to be assigned to the file (optionally <code> 1760 <code>null</code></code>) 1761 * @param description the file's new description 1762 * @param changeLog the file's version change log (optionally 1763 <code>null</code>) 1764 * @param majorVersion whether the new file version is a major version 1765 * @param bytes the file's data (optionally <code>null</code>) 1766 * @param serviceContext the service context to be applied. Can set the 1767 asset category IDs, asset tag names, and expando bridge 1768 attributes for the file entry. In a Liferay repository, it may 1769 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1770 type </li> <li> fieldsMap - mapping for fields associated with a 1771 custom file entry type </li> </ul> 1772 * @return the file entry 1773 * @throws PortalException if the file entry could not be found 1774 * @throws SystemException if a system exception occurred 1775 */ 1776 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1777 long fileEntryId, java.lang.String sourceFileName, 1778 java.lang.String mimeType, java.lang.String title, 1779 java.lang.String description, java.lang.String changeLog, 1780 boolean majorVersion, byte[] bytes, 1781 com.liferay.portal.service.ServiceContext serviceContext) 1782 throws com.liferay.portal.kernel.exception.PortalException, 1783 com.liferay.portal.kernel.exception.SystemException { 1784 return getService() 1785 .updateFileEntry(fileEntryId, sourceFileName, mimeType, 1786 title, description, changeLog, majorVersion, bytes, serviceContext); 1787 } 1788 1789 /** 1790 * Updates a file entry and associated metadata based on a {@link File} 1791 * object. If the file data is <code>null</code>, then only the associated 1792 * metadata (i.e., <code>title</code>, <code>description</code>, and 1793 * parameters in the <code>serviceContext</code>) will be updated. 1794 * 1795 * <p> 1796 * This method takes two file names, the <code>sourceFileName</code> and the 1797 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1798 * name of the actual file being uploaded. The <code>title</code> 1799 * corresponds to a name the client wishes to assign this file after it has 1800 * been uploaded to the portal. 1801 * </p> 1802 * 1803 * @param fileEntryId the primary key of the file entry 1804 * @param sourceFileName the original file's name (optionally 1805 <code>null</code>) 1806 * @param mimeType the file's MIME type (optionally <code>null</code>) 1807 * @param title the new name to be assigned to the file (optionally <code> 1808 <code>null</code></code>) 1809 * @param description the file's new description 1810 * @param changeLog the file's version change log (optionally 1811 <code>null</code>) 1812 * @param majorVersion whether the new file version is a major version 1813 * @param file EntryId the primary key of the file entry 1814 * @param serviceContext the service context to be applied. Can set the 1815 asset category IDs, asset tag names, and expando bridge 1816 attributes for the file entry. In a Liferay repository, it may 1817 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1818 type </li> <li> fieldsMap - mapping for fields associated with a 1819 custom file entry type </li> </ul> 1820 * @return the file entry 1821 * @throws PortalException if the file entry could not be found 1822 * @throws SystemException if a system exception occurred 1823 */ 1824 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1825 long fileEntryId, java.lang.String sourceFileName, 1826 java.lang.String mimeType, java.lang.String title, 1827 java.lang.String description, java.lang.String changeLog, 1828 boolean majorVersion, java.io.File file, 1829 com.liferay.portal.service.ServiceContext serviceContext) 1830 throws com.liferay.portal.kernel.exception.PortalException, 1831 com.liferay.portal.kernel.exception.SystemException { 1832 return getService() 1833 .updateFileEntry(fileEntryId, sourceFileName, mimeType, 1834 title, description, changeLog, majorVersion, file, serviceContext); 1835 } 1836 1837 /** 1838 * Updates a file entry and associated metadata based on an {@link 1839 * InputStream} object. If the file data is <code>null</code>, then only the 1840 * associated metadata (i.e., <code>title</code>, <code>description</code>, 1841 * and parameters in the <code>serviceContext</code>) will be updated. 1842 * 1843 * <p> 1844 * This method takes two file names, the <code>sourceFileName</code> and the 1845 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1846 * name of the actual file being uploaded. The <code>title</code> 1847 * corresponds to a name the client wishes to assign this file after it has 1848 * been uploaded to the portal. 1849 * </p> 1850 * 1851 * @param fileEntryId the primary key of the file entry 1852 * @param sourceFileName the original file's name (optionally 1853 <code>null</code>) 1854 * @param mimeType the file's MIME type (optionally <code>null</code>) 1855 * @param title the new name to be assigned to the file (optionally <code> 1856 <code>null</code></code>) 1857 * @param description the file's new description 1858 * @param changeLog the file's version change log (optionally 1859 <code>null</code>) 1860 * @param majorVersion whether the new file version is a major version 1861 * @param is the file's data (optionally <code>null</code>) 1862 * @param size the file's size (optionally <code>0</code>) 1863 * @param serviceContext the service context to be applied. Can set the 1864 asset category IDs, asset tag names, and expando bridge 1865 attributes for the file entry. In a Liferay repository, it may 1866 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1867 type </li> <li> fieldsMap - mapping for fields associated with a 1868 custom file entry type </li> </ul> 1869 * @return the file entry 1870 * @throws PortalException if the file entry could not be found 1871 * @throws SystemException if a system exception occurred 1872 */ 1873 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1874 long fileEntryId, java.lang.String sourceFileName, 1875 java.lang.String mimeType, java.lang.String title, 1876 java.lang.String description, java.lang.String changeLog, 1877 boolean majorVersion, java.io.InputStream is, long size, 1878 com.liferay.portal.service.ServiceContext serviceContext) 1879 throws com.liferay.portal.kernel.exception.PortalException, 1880 com.liferay.portal.kernel.exception.SystemException { 1881 return getService() 1882 .updateFileEntry(fileEntryId, sourceFileName, mimeType, 1883 title, description, changeLog, majorVersion, is, size, 1884 serviceContext); 1885 } 1886 1887 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn( 1888 long fileEntryId, java.lang.String sourceFileName, 1889 java.lang.String mimeType, java.lang.String title, 1890 java.lang.String description, java.lang.String changeLog, 1891 boolean majorVersion, java.io.File file, 1892 com.liferay.portal.service.ServiceContext serviceContext) 1893 throws com.liferay.portal.kernel.exception.PortalException, 1894 com.liferay.portal.kernel.exception.SystemException { 1895 return getService() 1896 .updateFileEntryAndCheckIn(fileEntryId, sourceFileName, 1897 mimeType, title, description, changeLog, majorVersion, file, 1898 serviceContext); 1899 } 1900 1901 public static com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn( 1902 long fileEntryId, java.lang.String sourceFileName, 1903 java.lang.String mimeType, java.lang.String title, 1904 java.lang.String description, java.lang.String changeLog, 1905 boolean majorVersion, java.io.InputStream is, long size, 1906 com.liferay.portal.service.ServiceContext serviceContext) 1907 throws com.liferay.portal.kernel.exception.PortalException, 1908 com.liferay.portal.kernel.exception.SystemException { 1909 return getService() 1910 .updateFileEntryAndCheckIn(fileEntryId, sourceFileName, 1911 mimeType, title, description, changeLog, majorVersion, is, size, 1912 serviceContext); 1913 } 1914 1915 /** 1916 * Updates a file shortcut to the existing file entry. This method is only 1917 * supported by the Liferay repository. 1918 * 1919 * @param fileShortcutId the primary key of the file shortcut 1920 * @param folderId the primary key of the file shortcut's parent folder 1921 * @param toFileEntryId the primary key of the file shortcut's file entry 1922 * @param serviceContext the service context to be applied. Can set the 1923 asset category IDs, asset tag names, and expando bridge 1924 attributes for the file entry. 1925 * @return the file shortcut 1926 * @throws PortalException if the file shortcut, folder, or file entry could 1927 not be found 1928 * @throws SystemException if a system exception occurred 1929 */ 1930 public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut( 1931 long fileShortcutId, long folderId, long toFileEntryId, 1932 com.liferay.portal.service.ServiceContext serviceContext) 1933 throws com.liferay.portal.kernel.exception.PortalException, 1934 com.liferay.portal.kernel.exception.SystemException { 1935 return getService() 1936 .updateFileShortcut(fileShortcutId, folderId, toFileEntryId, 1937 serviceContext); 1938 } 1939 1940 /** 1941 * Updates the folder. 1942 * 1943 * @param folderId the primary key of the folder 1944 * @param name the folder's new name 1945 * @param description the folder's new description 1946 * @param serviceContext the service context to be applied. In a Liferay 1947 repository, it may include: <ul> <li> defaultFileEntryTypeId - 1948 the file entry type to default all Liferay file entries to </li> 1949 <li> fileEntryTypeSearchContainerPrimaryKeys - a comma-delimited 1950 list of file entry type primary keys allowed in the given folder 1951 and all descendants </li> <li> overrideFileEntryTypes - boolean 1952 specifying whether to override ancestral folder's restriction of 1953 file entry types allowed </li> <li> workflowDefinitionXYZ - the 1954 workflow definition name specified per file entry type. The 1955 parameter name must be the string <code>workflowDefinition</code> 1956 appended by the <code>fileEntryTypeId</code> (optionally 1957 <code>0</code>). </li> </ul> 1958 * @return the folder 1959 * @throws PortalException if the current or new parent folder could not be 1960 found or if the new parent folder's information was invalid 1961 * @throws SystemException if a system exception occurred 1962 */ 1963 public static com.liferay.portal.kernel.repository.model.Folder updateFolder( 1964 long folderId, java.lang.String name, java.lang.String description, 1965 com.liferay.portal.service.ServiceContext serviceContext) 1966 throws com.liferay.portal.kernel.exception.PortalException, 1967 com.liferay.portal.kernel.exception.SystemException { 1968 return getService() 1969 .updateFolder(folderId, name, description, serviceContext); 1970 } 1971 1972 /** 1973 * Returns <code>true</code> if the file entry is checked out. This method 1974 * is primarily used by WebDAV. 1975 * 1976 * @param repositoryId the primary key for the repository 1977 * @param fileEntryId the primary key for the file entry 1978 * @param lockUuid the lock's universally unique identifier 1979 * @return <code>true</code> if the file entry is checked out; 1980 <code>false</code> otherwise 1981 * @throws PortalException if the file entry could not be found 1982 * @throws SystemException if a system exception occurred 1983 */ 1984 public static boolean verifyFileEntryCheckOut(long repositoryId, 1985 long fileEntryId, java.lang.String lockUuid) 1986 throws com.liferay.portal.kernel.exception.PortalException, 1987 com.liferay.portal.kernel.exception.SystemException { 1988 return getService() 1989 .verifyFileEntryCheckOut(repositoryId, fileEntryId, lockUuid); 1990 } 1991 1992 /** 1993 * Returns <code>true</code> if the inheritable lock exists. This method is 1994 * primarily used by WebDAV. 1995 * 1996 * @param repositoryId the primary key for the repository 1997 * @param folderId the primary key for the folder 1998 * @param lockUuid the lock's universally unique identifier 1999 * @return <code>true</code> if the inheritable lock exists; 2000 <code>false</code> otherwise 2001 * @throws PortalException if the folder could not be found 2002 * @throws SystemException if a system exception occurred 2003 */ 2004 public static boolean verifyInheritableLock(long repositoryId, 2005 long folderId, java.lang.String lockUuid) 2006 throws com.liferay.portal.kernel.exception.PortalException, 2007 com.liferay.portal.kernel.exception.SystemException { 2008 return getService() 2009 .verifyInheritableLock(repositoryId, folderId, lockUuid); 2010 } 2011 2012 public static DLAppService getService() { 2013 if (_service == null) { 2014 _service = (DLAppService)PortalBeanLocatorUtil.locate(DLAppService.class.getName()); 2015 2016 ReferenceRegistry.registerReference(DLAppServiceUtil.class, 2017 "_service"); 2018 MethodCache.remove(DLAppService.class); 2019 } 2020 2021 return _service; 2022 } 2023 2024 public void setService(DLAppService service) { 2025 MethodCache.remove(DLAppService.class); 2026 2027 _service = service; 2028 2029 ReferenceRegistry.registerReference(DLAppServiceUtil.class, "_service"); 2030 MethodCache.remove(DLAppService.class); 2031 } 2032 2033 private static DLAppService _service; 2034 }