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