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