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