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.service.ServiceContext;
031    import com.liferay.portal.kernel.util.OrderByComparator;
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 majorVersion, String changeLog,
160                            ServiceContext serviceContext)
161                    throws PortalException {
162    
163                    _repository.checkInFileEntry(
164                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
165                                    getUserId(),
166                            fileEntryId, majorVersion, changeLog, serviceContext);
167            }
168    
169            @Override
170            public void checkInFileEntry(
171                            long userId, long fileEntryId, boolean majorVersion,
172                            String changeLog, ServiceContext serviceContext)
173                    throws PortalException {
174    
175                    _repository.checkInFileEntry(
176                            userId, fileEntryId, majorVersion, 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            /**
190             * @deprecated As of 7.0.0, replaced by {@link #checkInFileEntry(long, long,
191             *             String, ServiceContext)}
192             */
193            @Deprecated
194            @Override
195            public void checkInFileEntry(
196                            long fileEntryId, String lockUuid, ServiceContext serviceContext)
197                    throws PortalException {
198    
199                    _repository.checkInFileEntry(
200                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
201                                    getUserId(),
202                            fileEntryId, lockUuid, serviceContext);
203            }
204    
205            @Override
206            public FileEntry checkOutFileEntry(
207                            long fileEntryId, ServiceContext serviceContext)
208                    throws PortalException {
209    
210                    return _repository.checkOutFileEntry(fileEntryId, serviceContext);
211            }
212    
213            @Override
214            public FileEntry checkOutFileEntry(
215                            long fileEntryId, String owner, long expirationTime,
216                            ServiceContext serviceContext)
217                    throws PortalException {
218    
219                    return _repository.checkOutFileEntry(
220                            fileEntryId, owner, expirationTime, serviceContext);
221            }
222    
223            @Override
224            public FileEntry copyFileEntry(
225                            long userId, long groupId, long fileEntryId, long destFolderId,
226                            ServiceContext serviceContext)
227                    throws PortalException {
228    
229                    return _repository.copyFileEntry(
230                            userId, groupId, fileEntryId, destFolderId, serviceContext);
231            }
232    
233            /**
234             * @deprecated As of 7.0.0, replaced by {@link #copyFileEntry(long, long,
235             *             long, long, ServiceContext)}
236             */
237            @Deprecated
238            @Override
239            public FileEntry copyFileEntry(
240                            long groupId, long fileEntryId, long destFolderId,
241                            ServiceContext serviceContext)
242                    throws PortalException {
243    
244                    return _repository.copyFileEntry(
245                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
246                                    getUserId(),
247                            groupId, fileEntryId, destFolderId, serviceContext);
248            }
249    
250            @Override
251            public void deleteAll() throws PortalException {
252                    _repository.deleteAll();
253            }
254    
255            @Override
256            public void deleteFileEntry(long fileEntryId) throws PortalException {
257                    _repository.deleteFileEntry(fileEntryId);
258            }
259    
260            @Override
261            public void deleteFileEntry(long folderId, String title)
262                    throws PortalException {
263    
264                    _repository.deleteFileEntry(folderId, title);
265            }
266    
267            @Override
268            public void deleteFileShortcut(long fileShortcutId) throws PortalException {
269                    _repository.deleteFileShortcut(fileShortcutId);
270            }
271    
272            @Override
273            public void deleteFileShortcuts(long toFileEntryId) throws PortalException {
274                    _repository.deleteFileShortcuts(toFileEntryId);
275            }
276    
277            @Override
278            public void deleteFileVersion(long fileEntryId, String version)
279                    throws PortalException {
280    
281                    _repository.deleteFileVersion(fileEntryId, version);
282            }
283    
284            @Override
285            public void deleteFolder(long folderId) throws PortalException {
286                    _repository.deleteFolder(folderId);
287            }
288    
289            @Override
290            public void deleteFolder(long parentFolderId, String name)
291                    throws PortalException {
292    
293                    _repository.deleteFolder(parentFolderId, name);
294            }
295    
296            @Override
297            public <T extends Capability> T getCapability(Class<T> capabilityClass) {
298                    return _repository.getCapability(capabilityClass);
299            }
300    
301            @Override
302            public List<FileEntry> getFileEntries(
303                            long folderId, int status, int start, int end,
304                            OrderByComparator<FileEntry> obc)
305                    throws PortalException {
306    
307                    return _repository.getFileEntries(folderId, status, start, end, obc);
308            }
309    
310            @Override
311            public List<FileEntry> getFileEntries(
312                            long folderId, int start, int end, OrderByComparator<FileEntry> obc)
313                    throws PortalException {
314    
315                    return _repository.getFileEntries(folderId, start, end, obc);
316            }
317    
318            @Override
319            public List<FileEntry> getFileEntries(
320                            long folderId, long fileEntryTypeId, int start, int end,
321                            OrderByComparator<FileEntry> obc)
322                    throws PortalException {
323    
324                    return _repository.getFileEntries(
325                            folderId, fileEntryTypeId, start, end, obc);
326            }
327    
328            @Override
329            public List<FileEntry> getFileEntries(
330                            long folderId, String[] mimeTypes, int start, int end,
331                            OrderByComparator<FileEntry> obc)
332                    throws PortalException {
333    
334                    return _repository.getFileEntries(folderId, mimeTypes, start, end, obc);
335            }
336    
337            @Override
338            public List<RepositoryEntry> getFileEntriesAndFileShortcuts(
339                            long folderId, int status, int start, int end)
340                    throws PortalException {
341    
342                    return _repository.getFileEntriesAndFileShortcuts(
343                            folderId, status, start, end);
344            }
345    
346            @Override
347            public int getFileEntriesAndFileShortcutsCount(long folderId, int status)
348                    throws PortalException {
349    
350                    return _repository.getFileEntriesAndFileShortcutsCount(
351                            folderId, status);
352            }
353    
354            @Override
355            public int getFileEntriesAndFileShortcutsCount(
356                            long folderId, int status, String[] mimeTypes)
357                    throws PortalException {
358    
359                    return _repository.getFileEntriesAndFileShortcutsCount(
360                            folderId, status, mimeTypes);
361            }
362    
363            @Override
364            public int getFileEntriesCount(long folderId) throws PortalException {
365                    return _repository.getFileEntriesCount(folderId);
366            }
367    
368            @Override
369            public int getFileEntriesCount(long folderId, int status)
370                    throws PortalException {
371    
372                    return _repository.getFileEntriesCount(folderId, status);
373            }
374    
375            @Override
376            public int getFileEntriesCount(long folderId, long fileEntryTypeId)
377                    throws PortalException {
378    
379                    return _repository.getFileEntriesCount(folderId, fileEntryTypeId);
380            }
381    
382            @Override
383            public int getFileEntriesCount(long folderId, String[] mimeTypes)
384                    throws PortalException {
385    
386                    return _repository.getFileEntriesCount(folderId, mimeTypes);
387            }
388    
389            @Override
390            public FileEntry getFileEntry(long fileEntryId) throws PortalException {
391                    return _repository.getFileEntry(fileEntryId);
392            }
393    
394            @Override
395            public FileEntry getFileEntry(long folderId, String title)
396                    throws PortalException {
397    
398                    return _repository.getFileEntry(folderId, title);
399            }
400    
401            @Override
402            public FileEntry getFileEntryByUuid(String uuid) throws PortalException {
403                    return _repository.getFileEntryByUuid(uuid);
404            }
405    
406            @Override
407            public FileShortcut getFileShortcut(long fileShortcutId)
408                    throws PortalException {
409    
410                    return _repository.getFileShortcut(fileShortcutId);
411            }
412    
413            @Override
414            public FileVersion getFileVersion(long fileVersionId)
415                    throws PortalException {
416    
417                    return _repository.getFileVersion(fileVersionId);
418            }
419    
420            @Override
421            public Folder getFolder(long folderId) throws PortalException {
422                    return _repository.getFolder(folderId);
423            }
424    
425            @Override
426            public Folder getFolder(long parentFolderId, String name)
427                    throws PortalException {
428    
429                    return _repository.getFolder(parentFolderId, name);
430            }
431    
432            @Override
433            public List<Folder> getFolders(
434                            long parentFolderId, boolean includeMountFolders, int start,
435                            int end, OrderByComparator<Folder> obc)
436                    throws PortalException {
437    
438                    return _repository.getFolders(
439                            parentFolderId, includeMountFolders, start, end, obc);
440            }
441    
442            @Override
443            public List<Folder> getFolders(
444                            long parentFolderId, int status, boolean includeMountFolders,
445                            int start, int end, OrderByComparator<Folder> obc)
446                    throws PortalException {
447    
448                    return _repository.getFolders(
449                            parentFolderId, status, includeMountFolders, start, end, obc);
450            }
451    
452            @Override
453            public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
454                            long folderId, int status, boolean includeMountFolders, int start,
455                            int end, OrderByComparator<?> obc)
456                    throws PortalException {
457    
458                    return _repository.getFoldersAndFileEntriesAndFileShortcuts(
459                            folderId, status, includeMountFolders, start, end, obc);
460            }
461    
462            @Override
463            public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
464                            long folderId, int status, String[] mimetypes,
465                            boolean includeMountFolders, int start, int end,
466                            OrderByComparator<?> obc)
467                    throws PortalException {
468    
469                    return _repository.getFoldersAndFileEntriesAndFileShortcuts(
470                            folderId, status, mimetypes, includeMountFolders, start, end, obc);
471            }
472    
473            @Override
474            public int getFoldersAndFileEntriesAndFileShortcutsCount(
475                            long folderId, int status, boolean includeMountFolders)
476                    throws PortalException {
477    
478                    return _repository.getFoldersAndFileEntriesAndFileShortcutsCount(
479                            folderId, status, includeMountFolders);
480            }
481    
482            @Override
483            public int getFoldersAndFileEntriesAndFileShortcutsCount(
484                            long folderId, int status, String[] mimetypes,
485                            boolean includeMountFolders)
486                    throws PortalException {
487    
488                    return _repository.getFoldersAndFileEntriesAndFileShortcutsCount(
489                            folderId, status, mimetypes, includeMountFolders);
490            }
491    
492            @Override
493            public int getFoldersCount(long parentFolderId, boolean includeMountfolders)
494                    throws PortalException {
495    
496                    return _repository.getFoldersCount(parentFolderId, includeMountfolders);
497            }
498    
499            @Override
500            public int getFoldersCount(
501                            long parentFolderId, int status, boolean includeMountfolders)
502                    throws PortalException {
503    
504                    return _repository.getFoldersCount(
505                            parentFolderId, status, includeMountfolders);
506            }
507    
508            @Override
509            public int getFoldersFileEntriesCount(List<Long> folderIds, int status)
510                    throws PortalException {
511    
512                    return _repository.getFoldersFileEntriesCount(folderIds, status);
513            }
514    
515            @Override
516            public List<Folder> getMountFolders(
517                            long parentFolderId, int start, int end,
518                            OrderByComparator<Folder> obc)
519                    throws PortalException {
520    
521                    return _repository.getMountFolders(parentFolderId, start, end, obc);
522            }
523    
524            @Override
525            public int getMountFoldersCount(long parentFolderId)
526                    throws PortalException {
527    
528                    return _repository.getMountFoldersCount(parentFolderId);
529            }
530    
531            @Override
532            public List<FileEntry> getRepositoryFileEntries(
533                            long userId, long rootFolderId, int start, int end,
534                            OrderByComparator<FileEntry> obc)
535                    throws PortalException {
536    
537                    return _repository.getRepositoryFileEntries(
538                            userId, rootFolderId, start, end, obc);
539            }
540    
541            @Override
542            public List<FileEntry> getRepositoryFileEntries(
543                            long userId, long rootFolderId, String[] mimeTypes, int status,
544                            int start, int end, OrderByComparator<FileEntry> obc)
545                    throws PortalException {
546    
547                    return _repository.getRepositoryFileEntries(
548                            userId, rootFolderId, mimeTypes, status, start, end, obc);
549            }
550    
551            @Override
552            public int getRepositoryFileEntriesCount(long userId, long rootFolderId)
553                    throws PortalException {
554    
555                    return _repository.getRepositoryFileEntriesCount(userId, rootFolderId);
556            }
557    
558            @Override
559            public int getRepositoryFileEntriesCount(
560                            long userId, long rootFolderId, String[] mimeTypes, int status)
561                    throws PortalException {
562    
563                    return _repository.getRepositoryFileEntriesCount(
564                            userId, rootFolderId, mimeTypes, status);
565            }
566    
567            @Override
568            public long getRepositoryId() {
569                    return _repository.getRepositoryId();
570            }
571    
572            @Override
573            public void getSubfolderIds(List<Long> folderIds, long folderId)
574                    throws PortalException {
575    
576                    _repository.getSubfolderIds(folderIds, folderId);
577            }
578    
579            @Override
580            public List<Long> getSubfolderIds(long folderId, boolean recurse)
581                    throws PortalException {
582    
583                    return _repository.getSubfolderIds(folderId, recurse);
584            }
585    
586            @Override
587            public <T extends Capability> boolean isCapabilityProvided(
588                    Class<T> capabilityClass) {
589    
590                    return _repository.isCapabilityProvided(capabilityClass);
591            }
592    
593            @Override
594            public Lock lockFolder(long folderId) throws PortalException {
595                    return _repository.lockFolder(folderId);
596            }
597    
598            @Override
599            public Lock lockFolder(
600                            long folderId, String owner, boolean inheritable,
601                            long expirationTime)
602                    throws PortalException {
603    
604                    return _repository.lockFolder(
605                            folderId, owner, inheritable, expirationTime);
606            }
607    
608            @Override
609            public FileEntry moveFileEntry(
610                            long userId, long fileEntryId, long newFolderId,
611                            ServiceContext serviceContext)
612                    throws PortalException {
613    
614                    return _repository.moveFileEntry(
615                            userId, fileEntryId, newFolderId, serviceContext);
616            }
617    
618            /**
619             * @deprecated As of 7.0.0, replaced by {@link #moveFileEntry(long, long,
620             *             long, ServiceContext)}
621             */
622            @Deprecated
623            @Override
624            public FileEntry moveFileEntry(
625                            long fileEntryId, long newFolderId, ServiceContext serviceContext)
626                    throws PortalException {
627    
628                    return _repository.moveFileEntry(
629                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
630                                    getUserId(),
631                            fileEntryId, newFolderId, serviceContext);
632            }
633    
634            @Override
635            public Folder moveFolder(
636                            long userId, long folderId, long parentFolderId,
637                            ServiceContext serviceContext)
638                    throws PortalException {
639    
640                    return _repository.moveFolder(
641                            userId, folderId, parentFolderId, serviceContext);
642            }
643    
644            /**
645             * @deprecated As of 7.0.0, replaced by {@link #moveFolder(long, long, long,
646             *             ServiceContext)}
647             */
648            @Deprecated
649            @Override
650            public Folder moveFolder(
651                            long folderId, long newParentFolderId,
652                            ServiceContext serviceContext)
653                    throws PortalException {
654    
655                    return _repository.moveFolder(
656                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
657                                    getUserId(),
658                            newParentFolderId, serviceContext);
659            }
660    
661            @Override
662            public Lock refreshFileEntryLock(
663                            String lockUuid, long companyId, long expirationTime)
664                    throws PortalException {
665    
666                    return _repository.refreshFileEntryLock(
667                            lockUuid, companyId, expirationTime);
668            }
669    
670            @Override
671            public Lock refreshFolderLock(
672                            String lockUuid, long companyId, long expirationTime)
673                    throws PortalException {
674    
675                    return _repository.refreshFolderLock(
676                            lockUuid, companyId, expirationTime);
677            }
678    
679            @Override
680            public void revertFileEntry(
681                            long userId, long fileEntryId, String version,
682                            ServiceContext serviceContext)
683                    throws PortalException {
684    
685                    _repository.revertFileEntry(
686                            userId, fileEntryId, version, serviceContext);
687            }
688    
689            /**
690             * @deprecated As of 7.0.0, replaced by {@link #revertFileEntry(long, long,
691             *             String, ServiceContext)}
692             */
693            @Deprecated
694            @Override
695            public void revertFileEntry(
696                            long fileEntryId, String version, ServiceContext serviceContext)
697                    throws PortalException {
698    
699                    _repository.revertFileEntry(
700                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
701                                    getUserId(),
702                            fileEntryId, version, serviceContext);
703            }
704    
705            @Override
706            public Hits search(long creatorUserId, int status, int start, int end)
707                    throws PortalException {
708    
709                    return _repository.search(creatorUserId, status, start, end);
710            }
711    
712            @Override
713            public Hits search(
714                            long creatorUserId, long folderId, String[] mimeTypes, int status,
715                            int start, int end)
716                    throws PortalException {
717    
718                    return _repository.search(
719                            creatorUserId, folderId, mimeTypes, status, start, end);
720            }
721    
722            @Override
723            public Hits search(SearchContext searchContext) throws SearchException {
724                    return _repository.search(searchContext);
725            }
726    
727            @Override
728            public Hits search(SearchContext searchContext, Query query)
729                    throws SearchException {
730    
731                    return _repository.search(searchContext, query);
732            }
733    
734            @Override
735            public void unlockFolder(long folderId, String lockUuid)
736                    throws PortalException {
737    
738                    _repository.unlockFolder(folderId, lockUuid);
739            }
740    
741            @Override
742            public void unlockFolder(long parentFolderId, String name, String lockUuid)
743                    throws PortalException {
744    
745                    _repository.unlockFolder(parentFolderId, name, lockUuid);
746            }
747    
748            @Override
749            public FileEntry updateFileEntry(
750                            long userId, long fileEntryId, String sourceFileName,
751                            String mimeType, String title, String description, String changeLog,
752                            boolean majorVersion, File file, ServiceContext serviceContext)
753                    throws PortalException {
754    
755                    return _repository.updateFileEntry(
756                            userId, fileEntryId, sourceFileName, mimeType, title, description,
757                            changeLog, majorVersion, file, serviceContext);
758            }
759    
760            @Override
761            public FileEntry updateFileEntry(
762                            long userId, long fileEntryId, String sourceFileName,
763                            String mimeType, String title, String description, String changeLog,
764                            boolean majorVersion, InputStream is, long size,
765                            ServiceContext serviceContext)
766                    throws PortalException {
767    
768                    return _repository.updateFileEntry(
769                            userId, fileEntryId, sourceFileName, mimeType, title, description,
770                            changeLog, majorVersion, is, size, serviceContext);
771            }
772    
773            /**
774             * @deprecated As of 7.0.0, replaced by {@link #updateFileEntry(long, long,
775             *             String, String, String, String, String, boolean, File,
776             *             ServiceContext)}
777             */
778            @Deprecated
779            @Override
780            public FileEntry updateFileEntry(
781                            long fileEntryId, String sourceFileName, String mimeType,
782                            String title, String description, String changeLog,
783                            boolean majorVersion, File file, ServiceContext serviceContext)
784                    throws PortalException {
785    
786                    return _repository.updateFileEntry(
787                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
788                                    getUserId(),
789                            fileEntryId, sourceFileName, mimeType, title, description,
790                            changeLog, majorVersion, file, serviceContext);
791            }
792    
793            /**
794             * @deprecated As of 7.0.0, replaced by {@link #updateFileEntry(long, long,
795             *             String, String, String, String, String, boolean, InputStream,
796             *             long, ServiceContext)}
797             */
798            @Deprecated
799            @Override
800            public FileEntry updateFileEntry(
801                            long fileEntryId, String sourceFileName, String mimeType,
802                            String title, String description, String changeLog,
803                            boolean majorVersion, InputStream is, long size,
804                            ServiceContext serviceContext)
805                    throws PortalException {
806    
807                    return _repository.updateFileEntry(
808                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
809                                    getUserId(),
810                            fileEntryId, sourceFileName, mimeType, title, description,
811                            changeLog, majorVersion, is, size, serviceContext);
812            }
813    
814            @Override
815            public FileShortcut updateFileShortcut(
816                            long userId, long fileShortcutId, long folderId, long toFileEntryId,
817                            ServiceContext serviceContext)
818                    throws PortalException {
819    
820                    return _repository.updateFileShortcut(
821                            userId, fileShortcutId, folderId, toFileEntryId, serviceContext);
822            }
823    
824            @Override
825            public void updateFileShortcuts(
826                            long oldToFileEntryId, long newToFileEntryId)
827                    throws PortalException {
828    
829                    _repository.updateFileShortcuts(oldToFileEntryId, newToFileEntryId);
830            }
831    
832            @Override
833            public Folder updateFolder(
834                            long folderId, long parentFolderId, String name, String description,
835                            ServiceContext serviceContext)
836                    throws PortalException {
837    
838                    return _repository.updateFolder(
839                            folderId, parentFolderId, name, description, serviceContext);
840            }
841    
842            @Override
843            public Folder updateFolder(
844                            long folderId, String name, String description,
845                            ServiceContext serviceContext)
846                    throws PortalException {
847    
848                    return _repository.updateFolder(
849                            folderId, name, description, serviceContext);
850            }
851    
852            @Override
853            public boolean verifyFileEntryCheckOut(long fileEntryId, String lockUuid)
854                    throws PortalException {
855    
856                    return _repository.verifyFileEntryCheckOut(fileEntryId, lockUuid);
857            }
858    
859            @Override
860            public boolean verifyFileEntryLock(long fileEntryId, String lockUuid)
861                    throws PortalException {
862    
863                    return _repository.verifyFileEntryLock(fileEntryId, lockUuid);
864            }
865    
866            @Override
867            public boolean verifyInheritableLock(long folderId, String lockUuid)
868                    throws PortalException {
869    
870                    return _repository.verifyInheritableLock(folderId, lockUuid);
871            }
872    
873            private final Repository _repository;
874    
875    }