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