001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.repository.util;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.lock.Lock;
019    import com.liferay.portal.kernel.repository.Repository;
020    import com.liferay.portal.kernel.repository.capabilities.Capability;
021    import com.liferay.portal.kernel.repository.model.FileEntry;
022    import com.liferay.portal.kernel.repository.model.FileShortcut;
023    import com.liferay.portal.kernel.repository.model.FileVersion;
024    import com.liferay.portal.kernel.repository.model.Folder;
025    import com.liferay.portal.kernel.repository.model.RepositoryEntry;
026    import com.liferay.portal.kernel.search.Hits;
027    import com.liferay.portal.kernel.search.Query;
028    import com.liferay.portal.kernel.search.SearchContext;
029    import com.liferay.portal.kernel.search.SearchException;
030    import com.liferay.portal.kernel.util.OrderByComparator;
031    import com.liferay.portal.service.ServiceContext;
032    
033    import java.io.File;
034    import java.io.InputStream;
035    
036    import java.util.List;
037    
038    /**
039     * @author Adolfo P??rez
040     */
041    public class RepositoryWrapper implements Repository {
042    
043            public RepositoryWrapper(Repository repository) {
044                    _repository = repository;
045            }
046    
047            @Override
048            public FileEntry addFileEntry(
049                            long userId, long folderId, String sourceFileName, String mimeType,
050                            String title, String description, String changeLog, File file,
051                            ServiceContext serviceContext)
052                    throws PortalException {
053    
054                    return _repository.addFileEntry(
055                            userId, folderId, sourceFileName, mimeType, title, description,
056                            changeLog, file, serviceContext);
057            }
058    
059            @Override
060            public FileEntry addFileEntry(
061                            long userId, long folderId, String sourceFileName, String mimeType,
062                            String title, String description, String changeLog, InputStream is,
063                            long size, ServiceContext serviceContext)
064                    throws PortalException {
065    
066                    return _repository.addFileEntry(
067                            userId, folderId, sourceFileName, mimeType, title, description,
068                            changeLog, is, size, serviceContext);
069            }
070    
071            /**
072             * @deprecated As of 7.0.0, see {@link #addFileEntry(long, long, String,
073             *             String, String, String, String, File, ServiceContext)}
074             */
075            @Deprecated
076            @Override
077            public FileEntry addFileEntry(
078                            long folderId, String sourceFileName, String mimeType, String title,
079                            String description, String changeLog, File file,
080                            ServiceContext serviceContext)
081                    throws PortalException {
082    
083                    return _repository.addFileEntry(
084                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
085                                    getUserId(),
086                            folderId, sourceFileName, mimeType, title, description, changeLog,
087                            file, serviceContext);
088            }
089    
090            /**
091             * @deprecated As of 7.0.0, see {@link #addFileEntry(long, long, String,
092             *             String, String, String, String, InputStream, long,
093             *             ServiceContext)}
094             */
095            @Deprecated
096            @Override
097            public FileEntry addFileEntry(
098                            long folderId, String sourceFileName, String mimeType, String title,
099                            String description, String changeLog, InputStream is, long size,
100                            ServiceContext serviceContext)
101                    throws PortalException {
102    
103                    return _repository.addFileEntry(
104                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
105                                    getUserId(),
106                            folderId, sourceFileName, mimeType, title, description, changeLog,
107                            is, size, serviceContext);
108            }
109    
110            @Override
111            public FileShortcut addFileShortcut(
112                            long userId, long folderId, long toFileEntryId,
113                            ServiceContext serviceContext)
114                    throws PortalException {
115    
116                    return _repository.addFileShortcut(
117                            userId, folderId, toFileEntryId, serviceContext);
118            }
119    
120            @Override
121            public Folder addFolder(
122                            long userId, long parentFolderId, String name, String description,
123                            ServiceContext serviceContext)
124                    throws PortalException {
125    
126                    return _repository.addFolder(
127                            userId, parentFolderId, name, description, serviceContext);
128            }
129    
130            /**
131             * @deprecated As of 7.0.0, replaced by {@link #addFolder(long, long,
132             *             String, String, ServiceContext)}
133             */
134            @Deprecated
135            @Override
136            public Folder addFolder(
137                            long parentFolderId, String name, String description,
138                            ServiceContext serviceContext)
139                    throws PortalException {
140    
141                    return _repository.addFolder(
142                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
143                                    getUserId(),
144                            parentFolderId, name, description, serviceContext);
145            }
146    
147            @Override
148            public FileVersion cancelCheckOut(long fileEntryId) throws PortalException {
149                    return _repository.cancelCheckOut(fileEntryId);
150            }
151    
152            /**
153             * @deprecated As of 7.0.0, replaced by {@link #checkInFileEntry(long, long,
154             *             boolean, String, ServiceContext)}
155             */
156            @Deprecated
157            @Override
158            public void checkInFileEntry(
159                            long fileEntryId, boolean major, String changeLog,
160                            ServiceContext serviceContext)
161                    throws PortalException {
162    
163                    _repository.checkInFileEntry(
164                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
165                                    getUserId(),
166                            fileEntryId, major, changeLog, serviceContext);
167            }
168    
169            @Override
170            public void checkInFileEntry(
171                            long userId, long fileEntryId, boolean major, String changeLog,
172                            ServiceContext serviceContext)
173                    throws PortalException {
174    
175                    _repository.checkInFileEntry(
176                            userId, fileEntryId, major, changeLog, serviceContext);
177            }
178    
179            @Override
180            public void checkInFileEntry(
181                            long userId, long fileEntryId, String lockUuid,
182                            ServiceContext serviceContext)
183                    throws PortalException {
184    
185                    _repository.checkInFileEntry(
186                            userId, fileEntryId, lockUuid, serviceContext);
187            }
188    
189            @Deprecated
190            @Override
191            public void checkInFileEntry(long fileEntryId, String lockUuid)
192                    throws PortalException {
193    
194                    _repository.checkInFileEntry(
195                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
196                                    getUserId(),
197                            fileEntryId, lockUuid, new ServiceContext());
198            }
199    
200            /**
201             * @deprecated As of 7.0.0, replaced by {@link #checkInFileEntry(long, long,
202             *             String, ServiceContext)}
203             */
204            @Deprecated
205            @Override
206            public void checkInFileEntry(
207                            long fileEntryId, String lockUuid, ServiceContext serviceContext)
208                    throws PortalException {
209    
210                    _repository.checkInFileEntry(
211                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
212                                    getUserId(),
213                            fileEntryId, lockUuid, serviceContext);
214            }
215    
216            @Override
217            public FileEntry checkOutFileEntry(
218                            long fileEntryId, ServiceContext serviceContext)
219                    throws PortalException {
220    
221                    return _repository.checkOutFileEntry(fileEntryId, serviceContext);
222            }
223    
224            @Override
225            public FileEntry checkOutFileEntry(
226                            long fileEntryId, String owner, long expirationTime,
227                            ServiceContext serviceContext)
228                    throws PortalException {
229    
230                    return _repository.checkOutFileEntry(
231                            fileEntryId, owner, expirationTime, serviceContext);
232            }
233    
234            @Override
235            public FileEntry copyFileEntry(
236                            long userId, long groupId, long fileEntryId, long destFolderId,
237                            ServiceContext serviceContext)
238                    throws PortalException {
239    
240                    return _repository.copyFileEntry(
241                            userId, groupId, fileEntryId, destFolderId, serviceContext);
242            }
243    
244            /**
245             * @deprecated As of 7.0.0, replaced by {@link #copyFileEntry(long, long,
246             *             long, long, ServiceContext)}
247             */
248            @Deprecated
249            @Override
250            public FileEntry copyFileEntry(
251                            long groupId, long fileEntryId, long destFolderId,
252                            ServiceContext serviceContext)
253                    throws PortalException {
254    
255                    return _repository.copyFileEntry(
256                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
257                                    getUserId(),
258                            groupId, fileEntryId, destFolderId, serviceContext);
259            }
260    
261            @Override
262            public void deleteAll() throws PortalException {
263                    _repository.deleteAll();
264            }
265    
266            @Override
267            public void deleteFileEntry(long fileEntryId) throws PortalException {
268                    _repository.deleteFileEntry(fileEntryId);
269            }
270    
271            @Override
272            public void deleteFileEntry(long folderId, String title)
273                    throws PortalException {
274    
275                    _repository.deleteFileEntry(folderId, title);
276            }
277    
278            @Override
279            public void deleteFileShortcut(long fileShortcutId) throws PortalException {
280                    _repository.deleteFileShortcut(fileShortcutId);
281            }
282    
283            @Override
284            public void deleteFileShortcuts(long toFileEntryId) throws PortalException {
285                    _repository.deleteFileShortcuts(toFileEntryId);
286            }
287    
288            @Override
289            public void deleteFileVersion(long fileEntryId, String version)
290                    throws PortalException {
291    
292                    _repository.deleteFileVersion(fileEntryId, version);
293            }
294    
295            @Override
296            public void deleteFolder(long folderId) throws PortalException {
297                    _repository.deleteFolder(folderId);
298            }
299    
300            @Override
301            public void deleteFolder(long parentFolderId, String name)
302                    throws PortalException {
303    
304                    _repository.deleteFolder(parentFolderId, name);
305            }
306    
307            @Override
308            public <T extends Capability> T getCapability(Class<T> capabilityClass) {
309                    return _repository.getCapability(capabilityClass);
310            }
311    
312            @Override
313            public List<FileEntry> getFileEntries(
314                            long folderId, int status, int start, int end,
315                            OrderByComparator<FileEntry> obc)
316                    throws PortalException {
317    
318                    return _repository.getFileEntries(folderId, status, start, end, obc);
319            }
320    
321            @Override
322            public List<FileEntry> getFileEntries(
323                            long folderId, int start, int end, OrderByComparator<FileEntry> obc)
324                    throws PortalException {
325    
326                    return _repository.getFileEntries(folderId, start, end, obc);
327            }
328    
329            @Override
330            public List<FileEntry> getFileEntries(
331                            long folderId, long fileEntryTypeId, int start, int end,
332                            OrderByComparator<FileEntry> obc)
333                    throws PortalException {
334    
335                    return _repository.getFileEntries(
336                            folderId, fileEntryTypeId, start, end, obc);
337            }
338    
339            @Override
340            public List<FileEntry> getFileEntries(
341                            long folderId, String[] mimeTypes, int start, int end,
342                            OrderByComparator<FileEntry> obc)
343                    throws PortalException {
344    
345                    return _repository.getFileEntries(folderId, mimeTypes, start, end, obc);
346            }
347    
348            @Override
349            public List<RepositoryEntry> getFileEntriesAndFileShortcuts(
350                            long folderId, int status, int start, int end)
351                    throws PortalException {
352    
353                    return _repository.getFileEntriesAndFileShortcuts(
354                            folderId, status, start, end);
355            }
356    
357            @Override
358            public int getFileEntriesAndFileShortcutsCount(long folderId, int status)
359                    throws PortalException {
360    
361                    return _repository.getFileEntriesAndFileShortcutsCount(
362                            folderId, status);
363            }
364    
365            @Override
366            public int getFileEntriesAndFileShortcutsCount(
367                            long folderId, int status, String[] mimeTypes)
368                    throws PortalException {
369    
370                    return _repository.getFileEntriesAndFileShortcutsCount(
371                            folderId, status, mimeTypes);
372            }
373    
374            @Override
375            public int getFileEntriesCount(long folderId) throws PortalException {
376                    return _repository.getFileEntriesCount(folderId);
377            }
378    
379            @Override
380            public int getFileEntriesCount(long folderId, int status)
381                    throws PortalException {
382    
383                    return _repository.getFileEntriesCount(folderId, status);
384            }
385    
386            @Override
387            public int getFileEntriesCount(long folderId, long fileEntryTypeId)
388                    throws PortalException {
389    
390                    return _repository.getFileEntriesCount(folderId, fileEntryTypeId);
391            }
392    
393            @Override
394            public int getFileEntriesCount(long folderId, String[] mimeTypes)
395                    throws PortalException {
396    
397                    return _repository.getFileEntriesCount(folderId, mimeTypes);
398            }
399    
400            @Override
401            public FileEntry getFileEntry(long fileEntryId) throws PortalException {
402                    return _repository.getFileEntry(fileEntryId);
403            }
404    
405            @Override
406            public FileEntry getFileEntry(long folderId, String title)
407                    throws PortalException {
408    
409                    return _repository.getFileEntry(folderId, title);
410            }
411    
412            @Override
413            public FileEntry getFileEntryByUuid(String uuid) throws PortalException {
414                    return _repository.getFileEntryByUuid(uuid);
415            }
416    
417            @Override
418            public FileShortcut getFileShortcut(long fileShortcutId)
419                    throws PortalException {
420    
421                    return _repository.getFileShortcut(fileShortcutId);
422            }
423    
424            @Override
425            public FileVersion getFileVersion(long fileVersionId)
426                    throws PortalException {
427    
428                    return _repository.getFileVersion(fileVersionId);
429            }
430    
431            @Override
432            public Folder getFolder(long folderId) throws PortalException {
433                    return _repository.getFolder(folderId);
434            }
435    
436            @Override
437            public Folder getFolder(long parentFolderId, String name)
438                    throws PortalException {
439    
440                    return _repository.getFolder(parentFolderId, name);
441            }
442    
443            @Override
444            public List<Folder> getFolders(
445                            long parentFolderId, boolean includeMountFolders, int start,
446                            int end, OrderByComparator<Folder> obc)
447                    throws PortalException {
448    
449                    return _repository.getFolders(
450                            parentFolderId, includeMountFolders, start, end, obc);
451            }
452    
453            @Override
454            public List<Folder> getFolders(
455                            long parentFolderId, int status, boolean includeMountFolders,
456                            int start, int end, OrderByComparator<Folder> obc)
457                    throws PortalException {
458    
459                    return _repository.getFolders(
460                            parentFolderId, status, includeMountFolders, start, end, obc);
461            }
462    
463            @Override
464            public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
465                            long folderId, int status, boolean includeMountFolders, int start,
466                            int end, OrderByComparator<?> obc)
467                    throws PortalException {
468    
469                    return _repository.getFoldersAndFileEntriesAndFileShortcuts(
470                            folderId, status, includeMountFolders, start, end, obc);
471            }
472    
473            @Override
474            public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
475                            long folderId, int status, String[] mimetypes,
476                            boolean includeMountFolders, int start, int end,
477                            OrderByComparator<?> obc)
478                    throws PortalException {
479    
480                    return _repository.getFoldersAndFileEntriesAndFileShortcuts(
481                            folderId, status, mimetypes, includeMountFolders, start, end, obc);
482            }
483    
484            @Override
485            public int getFoldersAndFileEntriesAndFileShortcutsCount(
486                            long folderId, int status, boolean includeMountFolders)
487                    throws PortalException {
488    
489                    return _repository.getFoldersAndFileEntriesAndFileShortcutsCount(
490                            folderId, status, includeMountFolders);
491            }
492    
493            @Override
494            public int getFoldersAndFileEntriesAndFileShortcutsCount(
495                            long folderId, int status, String[] mimetypes,
496                            boolean includeMountFolders)
497                    throws PortalException {
498    
499                    return _repository.getFoldersAndFileEntriesAndFileShortcutsCount(
500                            folderId, status, mimetypes, includeMountFolders);
501            }
502    
503            @Override
504            public int getFoldersCount(long parentFolderId, boolean includeMountfolders)
505                    throws PortalException {
506    
507                    return _repository.getFoldersCount(parentFolderId, includeMountfolders);
508            }
509    
510            @Override
511            public int getFoldersCount(
512                            long parentFolderId, int status, boolean includeMountfolders)
513                    throws PortalException {
514    
515                    return _repository.getFoldersCount(
516                            parentFolderId, status, includeMountfolders);
517            }
518    
519            @Override
520            public int getFoldersFileEntriesCount(List<Long> folderIds, int status)
521                    throws PortalException {
522    
523                    return _repository.getFoldersFileEntriesCount(folderIds, status);
524            }
525    
526            @Override
527            public List<Folder> getMountFolders(
528                            long parentFolderId, int start, int end,
529                            OrderByComparator<Folder> obc)
530                    throws PortalException {
531    
532                    return _repository.getMountFolders(parentFolderId, start, end, obc);
533            }
534    
535            @Override
536            public int getMountFoldersCount(long parentFolderId)
537                    throws PortalException {
538    
539                    return _repository.getMountFoldersCount(parentFolderId);
540            }
541    
542            @Override
543            public List<FileEntry> getRepositoryFileEntries(
544                            long userId, long rootFolderId, int start, int end,
545                            OrderByComparator<FileEntry> obc)
546                    throws PortalException {
547    
548                    return _repository.getRepositoryFileEntries(
549                            userId, rootFolderId, start, end, obc);
550            }
551    
552            @Override
553            public List<FileEntry> getRepositoryFileEntries(
554                            long userId, long rootFolderId, String[] mimeTypes, int status,
555                            int start, int end, OrderByComparator<FileEntry> obc)
556                    throws PortalException {
557    
558                    return _repository.getRepositoryFileEntries(
559                            userId, rootFolderId, mimeTypes, status, start, end, obc);
560            }
561    
562            @Override
563            public int getRepositoryFileEntriesCount(long userId, long rootFolderId)
564                    throws PortalException {
565    
566                    return _repository.getRepositoryFileEntriesCount(userId, rootFolderId);
567            }
568    
569            @Override
570            public int getRepositoryFileEntriesCount(
571                            long userId, long rootFolderId, String[] mimeTypes, int status)
572                    throws PortalException {
573    
574                    return _repository.getRepositoryFileEntriesCount(
575                            userId, rootFolderId, mimeTypes, status);
576            }
577    
578            @Override
579            public long getRepositoryId() {
580                    return _repository.getRepositoryId();
581            }
582    
583            @Override
584            public void getSubfolderIds(List<Long> folderIds, long folderId)
585                    throws PortalException {
586    
587                    _repository.getSubfolderIds(folderIds, folderId);
588            }
589    
590            @Override
591            public List<Long> getSubfolderIds(long folderId, boolean recurse)
592                    throws PortalException {
593    
594                    return _repository.getSubfolderIds(folderId, recurse);
595            }
596    
597            @Override
598            public <T extends Capability> boolean isCapabilityProvided(
599                    Class<T> capabilityClass) {
600    
601                    return _repository.isCapabilityProvided(capabilityClass);
602            }
603    
604            @Override
605            public Lock lockFolder(long folderId) throws PortalException {
606                    return _repository.lockFolder(folderId);
607            }
608    
609            @Override
610            public Lock lockFolder(
611                            long folderId, String owner, boolean inheritable,
612                            long expirationTime)
613                    throws PortalException {
614    
615                    return _repository.lockFolder(
616                            folderId, owner, inheritable, expirationTime);
617            }
618    
619            @Override
620            public FileEntry moveFileEntry(
621                            long userId, long fileEntryId, long newFolderId,
622                            ServiceContext serviceContext)
623                    throws PortalException {
624    
625                    return _repository.moveFileEntry(
626                            userId, fileEntryId, newFolderId, serviceContext);
627            }
628    
629            /**
630             * @deprecated As of 7.0.0, replaced by {@link #moveFileEntry(long, long,
631             *             long, ServiceContext)}
632             */
633            @Deprecated
634            @Override
635            public FileEntry moveFileEntry(
636                            long fileEntryId, long newFolderId, ServiceContext serviceContext)
637                    throws PortalException {
638    
639                    return _repository.moveFileEntry(
640                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
641                                    getUserId(),
642                            fileEntryId, newFolderId, serviceContext);
643            }
644    
645            @Override
646            public Folder moveFolder(
647                            long userId, long folderId, long parentFolderId,
648                            ServiceContext serviceContext)
649                    throws PortalException {
650    
651                    return _repository.moveFolder(
652                            userId, folderId, parentFolderId, serviceContext);
653            }
654    
655            /**
656             * @deprecated As of 7.0.0, replaced by {@link #moveFolder(long, long, long,
657             *             ServiceContext)}
658             */
659            @Deprecated
660            @Override
661            public Folder moveFolder(
662                            long folderId, long newParentFolderId,
663                            ServiceContext serviceContext)
664                    throws PortalException {
665    
666                    return _repository.moveFolder(
667                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
668                                    getUserId(),
669                            newParentFolderId, serviceContext);
670            }
671    
672            @Override
673            public Lock refreshFileEntryLock(
674                            String lockUuid, long companyId, long expirationTime)
675                    throws PortalException {
676    
677                    return _repository.refreshFileEntryLock(
678                            lockUuid, companyId, expirationTime);
679            }
680    
681            @Override
682            public Lock refreshFolderLock(
683                            String lockUuid, long companyId, long expirationTime)
684                    throws PortalException {
685    
686                    return _repository.refreshFolderLock(
687                            lockUuid, companyId, expirationTime);
688            }
689    
690            @Override
691            public void revertFileEntry(
692                            long userId, long fileEntryId, String version,
693                            ServiceContext serviceContext)
694                    throws PortalException {
695    
696                    _repository.revertFileEntry(
697                            userId, fileEntryId, version, serviceContext);
698            }
699    
700            /**
701             * @deprecated As of 7.0.0, replaced by {@link #revertFileEntry(long, long,
702             *             String, ServiceContext)}
703             */
704            @Deprecated
705            @Override
706            public void revertFileEntry(
707                            long fileEntryId, String version, ServiceContext serviceContext)
708                    throws PortalException {
709    
710                    _repository.revertFileEntry(
711                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
712                                    getUserId(),
713                            fileEntryId, version, serviceContext);
714            }
715    
716            @Override
717            public Hits search(long creatorUserId, int status, int start, int end)
718                    throws PortalException {
719    
720                    return _repository.search(creatorUserId, status, start, end);
721            }
722    
723            @Override
724            public Hits search(
725                            long creatorUserId, long folderId, String[] mimeTypes, int status,
726                            int start, int end)
727                    throws PortalException {
728    
729                    return _repository.search(
730                            creatorUserId, folderId, mimeTypes, status, start, end);
731            }
732    
733            @Override
734            public Hits search(SearchContext searchContext) throws SearchException {
735                    return _repository.search(searchContext);
736            }
737    
738            @Override
739            public Hits search(SearchContext searchContext, Query query)
740                    throws SearchException {
741    
742                    return _repository.search(searchContext, query);
743            }
744    
745            @Override
746            public void unlockFolder(long folderId, String lockUuid)
747                    throws PortalException {
748    
749                    _repository.unlockFolder(folderId, lockUuid);
750            }
751    
752            @Override
753            public void unlockFolder(long parentFolderId, String name, String lockUuid)
754                    throws PortalException {
755    
756                    _repository.unlockFolder(parentFolderId, name, lockUuid);
757            }
758    
759            @Override
760            public FileEntry updateFileEntry(
761                            long userId, long fileEntryId, String sourceFileName,
762                            String mimeType, String title, String description, String changeLog,
763                            boolean majorVersion, File file, ServiceContext serviceContext)
764                    throws PortalException {
765    
766                    return _repository.updateFileEntry(
767                            userId, fileEntryId, sourceFileName, mimeType, title, description,
768                            changeLog, majorVersion, file, serviceContext);
769            }
770    
771            @Override
772            public FileEntry updateFileEntry(
773                            long userId, long fileEntryId, String sourceFileName,
774                            String mimeType, String title, String description, String changeLog,
775                            boolean majorVersion, InputStream is, long size,
776                            ServiceContext serviceContext)
777                    throws PortalException {
778    
779                    return _repository.updateFileEntry(
780                            userId, fileEntryId, sourceFileName, mimeType, title, description,
781                            changeLog, majorVersion, is, size, serviceContext);
782            }
783    
784            /**
785             * @deprecated As of 7.0.0, replaced by {@link #updateFileEntry(long, long,
786             *             String, String, String, String, String, boolean, File,
787             *             ServiceContext)}
788             */
789            @Deprecated
790            @Override
791            public FileEntry updateFileEntry(
792                            long fileEntryId, String sourceFileName, String mimeType,
793                            String title, String description, String changeLog,
794                            boolean majorVersion, File file, ServiceContext serviceContext)
795                    throws PortalException {
796    
797                    return _repository.updateFileEntry(
798                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
799                                    getUserId(),
800                            fileEntryId, sourceFileName, mimeType, title, description,
801                            changeLog, majorVersion, file, serviceContext);
802            }
803    
804            /**
805             * @deprecated As of 7.0.0, replaced by {@link #updateFileEntry(long, long,
806             *             String, String, String, String, String, boolean, InputStream,
807             *             long, ServiceContext)}
808             */
809            @Deprecated
810            @Override
811            public FileEntry updateFileEntry(
812                            long fileEntryId, String sourceFileName, String mimeType,
813                            String title, String description, String changeLog,
814                            boolean majorVersion, InputStream is, long size,
815                            ServiceContext serviceContext)
816                    throws PortalException {
817    
818                    return _repository.updateFileEntry(
819                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
820                                    getUserId(),
821                            fileEntryId, sourceFileName, mimeType, title, description,
822                            changeLog, majorVersion, is, size, serviceContext);
823            }
824    
825            @Override
826            public FileShortcut updateFileShortcut(
827                            long userId, long fileShortcutId, long folderId, long toFileEntryId,
828                            ServiceContext serviceContext)
829                    throws PortalException {
830    
831                    return _repository.updateFileShortcut(
832                            userId, fileShortcutId, folderId, toFileEntryId, serviceContext);
833            }
834    
835            @Override
836            public void updateFileShortcuts(
837                            long oldToFileEntryId, long newToFileEntryId)
838                    throws PortalException {
839    
840                    _repository.updateFileShortcuts(oldToFileEntryId, newToFileEntryId);
841            }
842    
843            @Override
844            public Folder updateFolder(
845                            long folderId, long parentFolderId, String name, String description,
846                            ServiceContext serviceContext)
847                    throws PortalException {
848    
849                    return _repository.updateFolder(
850                            folderId, parentFolderId, name, description, serviceContext);
851            }
852    
853            @Override
854            public Folder updateFolder(
855                            long folderId, String name, String description,
856                            ServiceContext serviceContext)
857                    throws PortalException {
858    
859                    return _repository.updateFolder(
860                            folderId, name, description, serviceContext);
861            }
862    
863            @Override
864            public boolean verifyFileEntryCheckOut(long fileEntryId, String lockUuid)
865                    throws PortalException {
866    
867                    return _repository.verifyFileEntryCheckOut(fileEntryId, lockUuid);
868            }
869    
870            @Override
871            public boolean verifyFileEntryLock(long fileEntryId, String lockUuid)
872                    throws PortalException {
873    
874                    return _repository.verifyFileEntryLock(fileEntryId, lockUuid);
875            }
876    
877            @Override
878            public boolean verifyInheritableLock(long folderId, String lockUuid)
879                    throws PortalException {
880    
881                    return _repository.verifyInheritableLock(folderId, lockUuid);
882            }
883    
884            private final Repository _repository;
885    
886    }