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