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.kernel.repository.proxy;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.asset.kernel.service.AssetEntryLocalService;
020    import com.liferay.document.library.kernel.service.DLAppHelperLocalService;
021    import com.liferay.document.library.kernel.service.DLFolderLocalService;
022    import com.liferay.portal.kernel.exception.PortalException;
023    import com.liferay.portal.kernel.lock.Lock;
024    import com.liferay.portal.kernel.repository.BaseRepository;
025    import com.liferay.portal.kernel.repository.LocalRepository;
026    import com.liferay.portal.kernel.repository.capabilities.Capability;
027    import com.liferay.portal.kernel.repository.model.FileEntry;
028    import com.liferay.portal.kernel.repository.model.FileShortcut;
029    import com.liferay.portal.kernel.repository.model.FileVersion;
030    import com.liferay.portal.kernel.repository.model.Folder;
031    import com.liferay.portal.kernel.repository.model.RepositoryEntry;
032    import com.liferay.portal.kernel.search.Hits;
033    import com.liferay.portal.kernel.search.Query;
034    import com.liferay.portal.kernel.search.SearchContext;
035    import com.liferay.portal.kernel.search.SearchException;
036    import com.liferay.portal.kernel.service.CompanyLocalService;
037    import com.liferay.portal.kernel.service.RepositoryEntryLocalService;
038    import com.liferay.portal.kernel.service.ServiceContext;
039    import com.liferay.portal.kernel.service.UserLocalService;
040    import com.liferay.portal.kernel.util.OrderByComparator;
041    import com.liferay.portal.kernel.util.UnicodeProperties;
042    
043    import java.io.File;
044    import java.io.InputStream;
045    
046    import java.util.List;
047    
048    /**
049     * @author Mika Koivisto
050     */
051    @ProviderType
052    public class BaseRepositoryProxyBean
053            extends RepositoryModelProxyBean implements BaseRepository {
054    
055            public BaseRepositoryProxyBean(
056                    BaseRepository baseRepository, ClassLoader classLoader) {
057    
058                    super(classLoader);
059    
060                    _baseRepository = baseRepository;
061            }
062    
063            @Override
064            public FileEntry addFileEntry(
065                            long userId, long folderId, String sourceFileName, String mimeType,
066                            String title, String description, String changeLog, File file,
067                            ServiceContext serviceContext)
068                    throws PortalException {
069    
070                    FileEntry fileEntry = _baseRepository.addFileEntry(
071                            userId, folderId, sourceFileName, mimeType, title, description,
072                            changeLog, file, serviceContext);
073    
074                    return newFileEntryProxyBean(fileEntry);
075            }
076    
077            @Override
078            public FileEntry addFileEntry(
079                            long userId, long folderId, String sourceFileName, String mimeType,
080                            String title, String description, String changeLog, InputStream is,
081                            long size, ServiceContext serviceContext)
082                    throws PortalException {
083    
084                    FileEntry fileEntry = _baseRepository.addFileEntry(
085                            userId, folderId, sourceFileName, mimeType, title, description,
086                            changeLog, is, size, serviceContext);
087    
088                    return newFileEntryProxyBean(fileEntry);
089            }
090    
091            /**
092             * @deprecated As of 7.0.0, see {@link #addFileEntry(long, long, String,
093             *             String, String, String, String, File, ServiceContext)}
094             */
095            @Deprecated
096            @Override
097            public FileEntry addFileEntry(
098                            long folderId, String sourceFileName, String mimeType, String title,
099                            String description, String changeLog, File file,
100                            ServiceContext serviceContext)
101                    throws PortalException {
102    
103                    return addFileEntry(
104                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
105                                    getUserId(),
106                            folderId, sourceFileName, mimeType, title, description, changeLog,
107                            file, serviceContext);
108            }
109    
110            /**
111             * @deprecated As of 7.0.0, see {@link #addFileEntry(long, long, String,
112             *             String, String, String, String, InputStream, long,
113             *             ServiceContext)}
114             */
115            @Deprecated
116            @Override
117            public FileEntry addFileEntry(
118                            long folderId, String sourceFileName, String mimeType, String title,
119                            String description, String changeLog, InputStream is, long size,
120                            ServiceContext serviceContext)
121                    throws PortalException {
122    
123                    return addFileEntry(
124                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
125                                    getUserId(),
126                            folderId, sourceFileName, mimeType, title, description, changeLog,
127                            is, size, serviceContext);
128            }
129    
130            @Override
131            public FileShortcut addFileShortcut(
132                            long userId, long folderId, long toFileEntryId,
133                            ServiceContext serviceContext)
134                    throws PortalException {
135    
136                    FileShortcut fileShortcut = _baseRepository.addFileShortcut(
137                            userId, folderId, toFileEntryId, serviceContext);
138    
139                    return newFileShortcutProxyBean(fileShortcut);
140            }
141    
142            @Override
143            public Folder addFolder(
144                            long userId, long parentFolderId, String name, String description,
145                            ServiceContext serviceContext)
146                    throws PortalException {
147    
148                    Folder folder = _baseRepository.addFolder(
149                            userId, parentFolderId, name, description, serviceContext);
150    
151                    return newFolderProxyBean(folder);
152            }
153    
154            /**
155             * @deprecated As of 7.0.0, replaced by {@link #addFolder(long, long,
156             *             String, String, ServiceContext)}
157             */
158            @Deprecated
159            @Override
160            public Folder addFolder(
161                            long parentFolderId, String name, String description,
162                            ServiceContext serviceContext)
163                    throws PortalException {
164    
165                    return addFolder(
166                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
167                                    getUserId(),
168                            parentFolderId, name, description, serviceContext);
169            }
170    
171            @Override
172            public FileVersion cancelCheckOut(long fileEntryId) throws PortalException {
173                    return _baseRepository.cancelCheckOut(fileEntryId);
174            }
175    
176            /**
177             * @deprecated As of 7.0.0, replaced by {@link #checkInFileEntry(long, long,
178             *             boolean, String, ServiceContext)}
179             */
180            @Deprecated
181            @Override
182            public void checkInFileEntry(
183                            long fileEntryId, boolean major, String changeLog,
184                            ServiceContext serviceContext)
185                    throws PortalException {
186    
187                    _baseRepository.checkInFileEntry(
188                            fileEntryId, major, changeLog, serviceContext);
189            }
190    
191            @Override
192            public void checkInFileEntry(
193                            long userId, long fileEntryId, boolean majorVersion,
194                            String changeLog, ServiceContext serviceContext)
195                    throws PortalException {
196    
197                    _baseRepository.checkInFileEntry(
198                            userId, fileEntryId, majorVersion, changeLog, serviceContext);
199            }
200    
201            @Override
202            public void checkInFileEntry(
203                            long userId, long fileEntryId, String lockUuid,
204                            ServiceContext serviceContext)
205                    throws PortalException {
206    
207                    _baseRepository.checkInFileEntry(
208                            userId, fileEntryId, lockUuid, serviceContext);
209            }
210    
211            /**
212             * @deprecated As of 7.0.0, replaced by {@link #checkInFileEntry(long, long,
213             *             String, ServiceContext)}
214             */
215            @Deprecated
216            @Override
217            public void checkInFileEntry(
218                            long fileEntryId, String lockUuid, ServiceContext serviceContext)
219                    throws PortalException {
220    
221                    _baseRepository.checkInFileEntry(fileEntryId, lockUuid, serviceContext);
222            }
223    
224            @Override
225            public FileEntry checkOutFileEntry(
226                            long fileEntryId, ServiceContext serviceContext)
227                    throws PortalException {
228    
229                    FileEntry fileEntry = _baseRepository.checkOutFileEntry(
230                            fileEntryId, serviceContext);
231    
232                    return newFileEntryProxyBean(fileEntry);
233            }
234    
235            @Override
236            public FileEntry checkOutFileEntry(
237                            long fileEntryId, String owner, long expirationTime,
238                            ServiceContext serviceContext)
239                    throws PortalException {
240    
241                    FileEntry fileEntry = _baseRepository.checkOutFileEntry(
242                            fileEntryId, owner, expirationTime, serviceContext);
243    
244                    return newFileEntryProxyBean(fileEntry);
245            }
246    
247            @Override
248            public FileEntry copyFileEntry(
249                            long userId, long groupId, long fileEntryId, long destFolderId,
250                            ServiceContext serviceContext)
251                    throws PortalException {
252    
253                    return _baseRepository.copyFileEntry(
254                            userId, groupId, fileEntryId, destFolderId, serviceContext);
255            }
256    
257            /**
258             * @deprecated As of 7.0.0, replaced by {@link #copyFileEntry(long, long,
259             *             long, long, ServiceContext)}
260             */
261            @Deprecated
262            @Override
263            public FileEntry copyFileEntry(
264                            long groupId, long fileEntryId, long destFolderId,
265                            ServiceContext serviceContext)
266                    throws PortalException {
267    
268                    return copyFileEntry(
269                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
270                                    getUserId(),
271                            groupId, fileEntryId, destFolderId, serviceContext);
272            }
273    
274            @Override
275            public void deleteAll() throws PortalException {
276                    _baseRepository.deleteAll();
277            }
278    
279            @Override
280            public void deleteFileEntry(long fileEntryId) throws PortalException {
281                    _baseRepository.deleteFileEntry(fileEntryId);
282            }
283    
284            @Override
285            public void deleteFileEntry(long folderId, String title)
286                    throws PortalException {
287    
288                    _baseRepository.deleteFileEntry(folderId, title);
289            }
290    
291            @Override
292            public void deleteFileShortcut(long fileShortcutId) throws PortalException {
293                    _baseRepository.deleteFileShortcut(fileShortcutId);
294            }
295    
296            @Override
297            public void deleteFileShortcuts(long toFileEntryId) throws PortalException {
298                    _baseRepository.deleteFileShortcuts(toFileEntryId);
299            }
300    
301            @Override
302            public void deleteFileVersion(long fileEntryId, String version)
303                    throws PortalException {
304    
305                    _baseRepository.deleteFileVersion(fileEntryId, version);
306            }
307    
308            @Override
309            public void deleteFolder(long folderId) throws PortalException {
310                    _baseRepository.deleteFolder(folderId);
311            }
312    
313            @Override
314            public void deleteFolder(long parentFolderId, String name)
315                    throws PortalException {
316    
317                    _baseRepository.deleteFolder(parentFolderId, name);
318            }
319    
320            @Override
321            public <T extends Capability> T getCapability(Class<T> capabilityClass) {
322                    return _baseRepository.getCapability(capabilityClass);
323            }
324    
325            @Override
326            public List<FileEntry> getFileEntries(
327                            long folderId, int status, int start, int end,
328                            OrderByComparator<FileEntry> obc)
329                    throws PortalException {
330    
331                    List<FileEntry> fileEntries = _baseRepository.getFileEntries(
332                            folderId, status, start, end, obc);
333    
334                    return toFileEntryProxyBeans(fileEntries);
335            }
336    
337            @Override
338            public List<FileEntry> getFileEntries(
339                            long folderId, int start, int end, OrderByComparator<FileEntry> obc)
340                    throws PortalException {
341    
342                    List<FileEntry> fileEntries = _baseRepository.getFileEntries(
343                            folderId, start, end, obc);
344    
345                    return toFileEntryProxyBeans(fileEntries);
346            }
347    
348            @Override
349            public List<FileEntry> getFileEntries(
350                            long folderId, long documentTypeId, int start, int end,
351                            OrderByComparator<FileEntry> obc)
352                    throws PortalException {
353    
354                    List<FileEntry> fileEntries = _baseRepository.getFileEntries(
355                            folderId, documentTypeId, start, end, obc);
356    
357                    return toFileEntryProxyBeans(fileEntries);
358            }
359    
360            @Override
361            public List<FileEntry> getFileEntries(
362                            long folderId, String[] mimeTypes, int start, int end,
363                            OrderByComparator<FileEntry> obc)
364                    throws PortalException {
365    
366                    List<FileEntry> fileEntries = _baseRepository.getFileEntries(
367                            folderId, mimeTypes, start, end, obc);
368    
369                    return toFileEntryProxyBeans(fileEntries);
370            }
371    
372            @Override
373            public List<RepositoryEntry> getFileEntriesAndFileShortcuts(
374                            long folderId, int status, int start, int end)
375                    throws PortalException {
376    
377                    List<RepositoryEntry> fileEntriesAndFileShortcuts =
378                            _baseRepository.getFileEntriesAndFileShortcuts(
379                                    folderId, status, start, end);
380    
381                    return toObjectProxyBeans(fileEntriesAndFileShortcuts);
382            }
383    
384            @Override
385            public int getFileEntriesAndFileShortcutsCount(long folderId, int status)
386                    throws PortalException {
387    
388                    return _baseRepository.getFileEntriesAndFileShortcutsCount(
389                            folderId, status);
390            }
391    
392            @Override
393            public int getFileEntriesAndFileShortcutsCount(
394                            long folderId, int status, String[] mimeTypes)
395                    throws PortalException {
396    
397                    return _baseRepository.getFileEntriesAndFileShortcutsCount(
398                            folderId, status, mimeTypes);
399            }
400    
401            @Override
402            public int getFileEntriesCount(long folderId) throws PortalException {
403                    return _baseRepository.getFileEntriesCount(folderId);
404            }
405    
406            @Override
407            public int getFileEntriesCount(long folderId, int status)
408                    throws PortalException {
409    
410                    return _baseRepository.getFileEntriesCount(folderId, status);
411            }
412    
413            @Override
414            public int getFileEntriesCount(long folderId, long documentTypeId)
415                    throws PortalException {
416    
417                    return _baseRepository.getFileEntriesCount(folderId, documentTypeId);
418            }
419    
420            @Override
421            public int getFileEntriesCount(long folderId, String[] mimeTypes)
422                    throws PortalException {
423    
424                    return _baseRepository.getFileEntriesCount(folderId, mimeTypes);
425            }
426    
427            @Override
428            public FileEntry getFileEntry(long fileEntryId) throws PortalException {
429                    FileEntry fileEntry = _baseRepository.getFileEntry(fileEntryId);
430    
431                    return newFileEntryProxyBean(fileEntry);
432            }
433    
434            @Override
435            public FileEntry getFileEntry(long folderId, String title)
436                    throws PortalException {
437    
438                    FileEntry fileEntry = _baseRepository.getFileEntry(folderId, title);
439    
440                    return newFileEntryProxyBean(fileEntry);
441            }
442    
443            @Override
444            public FileEntry getFileEntryByUuid(String uuid) throws PortalException {
445                    FileEntry fileEntry = _baseRepository.getFileEntryByUuid(uuid);
446    
447                    return newFileEntryProxyBean(fileEntry);
448            }
449    
450            @Override
451            public FileShortcut getFileShortcut(long fileShortcutId)
452                    throws PortalException {
453    
454                    FileShortcut fileShortcut = _baseRepository.getFileShortcut(
455                            fileShortcutId);
456    
457                    return newFileShortcutProxyBean(fileShortcut);
458            }
459    
460            @Override
461            public FileVersion getFileVersion(long fileVersionId)
462                    throws PortalException {
463    
464                    FileVersion fileVersion = _baseRepository.getFileVersion(fileVersionId);
465    
466                    return newFileVersionProxyBean(fileVersion);
467            }
468    
469            @Override
470            public Folder getFolder(long folderId) throws PortalException {
471                    Folder folder = _baseRepository.getFolder(folderId);
472    
473                    return newFolderProxyBean(folder);
474            }
475    
476            @Override
477            public Folder getFolder(long parentFolderId, String name)
478                    throws PortalException {
479    
480                    Folder folder = _baseRepository.getFolder(parentFolderId, name);
481    
482                    return newFolderProxyBean(folder);
483            }
484    
485            @Override
486            public List<Folder> getFolders(
487                            long parentFolderId, boolean includeMountfolders, int start,
488                            int end, OrderByComparator<Folder> obc)
489                    throws PortalException {
490    
491                    List<Folder> folders = _baseRepository.getFolders(
492                            parentFolderId, includeMountfolders, start, end, obc);
493    
494                    return toFolderProxyBeans(folders);
495            }
496    
497            @Override
498            public List<Folder> getFolders(
499                            long parentFolderId, int status, boolean includeMountfolders,
500                            int start, int end, OrderByComparator<Folder> obc)
501                    throws PortalException {
502    
503                    List<Folder> folders = _baseRepository.getFolders(
504                            parentFolderId, status, includeMountfolders, start, end, obc);
505    
506                    return toFolderProxyBeans(folders);
507            }
508    
509            @Override
510            public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
511                            long folderId, int status, boolean includeMountFolders, int start,
512                            int end, OrderByComparator<?> obc)
513                    throws PortalException {
514    
515                    List<RepositoryEntry> foldersAndFileEntriesAndFileShortcuts =
516                            _baseRepository.getFoldersAndFileEntriesAndFileShortcuts(
517                                    folderId, status, includeMountFolders, start, end, obc);
518    
519                    return toObjectProxyBeans(foldersAndFileEntriesAndFileShortcuts);
520            }
521    
522            @Override
523            public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
524                            long folderId, int status, String[] mimeTypes,
525                            boolean includeMountFolders, int start, int end,
526                            OrderByComparator<?> obc)
527                    throws PortalException {
528    
529                    List<RepositoryEntry> foldersAndFileEntriesAndFileShortcuts =
530                            _baseRepository.getFoldersAndFileEntriesAndFileShortcuts(
531                                    folderId, status, mimeTypes, includeMountFolders, start, end,
532                                    obc);
533    
534                    return toObjectProxyBeans(foldersAndFileEntriesAndFileShortcuts);
535            }
536    
537            @Override
538            public int getFoldersAndFileEntriesAndFileShortcutsCount(
539                            long folderId, int status, boolean includeMountFolders)
540                    throws PortalException {
541    
542                    return _baseRepository.getFoldersAndFileEntriesAndFileShortcutsCount(
543                            folderId, status, includeMountFolders);
544            }
545    
546            @Override
547            public int getFoldersAndFileEntriesAndFileShortcutsCount(
548                            long folderId, int status, String[] mimeTypes,
549                            boolean includeMountFolders)
550                    throws PortalException {
551    
552                    return _baseRepository.getFoldersAndFileEntriesAndFileShortcutsCount(
553                            folderId, status, mimeTypes, includeMountFolders);
554            }
555    
556            @Override
557            public int getFoldersCount(long parentFolderId, boolean includeMountfolders)
558                    throws PortalException {
559    
560                    return _baseRepository.getFoldersCount(
561                            parentFolderId, includeMountfolders);
562            }
563    
564            @Override
565            public int getFoldersCount(
566                            long parentFolderId, int status, boolean includeMountfolders)
567                    throws PortalException {
568    
569                    return _baseRepository.getFoldersCount(
570                            parentFolderId, status, includeMountfolders);
571            }
572    
573            @Override
574            public int getFoldersFileEntriesCount(List<Long> folderIds, int status)
575                    throws PortalException {
576    
577                    return _baseRepository.getFoldersFileEntriesCount(folderIds, status);
578            }
579    
580            @Override
581            public LocalRepository getLocalRepository() {
582                    LocalRepository localRepository = _baseRepository.getLocalRepository();
583    
584                    return newLocalRepositoryProxyBean(localRepository);
585            }
586    
587            @Override
588            public List<Folder> getMountFolders(
589                            long parentFolderId, int start, int end,
590                            OrderByComparator<Folder> obc)
591                    throws PortalException {
592    
593                    List<Folder> folders = _baseRepository.getMountFolders(
594                            parentFolderId, start, end, obc);
595    
596                    return toFolderProxyBeans(folders);
597            }
598    
599            @Override
600            public int getMountFoldersCount(long parentFolderId)
601                    throws PortalException {
602    
603                    return _baseRepository.getMountFoldersCount(parentFolderId);
604            }
605    
606            public BaseRepository getProxyBean() {
607                    return _baseRepository;
608            }
609    
610            @Override
611            public List<FileEntry> getRepositoryFileEntries(
612                            long userId, long rootFolderId, int start, int end,
613                            OrderByComparator<FileEntry> obc)
614                    throws PortalException {
615    
616                    List<FileEntry> fileEntries = _baseRepository.getRepositoryFileEntries(
617                            userId, rootFolderId, start, end, obc);
618    
619                    return toFileEntryProxyBeans(fileEntries);
620            }
621    
622            @Override
623            public List<FileEntry> getRepositoryFileEntries(
624                            long userId, long rootFolderId, String[] mimeTypes, int status,
625                            int start, int end, OrderByComparator<FileEntry> obc)
626                    throws PortalException {
627    
628                    List<FileEntry> fileEntries = _baseRepository.getRepositoryFileEntries(
629                            userId, rootFolderId, mimeTypes, status, start, end, obc);
630    
631                    return toFileEntryProxyBeans(fileEntries);
632            }
633    
634            @Override
635            public int getRepositoryFileEntriesCount(long userId, long rootFolderId)
636                    throws PortalException {
637    
638                    return _baseRepository.getRepositoryFileEntriesCount(
639                            userId, rootFolderId);
640            }
641    
642            @Override
643            public int getRepositoryFileEntriesCount(
644                            long userId, long rootFolderId, String[] mimeTypes, int status)
645                    throws PortalException {
646    
647                    return _baseRepository.getRepositoryFileEntriesCount(
648                            userId, rootFolderId, mimeTypes, status);
649            }
650    
651            @Override
652            public long getRepositoryId() {
653                    return _baseRepository.getRepositoryId();
654            }
655    
656            @Override
657            public void getSubfolderIds(List<Long> folderIds, long folderId)
658                    throws PortalException {
659    
660                    _baseRepository.getSubfolderIds(folderIds, folderId);
661            }
662    
663            @Override
664            public List<Long> getSubfolderIds(long folderId, boolean recurse)
665                    throws PortalException {
666    
667                    return _baseRepository.getSubfolderIds(folderId, recurse);
668            }
669    
670            @Deprecated
671            @Override
672            public String[] getSupportedConfigurations() {
673                    return _baseRepository.getSupportedConfigurations();
674            }
675    
676            @Deprecated
677            @Override
678            public String[][] getSupportedParameters() {
679                    return _baseRepository.getSupportedParameters();
680            }
681    
682            @Override
683            public void initRepository() throws PortalException {
684                    _baseRepository.initRepository();
685            }
686    
687            @Override
688            public <T extends Capability> boolean isCapabilityProvided(
689                    Class<T> capabilityClass) {
690    
691                    return _baseRepository.isCapabilityProvided(capabilityClass);
692            }
693    
694            @Override
695            public Lock lockFolder(long folderId) throws PortalException {
696                    Lock lock = _baseRepository.lockFolder(folderId);
697    
698                    return (Lock)newProxyInstance(lock, Lock.class);
699            }
700    
701            @Override
702            public Lock lockFolder(
703                            long folderId, String owner, boolean inheritable,
704                            long expirationTime)
705                    throws PortalException {
706    
707                    Lock lock = _baseRepository.lockFolder(
708                            folderId, owner, inheritable, expirationTime);
709    
710                    return (Lock)newProxyInstance(lock, Lock.class);
711            }
712    
713            @Override
714            public FileEntry moveFileEntry(
715                            long userId, long fileEntryId, long newFolderId,
716                            ServiceContext serviceContext)
717                    throws PortalException {
718    
719                    FileEntry fileEntry = _baseRepository.moveFileEntry(
720                            userId, fileEntryId, newFolderId, serviceContext);
721    
722                    return newFileEntryProxyBean(fileEntry);
723            }
724    
725            /**
726             * @deprecated As of 7.0.0, replaced by {@link #moveFileEntry(long, long,
727             *             long, ServiceContext)}
728             */
729            @Deprecated
730            @Override
731            public FileEntry moveFileEntry(
732                            long fileEntryId, long newFolderId, ServiceContext serviceContext)
733                    throws PortalException {
734    
735                    return moveFileEntry(
736                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
737                                    getUserId(),
738                            fileEntryId, newFolderId, serviceContext);
739            }
740    
741            @Override
742            public Folder moveFolder(
743                            long userId, long folderId, long parentFolderId,
744                            ServiceContext serviceContext)
745                    throws PortalException {
746    
747                    Folder folder = _baseRepository.moveFolder(
748                            userId, folderId, parentFolderId, serviceContext);
749    
750                    return newFolderProxyBean(folder);
751            }
752    
753            /**
754             * @deprecated As of 7.0.0, replaced by {@link #moveFolder(long, long, long,
755             *             ServiceContext)}
756             */
757            @Deprecated
758            @Override
759            public Folder moveFolder(
760                            long folderId, long newParentFolderId,
761                            ServiceContext serviceContext)
762                    throws PortalException {
763    
764                    return moveFolder(
765                            com.liferay.portal.kernel.repository.util.RepositoryUserUtil.
766                                    getUserId(),
767                            folderId, newParentFolderId, serviceContext);
768            }
769    
770            @Override
771            public Lock refreshFileEntryLock(
772                            String lockUuid, long companyId, long expirationTime)
773                    throws PortalException {
774    
775                    Lock lock = _baseRepository.refreshFileEntryLock(
776                            lockUuid, companyId, expirationTime);
777    
778                    return (Lock)newProxyInstance(lock, Lock.class);
779            }
780    
781            @Override
782            public Lock refreshFolderLock(
783                            String lockUuid, long companyId, long expirationTime)
784                    throws PortalException {
785    
786                    Lock lock = _baseRepository.refreshFolderLock(
787                            lockUuid, companyId, expirationTime);
788    
789                    return (Lock)newProxyInstance(lock, Lock.class);
790            }
791    
792            @Override
793            public void revertFileEntry(
794                            long userId, long fileEntryId, String version,
795                            ServiceContext serviceContext)
796                    throws PortalException {
797    
798                    _baseRepository.revertFileEntry(
799                            userId, fileEntryId, version, serviceContext);
800            }
801    
802            /**
803             * @deprecated As of 7.0.0, replaced by {@link #revertFileEntry(long, long,
804             *             String, ServiceContext)}
805             */
806            @Deprecated
807            @Override
808            public void revertFileEntry(
809                            long fileEntryId, String version, ServiceContext serviceContext)
810                    throws PortalException {
811    
812                    _baseRepository.revertFileEntry(fileEntryId, version, serviceContext);
813            }
814    
815            @Override
816            public Hits search(long creatorUserId, int status, int start, int end)
817                    throws PortalException {
818    
819                    return _baseRepository.search(creatorUserId, status, start, end);
820            }
821    
822            @Override
823            public Hits search(
824                            long creatorUserId, long folderId, String[] mimeTypes, int status,
825                            int start, int end)
826                    throws PortalException {
827    
828                    return _baseRepository.search(
829                            creatorUserId, folderId, mimeTypes, status, start, end);
830            }
831    
832            @Override
833            public Hits search(SearchContext searchContext) throws SearchException {
834                    return _baseRepository.search(searchContext);
835            }
836    
837            @Override
838            public Hits search(SearchContext searchContext, Query query)
839                    throws SearchException {
840    
841                    return _baseRepository.search(searchContext, query);
842            }
843    
844            @Override
845            public void setAssetEntryLocalService(
846                    AssetEntryLocalService assetEntryLocalService) {
847    
848                    _baseRepository.setAssetEntryLocalService(assetEntryLocalService);
849            }
850    
851            @Override
852            public void setCompanyId(long companyId) {
853                    _baseRepository.setCompanyId(companyId);
854            }
855    
856            @Override
857            public void setCompanyLocalService(
858                    CompanyLocalService companyLocalService) {
859    
860                    _baseRepository.setCompanyLocalService(companyLocalService);
861            }
862    
863            @Override
864            public void setDLAppHelperLocalService(
865                    DLAppHelperLocalService dlAppHelperLocalService) {
866    
867                    _baseRepository.setDLAppHelperLocalService(dlAppHelperLocalService);
868            }
869    
870            @Override
871            public void setDLFolderLocalService(
872                    DLFolderLocalService dlFolderLocalService) {
873    
874                    _baseRepository.setDLFolderLocalService(dlFolderLocalService);
875            }
876    
877            @Override
878            public void setGroupId(long groupId) {
879                    _baseRepository.setGroupId(groupId);
880            }
881    
882            @Override
883            public void setRepositoryEntryLocalService(
884                    RepositoryEntryLocalService repositoryEntryLocalService) {
885    
886                    _baseRepository.setRepositoryEntryLocalService(
887                            repositoryEntryLocalService);
888            }
889    
890            @Override
891            public void setRepositoryId(long repositoryId) {
892                    _baseRepository.setRepositoryId(repositoryId);
893            }
894    
895            @Override
896            public void setTypeSettingsProperties(
897                    UnicodeProperties typeSettingsProperties) {
898    
899                    _baseRepository.setTypeSettingsProperties(typeSettingsProperties);
900            }
901    
902            @Override
903            public void setUserLocalService(UserLocalService userLocalService) {
904                    _baseRepository.setUserLocalService(userLocalService);
905            }
906    
907            @Override
908            public void unlockFolder(long folderId, String lockUuid)
909                    throws PortalException {
910    
911                    _baseRepository.unlockFolder(folderId, lockUuid);
912            }
913    
914            @Override
915            public void unlockFolder(long parentFolderId, String name, String lockUuid)
916                    throws PortalException {
917    
918                    _baseRepository.unlockFolder(parentFolderId, name, lockUuid);
919            }
920    
921            @Override
922            public FileEntry updateFileEntry(
923                            long userId, long fileEntryId, String sourceFileName,
924                            String mimeType, String title, String description, String changeLog,
925                            boolean majorVersion, File file, ServiceContext serviceContext)
926                    throws PortalException {
927    
928                    FileEntry fileEntry = _baseRepository.updateFileEntry(
929                            userId, fileEntryId, sourceFileName, mimeType, title, description,
930                            changeLog, majorVersion, file, serviceContext);
931    
932                    return newFileEntryProxyBean(fileEntry);
933            }
934    
935            @Override
936            public FileEntry updateFileEntry(
937                            long userId, long fileEntryId, String sourceFileName,
938                            String mimeType, String title, String description, String changeLog,
939                            boolean majorVersion, InputStream is, long size,
940                            ServiceContext serviceContext)
941                    throws PortalException {
942    
943                    FileEntry fileEntry = _baseRepository.updateFileEntry(
944                            userId, fileEntryId, sourceFileName, mimeType, title, description,
945                            changeLog, majorVersion, is, size, serviceContext);
946    
947                    return newFileEntryProxyBean(fileEntry);
948            }
949    
950            /**
951             * @deprecated As of 7.0.0, replaced by {@link #updateFileEntry(long, long,
952             *             String, String, String, String, String, boolean, File,
953             *             ServiceContext)}
954             */
955            @Deprecated
956            @Override
957            public FileEntry updateFileEntry(
958                            long fileEntryId, String sourceFileName, String mimeType,
959                            String title, String description, String changeLog,
960                            boolean majorVersion, File file, ServiceContext serviceContext)
961                    throws PortalException {
962    
963                    FileEntry fileEntry = _baseRepository.updateFileEntry(
964                            fileEntryId, sourceFileName, mimeType, title, description,
965                            changeLog, majorVersion, file, serviceContext);
966    
967                    return newFileEntryProxyBean(fileEntry);
968            }
969    
970            /**
971             * @deprecated As of 7.0.0, replaced by {@link #updateFileEntry(long, long,
972             *             String, String, String, String, String, boolean, InputStream,
973             *             long, ServiceContext)}
974             */
975            @Deprecated
976            @Override
977            public FileEntry updateFileEntry(
978                            long fileEntryId, String sourceFileName, String mimeType,
979                            String title, String description, String changeLog,
980                            boolean majorVersion, InputStream is, long size,
981                            ServiceContext serviceContext)
982                    throws PortalException {
983    
984                    FileEntry fileEntry = _baseRepository.updateFileEntry(
985                            fileEntryId, sourceFileName, mimeType, title, description,
986                            changeLog, majorVersion, is, size, serviceContext);
987    
988                    return newFileEntryProxyBean(fileEntry);
989            }
990    
991            @Override
992            public FileShortcut updateFileShortcut(
993                            long userId, long fileShortcutId, long folderId, long toFileEntryId,
994                            ServiceContext serviceContext)
995                    throws PortalException {
996    
997                    FileShortcut fileShortcut = _baseRepository.updateFileShortcut(
998                            userId, fileShortcutId, folderId, toFileEntryId, serviceContext);
999    
1000                    return newFileShortcutProxyBean(fileShortcut);
1001            }
1002    
1003            @Override
1004            public void updateFileShortcuts(
1005                            long oldToFileEntryId, long newToFileEntryId)
1006                    throws PortalException {
1007    
1008                    _baseRepository.updateFileShortcuts(oldToFileEntryId, newToFileEntryId);
1009            }
1010    
1011            @Override
1012            public Folder updateFolder(
1013                            long folderId, long parentFolderId, String name, String description,
1014                            ServiceContext serviceContext)
1015                    throws PortalException {
1016    
1017                    Folder folder = _baseRepository.updateFolder(
1018                            folderId, parentFolderId, name, description, serviceContext);
1019    
1020                    return newFolderProxyBean(folder);
1021            }
1022    
1023            @Override
1024            public Folder updateFolder(
1025                            long folderId, String name, String description,
1026                            ServiceContext serviceContext)
1027                    throws PortalException {
1028    
1029                    Folder folder = _baseRepository.updateFolder(
1030                            folderId, name, description, serviceContext);
1031    
1032                    return newFolderProxyBean(folder);
1033            }
1034    
1035            @Override
1036            public boolean verifyFileEntryCheckOut(long fileEntryId, String lockUuid)
1037                    throws PortalException {
1038    
1039                    return _baseRepository.verifyFileEntryCheckOut(fileEntryId, lockUuid);
1040            }
1041    
1042            @Override
1043            public boolean verifyFileEntryLock(long fileEntryId, String lockUuid)
1044                    throws PortalException {
1045    
1046                    return _baseRepository.verifyFileEntryLock(fileEntryId, lockUuid);
1047            }
1048    
1049            @Override
1050            public boolean verifyInheritableLock(long folderId, String lockUuid)
1051                    throws PortalException {
1052    
1053                    return _baseRepository.verifyInheritableLock(folderId, lockUuid);
1054            }
1055    
1056            private final BaseRepository _baseRepository;
1057    
1058    }