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