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.portlet.documentlibrary.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for DLAppHelper. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLAppHelperLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLAppHelperLocalService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLAppHelperLocalServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppHelperLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLAppHelperLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppHelperLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static void addFolder(long userId,
044                    com.liferay.portal.kernel.repository.model.Folder folder,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException {
047                    getService().addFolder(userId, folder, serviceContext);
048            }
049    
050            public static void cancelCheckOut(long userId,
051                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
052                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
053                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
054                    com.liferay.portal.kernel.repository.model.FileVersion draftFileVersion,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws com.liferay.portal.kernel.exception.PortalException {
057                    getService()
058                            .cancelCheckOut(userId, fileEntry, sourceFileVersion,
059                            destinationFileVersion, draftFileVersion, serviceContext);
060            }
061    
062            public static void checkAssetEntry(long userId,
063                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
064                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
065                    throws com.liferay.portal.kernel.exception.PortalException {
066                    getService().checkAssetEntry(userId, fileEntry, fileVersion);
067            }
068    
069            public static void deleteFileEntry(
070                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    getService().deleteFileEntry(fileEntry);
073            }
074    
075            public static void deleteFolder(
076                    com.liferay.portal.kernel.repository.model.Folder folder)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    getService().deleteFolder(folder);
079            }
080    
081            public static void deleteRepositoryFileEntries(long repositoryId)
082                    throws com.liferay.portal.kernel.exception.PortalException {
083                    getService().deleteRepositoryFileEntries(repositoryId);
084            }
085    
086            public static void getFileAsStream(long userId,
087                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
088                    boolean incrementCounter) {
089                    getService().getFileAsStream(userId, fileEntry, incrementCounter);
090            }
091    
092            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
093                    long groupId, long folderId, boolean active, int status) {
094                    return getService().getFileShortcuts(groupId, folderId, active, status);
095            }
096    
097            /**
098            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcuts(long, long,
099            boolean, int)}
100            */
101            @Deprecated
102            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
103                    long groupId, long folderId, int status) {
104                    return getService().getFileShortcuts(groupId, folderId, status);
105            }
106    
107            public static int getFileShortcutsCount(long groupId, long folderId,
108                    boolean active, int status) {
109                    return getService()
110                                       .getFileShortcutsCount(groupId, folderId, active, status);
111            }
112    
113            /**
114            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcutsCount(long,
115            long, boolean, int)}
116            */
117            @Deprecated
118            public static int getFileShortcutsCount(long groupId, long folderId,
119                    int status) {
120                    return getService().getFileShortcutsCount(groupId, folderId, status);
121            }
122    
123            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
124                    return getService().getNoAssetFileEntries();
125            }
126    
127            /**
128            * Returns the OSGi service identifier.
129            *
130            * @return the OSGi service identifier
131            */
132            public static java.lang.String getOSGiServiceIdentifier() {
133                    return getService().getOSGiServiceIdentifier();
134            }
135    
136            /**
137            * @deprecated As of 7.0.0, replaced by {@link
138            #moveDependentsToTrash(DLFolder)}
139            */
140            @Deprecated
141            public static void moveDependentsToTrash(
142                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
143                    long trashEntryId)
144                    throws com.liferay.portal.kernel.exception.PortalException {
145                    getService()
146                            .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
147            }
148    
149            public static void moveDependentsToTrash(
150                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
151                    throws com.liferay.portal.kernel.exception.PortalException {
152                    getService().moveDependentsToTrash(dlFolder);
153            }
154    
155            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
156                    long userId,
157                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
158                    long newFolderId,
159                    com.liferay.portal.service.ServiceContext serviceContext)
160                    throws com.liferay.portal.kernel.exception.PortalException {
161                    return getService()
162                                       .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
163                            serviceContext);
164            }
165    
166            /**
167            * Moves the file entry to the recycle bin.
168            *
169            * @param userId the primary key of the user moving the file entry
170            * @param fileEntry the file entry to be moved
171            * @return the moved file entry
172            */
173            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
174                    long userId,
175                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
176                    throws com.liferay.portal.kernel.exception.PortalException {
177                    return getService().moveFileEntryToTrash(userId, fileEntry);
178            }
179    
180            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
181                    long userId,
182                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
183                    long newFolderId,
184                    com.liferay.portal.service.ServiceContext serviceContext)
185                    throws com.liferay.portal.kernel.exception.PortalException {
186                    return getService()
187                                       .moveFileShortcutFromTrash(userId, fileShortcut,
188                            newFolderId, serviceContext);
189            }
190    
191            /**
192            * Moves the file shortcut to the recycle bin.
193            *
194            * @param userId the primary key of the user moving the file shortcut
195            * @param fileShortcut the file shortcut to be moved
196            * @return the moved file shortcut
197            */
198            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
199                    long userId,
200                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
201                    throws com.liferay.portal.kernel.exception.PortalException {
202                    return getService().moveFileShortcutToTrash(userId, fileShortcut);
203            }
204    
205            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
206                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
207                    long parentFolderId,
208                    com.liferay.portal.service.ServiceContext serviceContext)
209                    throws com.liferay.portal.kernel.exception.PortalException {
210                    return getService()
211                                       .moveFolderFromTrash(userId, folder, parentFolderId,
212                            serviceContext);
213            }
214    
215            /**
216            * Moves the folder to the recycle bin.
217            *
218            * @param userId the primary key of the user moving the folder
219            * @param folder the folder to be moved
220            * @return the moved folder
221            */
222            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
223                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
224                    throws com.liferay.portal.kernel.exception.PortalException {
225                    return getService().moveFolderToTrash(userId, folder);
226            }
227    
228            /**
229            * @deprecated As of 7.0.0, replaced by {@link
230            #restoreDependentsFromTrash(DLFolder)}
231            */
232            @Deprecated
233            public static void restoreDependentsFromTrash(
234                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
237            }
238    
239            /**
240            * @deprecated As of 7.0.0, replaced by {@link
241            #restoreDependentsFromTrash(List)}
242            */
243            @Deprecated
244            public static void restoreDependentsFromTrash(
245                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
246                    long trashEntryId)
247                    throws com.liferay.portal.kernel.exception.PortalException {
248                    getService()
249                            .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
250            }
251    
252            public static void restoreDependentsFromTrash(
253                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
254                    throws com.liferay.portal.kernel.exception.PortalException {
255                    getService().restoreDependentsFromTrash(dlFolder);
256            }
257    
258            public static void restoreFileEntryFromTrash(long userId,
259                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    getService().restoreFileEntryFromTrash(userId, fileEntry);
262            }
263    
264            public static void restoreFileShortcutFromTrash(long userId,
265                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    getService().restoreFileShortcutFromTrash(userId, fileShortcut);
268            }
269    
270            public static void restoreFolderFromTrash(long userId,
271                    com.liferay.portal.kernel.repository.model.Folder folder)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    getService().restoreFolderFromTrash(userId, folder);
274            }
275    
276            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
277                    long userId,
278                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
279                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
280                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
281                    long[] assetLinkEntryIds)
282                    throws com.liferay.portal.kernel.exception.PortalException {
283                    return getService()
284                                       .updateAsset(userId, fileEntry, fileVersion,
285                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
286            }
287    
288            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
289                    long userId,
290                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
291                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
292                    long assetClassPk)
293                    throws com.liferay.portal.kernel.exception.PortalException {
294                    return getService()
295                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
296            }
297    
298            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
299                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
300                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
301                    long[] assetLinkEntryIds)
302                    throws com.liferay.portal.kernel.exception.PortalException {
303                    return getService()
304                                       .updateAsset(userId, folder, assetCategoryIds,
305                            assetTagNames, assetLinkEntryIds);
306            }
307    
308            public static void updateFileEntry(long userId,
309                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
310                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
311                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
312                    long assetClassPk)
313                    throws com.liferay.portal.kernel.exception.PortalException {
314                    getService()
315                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
316                            destinationFileVersion, assetClassPk);
317            }
318    
319            public static void updateFileEntry(long userId,
320                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
321                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
322                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
323                    com.liferay.portal.service.ServiceContext serviceContext)
324                    throws com.liferay.portal.kernel.exception.PortalException {
325                    getService()
326                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
327                            destinationFileVersion, serviceContext);
328            }
329    
330            public static void updateFolder(long userId,
331                    com.liferay.portal.kernel.repository.model.Folder folder,
332                    com.liferay.portal.service.ServiceContext serviceContext)
333                    throws com.liferay.portal.kernel.exception.PortalException {
334                    getService().updateFolder(userId, folder, serviceContext);
335            }
336    
337            public static void updateStatus(long userId,
338                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
339                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
340                    int oldStatus, int newStatus,
341                    com.liferay.portal.service.ServiceContext serviceContext,
342                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
343                    throws com.liferay.portal.kernel.exception.PortalException {
344                    getService()
345                            .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
346                            newStatus, serviceContext, workflowContext);
347            }
348    
349            public static DLAppHelperLocalService getService() {
350                    if (_service == null) {
351                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
352    
353                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
354                                    "_service");
355                    }
356    
357                    return _service;
358            }
359    
360            private static DLAppHelperLocalService _service;
361    }