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 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 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 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 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 QueryUtil#ALL_POS} will return the full 592 * result set. 593 * </p> 594 * 595 * @param repositoryId the primary key of the file entry's repository 596 * @param folderId the primary key of the file entry's folder 597 * @param start the lower bound of the range of results 598 * @param end the upper bound of the range of results (not inclusive) 599 * @return the name-ordered range of file entries in the folder 600 * @throws PortalException if the folder could not be found 601 */ 602 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 603 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 604 long repositoryId, long folderId, int start, int end) 605 throws PortalException; 606 607 /** 608 * Returns an ordered range of all the file entries in the folder. 609 * 610 * <p> 611 * Useful when paginating results. Returns a maximum of <code>end - 612 * start</code> instances. <code>start</code> and <code>end</code> are not 613 * primary keys, they are indexes in the result set. Thus, <code>0</code> 614 * refers to the first result in the set. Setting both <code>start</code> 615 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 616 * result set. 617 * </p> 618 * 619 * @param repositoryId the primary key of the file entry's repository 620 * @param folderId the primary key of the file entry's folder 621 * @param start the lower bound of the range of results 622 * @param end the upper bound of the range of results (not inclusive) 623 * @param obc the comparator to order the file entries (optionally 624 <code>null</code>) 625 * @return the range of file entries in the folder ordered by comparator 626 <code>obc</code> 627 * @throws PortalException if the folder could not be found 628 */ 629 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 630 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries( 631 long repositoryId, long folderId, int start, int end, 632 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 633 throws PortalException; 634 635 /** 636 * Returns a range of all the file entries and shortcuts in the folder. 637 * 638 * <p> 639 * Useful when paginating results. Returns a maximum of <code>end - 640 * start</code> instances. <code>start</code> and <code>end</code> are not 641 * primary keys, they are indexes in the result set. Thus, <code>0</code> 642 * refers to the first result in the set. Setting both <code>start</code> 643 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 644 * result set. 645 * </p> 646 * 647 * @param repositoryId the primary key of the repository 648 * @param folderId the primary key of the folder 649 * @param status the workflow status 650 * @param start the lower bound of the range of results 651 * @param end the upper bound of the range of results (not inclusive) 652 * @return the range of file entries and shortcuts in the folder 653 * @throws PortalException if the folder could not be found 654 */ 655 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 656 public java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts( 657 long repositoryId, long folderId, int status, int start, int end) 658 throws PortalException; 659 660 /** 661 * Returns the number of file entries and shortcuts in the folder. 662 * 663 * @param repositoryId the primary key of the repository 664 * @param folderId the primary key of the folder 665 * @param status the workflow status 666 * @return the number of file entries and shortcuts in the folder 667 * @throws PortalException if the folder ould not be found 668 */ 669 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 670 public int getFileEntriesAndFileShortcutsCount(long repositoryId, 671 long folderId, int status) throws PortalException; 672 673 /** 674 * Returns the number of file entries and shortcuts in the folder. 675 * 676 * @param repositoryId the primary key of the repository 677 * @param folderId the primary key of the folder 678 * @param status the workflow status 679 * @param mimeTypes allowed media types 680 * @return the number of file entries and shortcuts in the folder 681 * @throws PortalException if the folder ould not be found 682 */ 683 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 684 public int getFileEntriesAndFileShortcutsCount(long repositoryId, 685 long folderId, int status, java.lang.String[] mimeTypes) 686 throws PortalException; 687 688 /** 689 * Returns the number of file entries in the folder. 690 * 691 * @param repositoryId the primary key of the file entry's repository 692 * @param folderId the primary key of the file entry's folder 693 * @return the number of file entries in the folder 694 * @throws PortalException if the folder could not be found 695 */ 696 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 697 public int getFileEntriesCount(long repositoryId, long folderId) 698 throws PortalException; 699 700 /** 701 * Returns the number of file entries with the file entry type in the 702 * folder. 703 * 704 * @param repositoryId the primary key of the file entry's repository 705 * @param folderId the primary key of the file entry's folder 706 * @param fileEntryTypeId the primary key of the file entry type 707 * @return the number of file entries with the file entry type in the folder 708 * @throws PortalException if the folder could not be found 709 */ 710 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 711 public int getFileEntriesCount(long repositoryId, long folderId, 712 long fileEntryTypeId) throws PortalException; 713 714 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 715 public int getFileEntriesCount(long repositoryId, long folderId, 716 java.lang.String[] mimeTypes) throws PortalException; 717 718 /** 719 * Returns the file entry with the primary key. 720 * 721 * @param fileEntryId the primary key of the file entry 722 * @return the file entry with the primary key 723 * @throws PortalException if the file entry could not be found 724 */ 725 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 726 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 727 long fileEntryId) throws PortalException; 728 729 /** 730 * Returns the file entry with the title in the folder. 731 * 732 * @param groupId the primary key of the file entry's group 733 * @param folderId the primary key of the file entry's folder 734 * @param title the file entry's title 735 * @return the file entry with the title in the folder 736 * @throws PortalException if the file entry could not be found 737 */ 738 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 739 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntry( 740 long groupId, long folderId, java.lang.String title) 741 throws PortalException; 742 743 /** 744 * Returns the file entry with the UUID and group. 745 * 746 * @param uuid the file entry's UUID 747 * @param groupId the primary key of the file entry's group 748 * @return the file entry with the UUID and group 749 * @throws PortalException if the file entry could not be found 750 */ 751 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 752 public com.liferay.portal.kernel.repository.model.FileEntry getFileEntryByUuidAndGroupId( 753 java.lang.String uuid, long groupId) throws PortalException; 754 755 /** 756 * Returns the file shortcut with the primary key. This method is only 757 * supported by the Liferay repository. 758 * 759 * @param fileShortcutId the primary key of the file shortcut 760 * @return the file shortcut with the primary key 761 * @throws PortalException if the file shortcut could not be found 762 */ 763 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 764 public com.liferay.portal.kernel.repository.model.FileShortcut getFileShortcut( 765 long fileShortcutId) throws PortalException; 766 767 /** 768 * Returns the file version with the primary key. 769 * 770 * @param fileVersionId the primary key of the file version 771 * @return the file version with the primary key 772 * @throws PortalException if the file version could not be found 773 */ 774 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 775 public com.liferay.portal.kernel.repository.model.FileVersion getFileVersion( 776 long fileVersionId) throws PortalException; 777 778 /** 779 * Returns the folder with the primary key. 780 * 781 * @param folderId the primary key of the folder 782 * @return the folder with the primary key 783 * @throws PortalException if the folder could not be found 784 */ 785 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 786 public com.liferay.portal.kernel.repository.model.Folder getFolder( 787 long folderId) throws PortalException; 788 789 /** 790 * Returns the folder with the name in the parent folder. 791 * 792 * @param repositoryId the primary key of the folder's repository 793 * @param parentFolderId the primary key of the folder's parent folder 794 * @param name the folder's name 795 * @return the folder with the name in the parent folder 796 * @throws PortalException if the folder could not be found 797 */ 798 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 799 public com.liferay.portal.kernel.repository.model.Folder getFolder( 800 long repositoryId, long parentFolderId, java.lang.String name) 801 throws PortalException; 802 803 /** 804 * Returns all immediate subfolders of the parent folder. 805 * 806 * @param repositoryId the primary key of the folder's repository 807 * @param parentFolderId the primary key of the folder's parent folder 808 * @return the immediate subfolders of the parent folder 809 * @throws PortalException if the parent folder could not be found 810 */ 811 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 812 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 813 long repositoryId, long parentFolderId) throws PortalException; 814 815 /** 816 * Returns all immediate subfolders of the parent folder, optionally 817 * including mount folders for third-party repositories. 818 * 819 * @param repositoryId the primary key of the folder's repository 820 * @param parentFolderId the primary key of the folder's parent folder 821 * @param includeMountFolders whether to include mount folders for 822 third-party repositories 823 * @return the immediate subfolders of the parent folder 824 * @throws PortalException if the parent folder could not be found 825 */ 826 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 827 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 828 long repositoryId, long parentFolderId, boolean includeMountFolders) 829 throws PortalException; 830 831 /** 832 * Returns a name-ordered range of all the immediate subfolders of the 833 * parent folder, optionally including mount folders for third-party 834 * repositories. 835 * 836 * <p> 837 * Useful when paginating results. Returns a maximum of <code>end - 838 * start</code> instances. <code>start</code> and <code>end</code> are not 839 * primary keys, they are indexes in the result set. Thus, <code>0</code> 840 * refers to the first result in the set. Setting both <code>start</code> 841 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 842 * result set. 843 * </p> 844 * 845 * @param repositoryId the primary key of the folder's repository 846 * @param parentFolderId the primary key of the folder's parent folder 847 * @param includeMountFolders whether to include mount folders for 848 third-party repositories 849 * @param start the lower bound of the range of results 850 * @param end the upper bound of the range of results (not inclusive) 851 * @return the name-ordered range of immediate subfolders of the parent 852 folder 853 * @throws PortalException if the parent folder could not be found 854 */ 855 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 856 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 857 long repositoryId, long parentFolderId, boolean includeMountFolders, 858 int start, int end) throws PortalException; 859 860 /** 861 * Returns an ordered range of all the immediate subfolders of the parent 862 * folder. 863 * 864 * <p> 865 * Useful when paginating results. Returns a maximum of <code>end - 866 * start</code> instances. <code>start</code> and <code>end</code> are not 867 * primary keys, they are indexes in the result set. Thus, <code>0</code> 868 * refers to the first result in the set. Setting both <code>start</code> 869 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 870 * result set. 871 * </p> 872 * 873 * @param repositoryId the primary key of the folder's repository 874 * @param parentFolderId the primary key of the folder's parent folder 875 * @param includeMountFolders whether to include mount folders for 876 third-party repositories 877 * @param start the lower bound of the range of results 878 * @param end the upper bound of the range of results (not inclusive) 879 * @param obc the comparator to order the folders (optionally 880 <code>null</code>) 881 * @return the range of immediate subfolders of the parent folder ordered by 882 comparator <code>obc</code> 883 * @throws PortalException if the parent folder could not be found 884 */ 885 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 886 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 887 long repositoryId, long parentFolderId, boolean includeMountFolders, 888 int start, int end, 889 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 890 throws PortalException; 891 892 /** 893 * Returns a name-ordered range of all the immediate subfolders of the 894 * parent folder. 895 * 896 * <p> 897 * Useful when paginating results. Returns a maximum of <code>end - 898 * start</code> instances. <code>start</code> and <code>end</code> are not 899 * primary keys, they are indexes in the result set. Thus, <code>0</code> 900 * refers to the first result in the set. Setting both <code>start</code> 901 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 902 * result set. 903 * </p> 904 * 905 * @param repositoryId the primary key of the folder's repository 906 * @param parentFolderId the primary key of the folder's parent folder 907 * @param start the lower bound of the range of results 908 * @param end the upper bound of the range of results (not inclusive) 909 * @return the name-ordered range of immediate subfolders of the parent 910 folder 911 * @throws PortalException if the parent folder could not be found 912 */ 913 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 914 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 915 long repositoryId, long parentFolderId, int start, int end) 916 throws PortalException; 917 918 /** 919 * Returns an ordered range of all the immediate subfolders of the parent 920 * folder. 921 * 922 * <p> 923 * Useful when paginating results. Returns a maximum of <code>end - 924 * start</code> instances. <code>start</code> and <code>end</code> are not 925 * primary keys, they are indexes in the result set. Thus, <code>0</code> 926 * refers to the first result in the set. Setting both <code>start</code> 927 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 928 * result set. 929 * </p> 930 * 931 * @param repositoryId the primary key of the folder's repository 932 * @param parentFolderId the primary key of the folder's parent folder 933 * @param start the lower bound of the range of results 934 * @param end the upper bound of the range of results (not inclusive) 935 * @param obc the comparator to order the folders (optionally 936 <code>null</code>) 937 * @return the range of immediate subfolders of the parent folder ordered by 938 comparator <code>obc</code> 939 * @throws PortalException if the parent folder could not be found 940 */ 941 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 942 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 943 long repositoryId, long parentFolderId, int start, int end, 944 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 945 throws PortalException; 946 947 /** 948 * Returns an ordered range of all the immediate subfolders of the parent 949 * folder. 950 * 951 * <p> 952 * Useful when paginating results. Returns a maximum of <code>end - 953 * start</code> instances. <code>start</code> and <code>end</code> are not 954 * primary keys, they are indexes in the result set. Thus, <code>0</code> 955 * refers to the first result in the set. Setting both <code>start</code> 956 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 957 * result set. 958 * </p> 959 * 960 * @param repositoryId the primary key of the folder's repository 961 * @param parentFolderId the primary key of the folder's parent folder 962 * @param status the workflow status 963 * @param includeMountFolders whether to include mount folders for 964 third-party repositories 965 * @param start the lower bound of the range of results 966 * @param end the upper bound of the range of results (not inclusive) 967 * @param obc the comparator to order the folders (optionally 968 <code>null</code>) 969 * @return the range of immediate subfolders of the parent folder ordered by 970 comparator <code>obc</code> 971 * @throws PortalException if the parent folder could not be found 972 */ 973 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 974 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getFolders( 975 long repositoryId, long parentFolderId, int status, 976 boolean includeMountFolders, int start, int end, 977 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 978 throws PortalException; 979 980 /** 981 * Returns a name-ordered range of all the immediate subfolders, file 982 * entries, and file shortcuts in the parent folder. 983 * 984 * <p> 985 * Useful when paginating results. Returns a maximum of <code>end - 986 * start</code> instances. <code>start</code> and <code>end</code> are not 987 * primary keys, they are indexes in the result set. Thus, <code>0</code> 988 * refers to the first result in the set. Setting both <code>start</code> 989 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 990 * result set. 991 * </p> 992 * 993 * @param repositoryId the primary key of the repository 994 * @param folderId the primary key of the parent folder 995 * @param status the workflow status 996 * @param includeMountFolders whether to include mount folders for 997 third-party repositories 998 * @param start the lower bound of the range of results 999 * @param end the upper bound of the range of results (not inclusive) 1000 * @return the name-ordered range of immediate subfolders, file entries, and 1001 file shortcuts in the parent folder 1002 * @throws PortalException if the parent folder could not be found 1003 */ 1004 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1005 public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1006 long repositoryId, long folderId, int status, 1007 boolean includeMountFolders, int start, int end) 1008 throws PortalException; 1009 1010 /** 1011 * Returns an ordered range of all the immediate subfolders, file entries, 1012 * and file shortcuts in the parent folder. 1013 * 1014 * <p> 1015 * Useful when paginating results. Returns a maximum of <code>end - 1016 * start</code> instances. <code>start</code> and <code>end</code> are not 1017 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1018 * refers to the first result in the set. Setting both <code>start</code> 1019 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1020 * result set. 1021 * </p> 1022 * 1023 * @param repositoryId the primary key of the repository 1024 * @param folderId the primary key of the parent folder 1025 * @param status the workflow status 1026 * @param includeMountFolders whether to include mount folders for 1027 third-party repositories 1028 * @param start the lower bound of the range of results 1029 * @param end the upper bound of the range of results (not inclusive) 1030 * @param obc the comparator to order the results (optionally 1031 <code>null</code>) 1032 * @return the range of immediate subfolders, file entries, and file 1033 shortcuts in the parent folder ordered by comparator 1034 <code>obc</code> 1035 * @throws PortalException if the parent folder could not be found 1036 */ 1037 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1038 public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1039 long repositoryId, long folderId, int status, 1040 boolean includeMountFolders, int start, int end, 1041 com.liferay.portal.kernel.util.OrderByComparator<?> obc) 1042 throws PortalException; 1043 1044 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1045 public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts( 1046 long repositoryId, long folderId, int status, 1047 java.lang.String[] mimeTypes, boolean includeMountFolders, int start, 1048 int end, com.liferay.portal.kernel.util.OrderByComparator<?> obc) 1049 throws PortalException; 1050 1051 /** 1052 * Returns the number of immediate subfolders, file entries, and file 1053 * shortcuts in the parent folder. 1054 * 1055 * @param repositoryId the primary key of the repository 1056 * @param folderId the primary key of the parent folder 1057 * @param status the workflow status 1058 * @param includeMountFolders whether to include mount folders for 1059 third-party repositories 1060 * @return the number of immediate subfolders, file entries, and file 1061 shortcuts in the parent folder 1062 * @throws PortalException if the folder could not be found 1063 */ 1064 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1065 public int getFoldersAndFileEntriesAndFileShortcutsCount( 1066 long repositoryId, long folderId, int status, 1067 boolean includeMountFolders) throws PortalException; 1068 1069 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1070 public int getFoldersAndFileEntriesAndFileShortcutsCount( 1071 long repositoryId, long folderId, int status, 1072 java.lang.String[] mimeTypes, boolean includeMountFolders) 1073 throws PortalException; 1074 1075 /** 1076 * Returns the number of immediate subfolders of the parent folder. 1077 * 1078 * @param repositoryId the primary key of the folder's repository 1079 * @param parentFolderId the primary key of the folder's parent folder 1080 * @return the number of immediate subfolders of the parent folder 1081 * @throws PortalException if the parent folder could not be found 1082 */ 1083 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1084 public int getFoldersCount(long repositoryId, long parentFolderId) 1085 throws PortalException; 1086 1087 /** 1088 * Returns the number of immediate subfolders of the parent folder, 1089 * optionally including mount folders for third-party repositories. 1090 * 1091 * @param repositoryId the primary key of the folder's repository 1092 * @param parentFolderId the primary key of the folder's parent folder 1093 * @param includeMountFolders whether to include mount folders for 1094 third-party repositories 1095 * @return the number of immediate subfolders of the parent folder 1096 * @throws PortalException if the parent folder could not be found 1097 */ 1098 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1099 public int getFoldersCount(long repositoryId, long parentFolderId, 1100 boolean includeMountFolders) throws PortalException; 1101 1102 /** 1103 * Returns the number of immediate subfolders of the parent folder, 1104 * optionally including mount folders for third-party repositories. 1105 * 1106 * @param repositoryId the primary key of the folder's repository 1107 * @param parentFolderId the primary key of the folder's parent folder 1108 * @param status the workflow status 1109 * @param includeMountFolders whether to include mount folders for 1110 third-party repositories 1111 * @return the number of immediate subfolders of the parent folder 1112 * @throws PortalException if the parent folder could not be found 1113 */ 1114 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1115 public int getFoldersCount(long repositoryId, long parentFolderId, 1116 int status, boolean includeMountFolders) throws PortalException; 1117 1118 /** 1119 * Returns the number of immediate subfolders and file entries across the 1120 * folders. 1121 * 1122 * @param repositoryId the primary key of the repository 1123 * @param folderIds the primary keys of folders from which to count 1124 immediate subfolders and file entries 1125 * @param status the workflow status 1126 * @return the number of immediate subfolders and file entries across the 1127 folders 1128 * @throws PortalException if the repository could not be found 1129 */ 1130 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1131 public int getFoldersFileEntriesCount(long repositoryId, 1132 java.util.List<java.lang.Long> folderIds, int status) 1133 throws PortalException; 1134 1135 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1136 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1137 long groupId, long userId, long rootFolderId, 1138 java.lang.String[] mimeTypes, int status, int start, int end, 1139 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 1140 throws PortalException; 1141 1142 /** 1143 * Returns an ordered range of all the file entries in the group starting at 1144 * the root folder that are stored within the Liferay repository. This 1145 * method is primarily used to search for recently modified file entries. It 1146 * can be limited to the file entries modified by a given user. 1147 * 1148 * <p> 1149 * Useful when paginating results. Returns a maximum of <code>end - 1150 * start</code> instances. <code>start</code> and <code>end</code> are not 1151 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1152 * refers to the first result in the set. Setting both <code>start</code> 1153 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1154 * result set. 1155 * </p> 1156 * 1157 * @param groupId the primary key of the group 1158 * @param userId the primary key of the user who created the file 1159 (optionally <code>0</code>) 1160 * @param rootFolderId the primary key of the root folder to begin the 1161 search 1162 * @param start the lower bound of the range of results 1163 * @param end the upper bound of the range of results (not inclusive) 1164 * @return the range of matching file entries ordered by date modified 1165 * @throws PortalException if the group could not be found 1166 */ 1167 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1168 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1169 long groupId, long userId, long rootFolderId, int start, int end) 1170 throws PortalException; 1171 1172 /** 1173 * Returns an ordered range of all the file entries in the group starting at 1174 * the root folder that are stored within the Liferay repository. This 1175 * method is primarily used to search for recently modified file entries. It 1176 * can be limited to the file entries modified by a given user. 1177 * 1178 * <p> 1179 * Useful when paginating results. Returns a maximum of <code>end - 1180 * start</code> instances. <code>start</code> and <code>end</code> are not 1181 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1182 * refers to the first result in the set. Setting both <code>start</code> 1183 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1184 * result set. 1185 * </p> 1186 * 1187 * @param groupId the primary key of the group 1188 * @param userId the primary key of the user who created the file 1189 (optionally <code>0</code>) 1190 * @param rootFolderId the primary key of the root folder to begin the 1191 search 1192 * @param start the lower bound of the range of results 1193 * @param end the upper bound of the range of results (not inclusive) 1194 * @param obc the comparator to order the file entries (optionally 1195 <code>null</code>) 1196 * @return the range of matching file entries ordered by comparator 1197 <code>obc</code> 1198 * @throws PortalException if the group could not be found 1199 */ 1200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1201 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1202 long groupId, long userId, long rootFolderId, int start, int end, 1203 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 1204 throws PortalException; 1205 1206 /** 1207 * Returns an ordered range of all the file entries in the group starting at 1208 * the repository default parent folder that are stored within the Liferay 1209 * repository. This method is primarily used to search for recently modified 1210 * file entries. It can be limited to the file entries modified by a given 1211 * user. 1212 * 1213 * <p> 1214 * Useful when paginating results. Returns a maximum of <code>end - 1215 * start</code> instances. <code>start</code> and <code>end</code> are not 1216 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1217 * refers to the first result in the set. Setting both <code>start</code> 1218 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1219 * result set. 1220 * </p> 1221 * 1222 * @param groupId the primary key of the group 1223 * @param userId the primary key of the user who created the file 1224 (optionally <code>0</code>) 1225 * @param start the lower bound of the range of results 1226 * @param end the upper bound of the range of results (not inclusive) 1227 * @return the range of matching file entries ordered by date modified 1228 * @throws PortalException if the group could not be found 1229 */ 1230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1231 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1232 long groupId, long userId, int start, int end) 1233 throws PortalException; 1234 1235 /** 1236 * Returns an ordered range of all the file entries in the group that are 1237 * stored within the Liferay repository. This method is primarily used to 1238 * search for recently modified file entries. It can be limited to the file 1239 * entries modified by a given user. 1240 * 1241 * <p> 1242 * Useful when paginating results. Returns a maximum of <code>end - 1243 * start</code> instances. <code>start</code> and <code>end</code> are not 1244 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1245 * refers to the first result in the set. Setting both <code>start</code> 1246 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1247 * result set. 1248 * </p> 1249 * 1250 * @param groupId the primary key of the group 1251 * @param userId the primary key of the user who created the file 1252 (optionally <code>0</code>) 1253 * @param start the lower bound of the range of results 1254 * @param end the upper bound of the range of results (not inclusive) 1255 * @param obc the comparator to order the file entries (optionally 1256 <code>null</code>) 1257 * @return the range of matching file entries ordered by comparator 1258 <code>obc</code> 1259 * @throws PortalException if the group could not be found 1260 */ 1261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1262 public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getGroupFileEntries( 1263 long groupId, long userId, int start, int end, 1264 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.FileEntry> obc) 1265 throws PortalException; 1266 1267 /** 1268 * Returns the number of file entries in a group starting at the repository 1269 * default parent folder that are stored within the Liferay repository. This 1270 * method is primarily used to search for recently modified file entries. It 1271 * can be limited to the file entries modified by a given user. 1272 * 1273 * @param groupId the primary key of the group 1274 * @param userId the primary key of the user who created the file 1275 (optionally <code>0</code>) 1276 * @return the number of matching file entries 1277 * @throws PortalException if the group could not be found 1278 */ 1279 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1280 public int getGroupFileEntriesCount(long groupId, long userId) 1281 throws PortalException; 1282 1283 /** 1284 * Returns the number of file entries in a group starting at the root folder 1285 * that are stored within the Liferay repository. This method is primarily 1286 * used to search for recently modified file entries. It can be limited to 1287 * the file entries modified by a given user. 1288 * 1289 * @param groupId the primary key of the group 1290 * @param userId the primary key of the user who created the file 1291 (optionally <code>0</code>) 1292 * @param rootFolderId the primary key of the root folder to begin the 1293 search 1294 * @return the number of matching file entries 1295 * @throws PortalException if the group could not be found 1296 */ 1297 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1298 public int getGroupFileEntriesCount(long groupId, long userId, 1299 long rootFolderId) throws PortalException; 1300 1301 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1302 public int getGroupFileEntriesCount(long groupId, long userId, 1303 long rootFolderId, java.lang.String[] mimeTypes, int status) 1304 throws PortalException; 1305 1306 /** 1307 * Returns all immediate subfolders of the parent folder that are used for 1308 * mounting third-party repositories. This method is only supported by the 1309 * Liferay repository. 1310 * 1311 * @param repositoryId the primary key of the folder's repository 1312 * @param parentFolderId the primary key of the folder's parent folder 1313 * @return the immediate subfolders of the parent folder that are used for 1314 mounting third-party repositories 1315 * @throws PortalException if the repository or parent folder could not be 1316 found 1317 */ 1318 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1319 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1320 long repositoryId, long parentFolderId) throws PortalException; 1321 1322 /** 1323 * Returns a name-ordered range of all the immediate subfolders of the 1324 * parent folder that are used for mounting third-party repositories. This 1325 * method is only supported by the Liferay repository. 1326 * 1327 * <p> 1328 * Useful when paginating results. Returns a maximum of <code>end - 1329 * start</code> instances. <code>start</code> and <code>end</code> are not 1330 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1331 * refers to the first result in the set. Setting both <code>start</code> 1332 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1333 * result set. 1334 * </p> 1335 * 1336 * @param repositoryId the primary key of the repository 1337 * @param parentFolderId the primary key of the parent folder 1338 * @param start the lower bound of the range of results 1339 * @param end the upper bound of the range of results (not inclusive) 1340 * @return the name-ordered range of immediate subfolders of the parent 1341 folder that are used for mounting third-party repositories 1342 * @throws PortalException if the repository or parent folder could not be 1343 found 1344 */ 1345 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1346 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1347 long repositoryId, long parentFolderId, int start, int end) 1348 throws PortalException; 1349 1350 /** 1351 * Returns an ordered range of all the immediate subfolders of the parent 1352 * folder that are used for mounting third-party repositories. This method 1353 * is only supported by the Liferay repository. 1354 * 1355 * <p> 1356 * Useful when paginating results. Returns a maximum of <code>end - 1357 * start</code> instances. <code>start</code> and <code>end</code> are not 1358 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1359 * refers to the first result in the set. Setting both <code>start</code> 1360 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1361 * result set. 1362 * </p> 1363 * 1364 * @param repositoryId the primary key of the folder's repository 1365 * @param parentFolderId the primary key of the folder's parent folder 1366 * @param start the lower bound of the range of results 1367 * @param end the upper bound of the range of results (not inclusive) 1368 * @param obc the comparator to order the folders (optionally 1369 <code>null</code>) 1370 * @return the range of immediate subfolders of the parent folder that are 1371 used for mounting third-party repositories ordered by comparator 1372 <code>obc</code> 1373 * @throws PortalException if the repository or parent folder could not be 1374 found 1375 */ 1376 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1377 public java.util.List<com.liferay.portal.kernel.repository.model.Folder> getMountFolders( 1378 long repositoryId, long parentFolderId, int start, int end, 1379 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.repository.model.Folder> obc) 1380 throws PortalException; 1381 1382 /** 1383 * Returns the number of immediate subfolders of the parent folder that are 1384 * used for mounting third-party repositories. This method is only supported 1385 * by the Liferay repository. 1386 * 1387 * @param repositoryId the primary key of the repository 1388 * @param parentFolderId the primary key of the parent folder 1389 * @return the number of folders of the parent folder that are used for 1390 mounting third-party repositories 1391 * @throws PortalException if the repository or parent folder could not be 1392 found 1393 */ 1394 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1395 public int getMountFoldersCount(long repositoryId, long parentFolderId) 1396 throws PortalException; 1397 1398 /** 1399 * Returns all the descendant folders of the folder with the primary key. 1400 * 1401 * @param repositoryId the primary key of the repository 1402 * @param folderId the primary key of the folder 1403 * @return the descendant folders of the folder with the primary key 1404 * @throws PortalException if the repository or parent folder could not be 1405 found 1406 */ 1407 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1408 public java.util.List<java.lang.Long> getSubfolderIds(long repositoryId, 1409 long folderId) throws PortalException; 1410 1411 /** 1412 * Returns descendant folders of the folder with the primary key, optionally 1413 * limiting to one level deep. 1414 * 1415 * @param repositoryId the primary key of the repository 1416 * @param folderId the primary key of the folder 1417 * @param recurse whether to recurse through each subfolder 1418 * @return the descendant folders of the folder with the primary key 1419 * @throws PortalException if the repository or parent folder could not be 1420 found 1421 */ 1422 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1423 public java.util.List<java.lang.Long> getSubfolderIds(long repositoryId, 1424 long folderId, boolean recurse) throws PortalException; 1425 1426 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1427 public void getSubfolderIds(long repositoryId, 1428 java.util.List<java.lang.Long> folderIds, long folderId) 1429 throws PortalException; 1430 1431 /** 1432 * Returns all the temporary file entry names. 1433 * 1434 * @param groupId the primary key of the group 1435 * @param folderId the primary key of the folder where the file entry will 1436 eventually reside 1437 * @param folderName the temporary folder's name 1438 * @return the temporary file entry names 1439 * @throws PortalException if the folder was invalid 1440 * @see #addTempFileEntry(long, long, String, String, File, String) 1441 * @see TempFileEntryUtil 1442 */ 1443 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1444 public java.lang.String[] getTempFileNames(long groupId, long folderId, 1445 java.lang.String folderName) throws PortalException; 1446 1447 /** 1448 * Locks the folder. This method is primarily used by WebDAV. 1449 * 1450 * @param repositoryId the primary key of the repository 1451 * @param folderId the primary key of the folder 1452 * @return the lock object 1453 * @throws PortalException if the repository or folder could not be found 1454 */ 1455 public com.liferay.portal.kernel.lock.Lock lockFolder(long repositoryId, 1456 long folderId) throws PortalException; 1457 1458 /** 1459 * Locks the folder. This method is primarily used by WebDAV. 1460 * 1461 * @param repositoryId the primary key of the repository 1462 * @param folderId the primary key of the folder 1463 * @param owner the owner string for the checkout (optionally 1464 <code>null</code>) 1465 * @param inheritable whether the lock must propagate to descendants 1466 * @param expirationTime the time in milliseconds before the lock expires. 1467 If the value is <code>0</code>, the default expiration time will 1468 be used from <code>portal.properties>. 1469 * @return the lock object 1470 * @throws PortalException if the repository or folder could not be found 1471 */ 1472 public com.liferay.portal.kernel.lock.Lock lockFolder(long repositoryId, 1473 long folderId, java.lang.String owner, boolean inheritable, 1474 long expirationTime) throws PortalException; 1475 1476 /** 1477 * Moves the file entry to the new folder. 1478 * 1479 * @param fileEntryId the primary key of the file entry 1480 * @param newFolderId the primary key of the new folder 1481 * @param serviceContext the service context to be applied 1482 * @return the file entry 1483 * @throws PortalException if the file entry or the new folder could not be 1484 found 1485 */ 1486 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntry( 1487 long fileEntryId, long newFolderId, 1488 com.liferay.portal.service.ServiceContext serviceContext) 1489 throws PortalException; 1490 1491 /** 1492 * Moves the file entry from a trashed folder to the new folder. 1493 * 1494 * @param fileEntryId the primary key of the file entry 1495 * @param newFolderId the primary key of the new folder 1496 * @param serviceContext the service context to be applied 1497 * @return the file entry 1498 * @throws PortalException if the file entry or the new folder could not be 1499 found 1500 */ 1501 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash( 1502 long fileEntryId, long newFolderId, 1503 com.liferay.portal.service.ServiceContext serviceContext) 1504 throws PortalException; 1505 1506 /** 1507 * Moves the file entry with the primary key to the trash portlet. 1508 * 1509 * @param fileEntryId the primary key of the file entry 1510 * @return the file entry 1511 * @throws PortalException if the file entry could not be found 1512 */ 1513 public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash( 1514 long fileEntryId) throws PortalException; 1515 1516 /** 1517 * Moves the file shortcut from a trashed folder to the new folder. 1518 * 1519 * @param fileShortcutId the primary key of the file shortcut 1520 * @param newFolderId the primary key of the new folder 1521 * @param serviceContext the service context to be applied 1522 * @return the file shortcut 1523 * @throws PortalException if the file entry or the new folder could not be 1524 found 1525 */ 1526 public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash( 1527 long fileShortcutId, long newFolderId, 1528 com.liferay.portal.service.ServiceContext serviceContext) 1529 throws PortalException; 1530 1531 /** 1532 * Moves the file shortcut with the primary key to the trash portlet. 1533 * 1534 * @param fileShortcutId the primary key of the file shortcut 1535 * @return the file shortcut 1536 * @throws PortalException if the file shortcut could not be found 1537 */ 1538 public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash( 1539 long fileShortcutId) throws PortalException; 1540 1541 /** 1542 * Moves the folder to the new parent folder with the primary key. 1543 * 1544 * @param folderId the primary key of the folder 1545 * @param parentFolderId the primary key of the new parent folder 1546 * @param serviceContext the service context to be applied 1547 * @return the file entry 1548 * @throws PortalException if the folder could not be found 1549 */ 1550 public com.liferay.portal.kernel.repository.model.Folder moveFolder( 1551 long folderId, long parentFolderId, 1552 com.liferay.portal.service.ServiceContext serviceContext) 1553 throws PortalException; 1554 1555 /** 1556 * Moves the folder with the primary key from the trash portlet to the new 1557 * parent folder with the primary key. 1558 * 1559 * @param folderId the primary key of the folder 1560 * @param parentFolderId the primary key of the new parent folder 1561 * @param serviceContext the service context to be applied 1562 * @return the file entry 1563 * @throws PortalException if the folder could not be found 1564 */ 1565 public com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash( 1566 long folderId, long parentFolderId, 1567 com.liferay.portal.service.ServiceContext serviceContext) 1568 throws PortalException; 1569 1570 /** 1571 * Moves the folder with the primary key to the trash portlet. 1572 * 1573 * @param folderId the primary key of the folder 1574 * @return the file entry 1575 * @throws PortalException if the folder could not be found 1576 */ 1577 public com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash( 1578 long folderId) throws PortalException; 1579 1580 /** 1581 * Refreshes the lock for the file entry. This method is primarily used by 1582 * WebDAV. 1583 * 1584 * @param lockUuid the lock's UUID 1585 * @param companyId the primary key of the file entry's company 1586 * @param expirationTime the time in milliseconds before the lock expires. 1587 If the value is <code>0</code>, the default expiration time will 1588 be used from <code>portal.properties>. 1589 * @return the lock object 1590 * @throws PortalException if the file entry or lock could not be found 1591 */ 1592 public com.liferay.portal.kernel.lock.Lock refreshFileEntryLock( 1593 java.lang.String lockUuid, long companyId, long expirationTime) 1594 throws PortalException; 1595 1596 /** 1597 * Refreshes the lock for the folder. 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 folder or lock could not be found 1607 */ 1608 public com.liferay.portal.kernel.lock.Lock refreshFolderLock( 1609 java.lang.String lockUuid, long companyId, long expirationTime) 1610 throws PortalException; 1611 1612 /** 1613 * Restores the file entry with the primary key from the trash portlet. 1614 * 1615 * @param fileEntryId the primary key of the file entry 1616 * @throws PortalException if the file entry could not be found 1617 */ 1618 public void restoreFileEntryFromTrash(long fileEntryId) 1619 throws PortalException; 1620 1621 /** 1622 * Restores the file shortcut with the primary key from the trash portlet. 1623 * 1624 * @param fileShortcutId the primary key of the file shortcut 1625 * @throws PortalException if the file shortcut could not be found 1626 */ 1627 public void restoreFileShortcutFromTrash(long fileShortcutId) 1628 throws PortalException; 1629 1630 /** 1631 * Restores the folder with the primary key from the trash portlet. 1632 * 1633 * @param folderId the primary key of the folder 1634 * @throws PortalException if the folder could not be found 1635 */ 1636 public void restoreFolderFromTrash(long folderId) throws PortalException; 1637 1638 /** 1639 * Reverts the file entry to a previous version. A new version will be 1640 * created based on the previous version and metadata. 1641 * 1642 * @param fileEntryId the primary key of the file entry 1643 * @param version the version to revert back to 1644 * @param serviceContext the service context to be applied 1645 * @throws PortalException if the file entry or version could not be found 1646 */ 1647 public void revertFileEntry(long fileEntryId, java.lang.String version, 1648 com.liferay.portal.service.ServiceContext serviceContext) 1649 throws PortalException; 1650 1651 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1652 public com.liferay.portal.kernel.search.Hits search(long repositoryId, 1653 long creatorUserId, long folderId, java.lang.String[] mimeTypes, 1654 int status, int start, int end) throws PortalException; 1655 1656 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1657 public com.liferay.portal.kernel.search.Hits search(long repositoryId, 1658 long creatorUserId, int status, int start, int end) 1659 throws PortalException; 1660 1661 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1662 public com.liferay.portal.kernel.search.Hits search(long repositoryId, 1663 com.liferay.portal.kernel.search.SearchContext searchContext) 1664 throws com.liferay.portal.kernel.search.SearchException; 1665 1666 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1667 public com.liferay.portal.kernel.search.Hits search(long repositoryId, 1668 com.liferay.portal.kernel.search.SearchContext searchContext, 1669 com.liferay.portal.kernel.search.Query query) 1670 throws com.liferay.portal.kernel.search.SearchException; 1671 1672 /** 1673 * Sets the Spring bean ID for this bean. 1674 * 1675 * @param beanIdentifier the Spring bean ID for this bean 1676 */ 1677 public void setBeanIdentifier(java.lang.String beanIdentifier); 1678 1679 /** 1680 * Subscribe the user to changes in documents of the file entry type. This 1681 * method is only supported by the Liferay repository. 1682 * 1683 * @param groupId the primary key of the file entry type's group 1684 * @param fileEntryTypeId the primary key of the file entry type 1685 * @throws PortalException if the user or group could not be found, or if 1686 subscribing was not permissible 1687 */ 1688 public void subscribeFileEntryType(long groupId, long fileEntryTypeId) 1689 throws PortalException; 1690 1691 /** 1692 * Subscribe the user to document changes in the folder. This method is only 1693 * supported by the Liferay repository. 1694 * 1695 * @param groupId the primary key of the folder's group 1696 * @param folderId the primary key of the folder 1697 * @throws PortalException if the user or group could not be found, or if 1698 subscribing was not permissible 1699 */ 1700 public void subscribeFolder(long groupId, long folderId) 1701 throws PortalException; 1702 1703 /** 1704 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 1705 boolean, String, ServiceContext)}. 1706 */ 1707 @java.lang.Deprecated 1708 public void unlockFileEntry(long fileEntryId) throws PortalException; 1709 1710 /** 1711 * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long, 1712 String)}. 1713 */ 1714 @java.lang.Deprecated 1715 public void unlockFileEntry(long fileEntryId, java.lang.String lockUuid) 1716 throws PortalException; 1717 1718 /** 1719 * Unlocks the folder. This method is primarily used by WebDAV. 1720 * 1721 * @param repositoryId the primary key of the repository 1722 * @param folderId the primary key of the folder 1723 * @param lockUuid the lock's UUID 1724 * @throws PortalException if the repository or folder could not be found 1725 */ 1726 public void unlockFolder(long repositoryId, long folderId, 1727 java.lang.String lockUuid) throws PortalException; 1728 1729 /** 1730 * Unlocks the folder. This method is primarily used by WebDAV. 1731 * 1732 * @param repositoryId the primary key of the repository 1733 * @param parentFolderId the primary key of the parent folder 1734 * @param name the folder's name 1735 * @param lockUuid the lock's UUID 1736 * @throws PortalException if the repository or folder could not be found 1737 */ 1738 public void unlockFolder(long repositoryId, long parentFolderId, 1739 java.lang.String name, java.lang.String lockUuid) 1740 throws PortalException; 1741 1742 /** 1743 * Unsubscribe the user from changes in documents of the file entry type. 1744 * This method is only supported by the Liferay repository. 1745 * 1746 * @param groupId the primary key of the file entry type's group 1747 * @param fileEntryTypeId the primary key of the file entry type 1748 * @throws PortalException if the user or group could not be found, or if 1749 unsubscribing was not permissible 1750 */ 1751 public void unsubscribeFileEntryType(long groupId, long fileEntryTypeId) 1752 throws PortalException; 1753 1754 /** 1755 * Unsubscribe the user from document changes in the folder. This method is 1756 * only supported by the Liferay repository. 1757 * 1758 * @param groupId the primary key of the folder's group 1759 * @param folderId the primary key of the folder 1760 * @throws PortalException if the user or group could not be found, or if 1761 unsubscribing was not permissible 1762 */ 1763 public void unsubscribeFolder(long groupId, long folderId) 1764 throws PortalException; 1765 1766 /** 1767 * Updates a file entry and associated metadata based on a byte array 1768 * object. If the file data is <code>null</code>, then only the associated 1769 * metadata (i.e., <code>title</code>, <code>description</code>, and 1770 * parameters in the <code>serviceContext</code>) will be updated. 1771 * 1772 * <p> 1773 * This method takes two file names, the <code>sourceFileName</code> and the 1774 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1775 * name of the actual file being uploaded. The <code>title</code> 1776 * corresponds to a name the client wishes to assign this file after it has 1777 * been uploaded to the portal. 1778 * </p> 1779 * 1780 * @param fileEntryId the primary key of the file entry 1781 * @param sourceFileName the original file's name (optionally 1782 <code>null</code>) 1783 * @param mimeType the file's MIME type (optionally <code>null</code>) 1784 * @param title the new name to be assigned to the file (optionally <code> 1785 <code>null</code></code>) 1786 * @param description the file's new description 1787 * @param changeLog the file's version change log (optionally 1788 <code>null</code>) 1789 * @param majorVersion whether the new file version is a major version 1790 * @param bytes the file's data (optionally <code>null</code>) 1791 * @param serviceContext the service context to be applied. Can set the 1792 asset category IDs, asset tag names, and expando bridge 1793 attributes for the file entry. In a Liferay repository, it may 1794 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1795 type </li> <li> fieldsMap - mapping for fields associated with a 1796 custom file entry type </li> </ul> 1797 * @return the file entry 1798 * @throws PortalException if the file entry could not be found 1799 */ 1800 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1801 long fileEntryId, java.lang.String sourceFileName, 1802 java.lang.String mimeType, java.lang.String title, 1803 java.lang.String description, java.lang.String changeLog, 1804 boolean majorVersion, byte[] bytes, 1805 com.liferay.portal.service.ServiceContext serviceContext) 1806 throws PortalException; 1807 1808 /** 1809 * Updates a file entry and associated metadata based on a {@link File} 1810 * object. If the file data is <code>null</code>, then only the associated 1811 * metadata (i.e., <code>title</code>, <code>description</code>, and 1812 * parameters in the <code>serviceContext</code>) will be updated. 1813 * 1814 * <p> 1815 * This method takes two file names, the <code>sourceFileName</code> and the 1816 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1817 * name of the actual file being uploaded. The <code>title</code> 1818 * corresponds to a name the client wishes to assign this file after it has 1819 * been uploaded to the portal. 1820 * </p> 1821 * 1822 * @param fileEntryId the primary key of the file entry 1823 * @param sourceFileName the original file's name (optionally 1824 <code>null</code>) 1825 * @param mimeType the file's MIME type (optionally <code>null</code>) 1826 * @param title the new name to be assigned to the file (optionally <code> 1827 <code>null</code></code>) 1828 * @param description the file's new description 1829 * @param changeLog the file's version change log (optionally 1830 <code>null</code>) 1831 * @param majorVersion whether the new file version is a major version 1832 * @param file the file's data (optionally <code>null</code>) 1833 * @param serviceContext the service context to be applied. Can set the 1834 asset category IDs, asset tag names, and expando bridge 1835 attributes for the file entry. In a Liferay repository, it may 1836 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1837 type </li> <li> fieldsMap - mapping for fields associated with a 1838 custom file entry type </li> </ul> 1839 * @return the file entry 1840 * @throws PortalException if the file entry could not be found 1841 */ 1842 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1843 long fileEntryId, java.lang.String sourceFileName, 1844 java.lang.String mimeType, java.lang.String title, 1845 java.lang.String description, java.lang.String changeLog, 1846 boolean majorVersion, java.io.File file, 1847 com.liferay.portal.service.ServiceContext serviceContext) 1848 throws PortalException; 1849 1850 /** 1851 * Updates a file entry and associated metadata based on an {@link 1852 * InputStream} object. If the file data is <code>null</code>, then only the 1853 * associated metadata (i.e., <code>title</code>, <code>description</code>, 1854 * and parameters in the <code>serviceContext</code>) will be updated. 1855 * 1856 * <p> 1857 * This method takes two file names, the <code>sourceFileName</code> and the 1858 * <code>title</code>. The <code>sourceFileName</code> corresponds to the 1859 * name of the actual file being uploaded. The <code>title</code> 1860 * corresponds to a name the client wishes to assign this file after it has 1861 * been uploaded to the portal. 1862 * </p> 1863 * 1864 * @param fileEntryId the primary key of the file entry 1865 * @param sourceFileName the original file's name (optionally 1866 <code>null</code>) 1867 * @param mimeType the file's MIME type (optionally <code>null</code>) 1868 * @param title the new name to be assigned to the file (optionally <code> 1869 <code>null</code></code>) 1870 * @param description the file's new description 1871 * @param changeLog the file's version change log (optionally 1872 <code>null</code>) 1873 * @param majorVersion whether the new file version is a major version 1874 * @param is the file's data (optionally <code>null</code>) 1875 * @param size the file's size (optionally <code>0</code>) 1876 * @param serviceContext the service context to be applied. Can set the 1877 asset category IDs, asset tag names, and expando bridge 1878 attributes for the file entry. In a Liferay repository, it may 1879 include: <ul> <li> fileEntryTypeId - ID for a custom file entry 1880 type </li> <li> fieldsMap - mapping for fields associated with a 1881 custom file entry type </li> </ul> 1882 * @return the file entry 1883 * @throws PortalException if the file entry could not be found 1884 */ 1885 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntry( 1886 long fileEntryId, java.lang.String sourceFileName, 1887 java.lang.String mimeType, java.lang.String title, 1888 java.lang.String description, java.lang.String changeLog, 1889 boolean majorVersion, java.io.InputStream is, long size, 1890 com.liferay.portal.service.ServiceContext serviceContext) 1891 throws PortalException; 1892 1893 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn( 1894 long fileEntryId, java.lang.String sourceFileName, 1895 java.lang.String mimeType, java.lang.String title, 1896 java.lang.String description, java.lang.String changeLog, 1897 boolean majorVersion, java.io.File file, 1898 com.liferay.portal.service.ServiceContext serviceContext) 1899 throws PortalException; 1900 1901 public com.liferay.portal.kernel.repository.model.FileEntry updateFileEntryAndCheckIn( 1902 long fileEntryId, java.lang.String sourceFileName, 1903 java.lang.String mimeType, java.lang.String title, 1904 java.lang.String description, java.lang.String changeLog, 1905 boolean majorVersion, java.io.InputStream is, long size, 1906 com.liferay.portal.service.ServiceContext serviceContext) 1907 throws PortalException; 1908 1909 /** 1910 * Updates a file shortcut to the existing file entry. This method is only 1911 * supported by the Liferay repository. 1912 * 1913 * @param fileShortcutId the primary key of the file shortcut 1914 * @param folderId the primary key of the file shortcut's parent folder 1915 * @param toFileEntryId the primary key of the file shortcut's file entry 1916 * @param serviceContext the service context to be applied. Can set the 1917 asset category IDs, asset tag names, and expando bridge 1918 attributes for the file entry. 1919 * @return the file shortcut 1920 * @throws PortalException if the file shortcut, folder, or file entry could 1921 not be found 1922 */ 1923 public com.liferay.portal.kernel.repository.model.FileShortcut updateFileShortcut( 1924 long fileShortcutId, long folderId, long toFileEntryId, 1925 com.liferay.portal.service.ServiceContext serviceContext) 1926 throws PortalException; 1927 1928 /** 1929 * Updates the folder. 1930 * 1931 * @param folderId the primary key of the folder 1932 * @param name the folder's new name 1933 * @param description the folder's new description 1934 * @param serviceContext the service context to be applied. In a Liferay 1935 repository, it may include: <ul> <li> defaultFileEntryTypeId - 1936 the file entry type to default all Liferay file entries to </li> 1937 <li> dlFileEntryTypesSearchContainerPrimaryKeys - a 1938 comma-delimited list of file entry type primary keys allowed in 1939 the given folder and all descendants </li> <li> restrictionType - 1940 specifying restriction type of file entry types allowed </li> 1941 <li> workflowDefinitionXYZ - the workflow definition name 1942 specified per file entry type. The parameter name must be the 1943 string <code>workflowDefinition</code> appended by the 1944 <code>fileEntryTypeId</code> (optionally <code>0</code>).</li> 1945 </ul> 1946 * @return the folder 1947 * @throws PortalException if the current or new parent folder could not be 1948 found or if the new parent folder's information was invalid 1949 */ 1950 public com.liferay.portal.kernel.repository.model.Folder updateFolder( 1951 long folderId, java.lang.String name, java.lang.String description, 1952 com.liferay.portal.service.ServiceContext serviceContext) 1953 throws PortalException; 1954 1955 /** 1956 * Returns <code>true</code> if the file entry is checked out. This method 1957 * is primarily used by WebDAV. 1958 * 1959 * @param repositoryId the primary key for the repository 1960 * @param fileEntryId the primary key for the file entry 1961 * @param lockUuid the lock's UUID 1962 * @return <code>true</code> if the file entry is checked out; 1963 <code>false</code> otherwise 1964 * @throws PortalException if the file entry could not be found 1965 */ 1966 public boolean verifyFileEntryCheckOut(long repositoryId, long fileEntryId, 1967 java.lang.String lockUuid) throws PortalException; 1968 1969 public boolean verifyFileEntryLock(long repositoryId, long fileEntryId, 1970 java.lang.String lockUuid) throws PortalException; 1971 1972 /** 1973 * Returns <code>true</code> if the inheritable lock exists. This method is 1974 * primarily used by WebDAV. 1975 * 1976 * @param repositoryId the primary key for the repository 1977 * @param folderId the primary key for the folder 1978 * @param lockUuid the lock's UUID 1979 * @return <code>true</code> if the inheritable lock exists; 1980 <code>false</code> otherwise 1981 * @throws PortalException if the folder could not be found 1982 */ 1983 public boolean verifyInheritableLock(long repositoryId, long folderId, 1984 java.lang.String lockUuid) throws PortalException; 1985 }