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