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