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.document.library.kernel.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 com.liferay.asset.kernel.model.AssetEntry updateAsset(
044                    long userId,
045                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
046                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
047                    long assetClassPk)
048                    throws com.liferay.portal.kernel.exception.PortalException {
049                    return getService()
050                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
051            }
052    
053            public static com.liferay.asset.kernel.model.AssetEntry updateAsset(
054                    long userId,
055                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
056                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
057                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
058                    long[] assetLinkEntryIds)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    return getService()
061                                       .updateAsset(userId, fileEntry, fileVersion,
062                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
063            }
064    
065            public static com.liferay.asset.kernel.model.AssetEntry updateAsset(
066                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
067                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
068                    long[] assetLinkEntryIds)
069                    throws com.liferay.portal.kernel.exception.PortalException {
070                    return getService()
071                                       .updateAsset(userId, folder, assetCategoryIds,
072                            assetTagNames, assetLinkEntryIds);
073            }
074    
075            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
076                    long userId,
077                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
078                    long newFolderId,
079                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    return getService()
082                                       .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
083                            serviceContext);
084            }
085    
086            /**
087            * Moves the file entry to the recycle bin.
088            *
089            * @param userId the primary key of the user moving the file entry
090            * @param fileEntry the file entry to be moved
091            * @return the moved file entry
092            */
093            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
094                    long userId,
095                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    return getService().moveFileEntryToTrash(userId, fileEntry);
098            }
099    
100            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
101                    long userId,
102                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
103                    long newFolderId,
104                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
105                    throws com.liferay.portal.kernel.exception.PortalException {
106                    return getService()
107                                       .moveFileShortcutFromTrash(userId, fileShortcut,
108                            newFolderId, serviceContext);
109            }
110    
111            /**
112            * Moves the file shortcut to the recycle bin.
113            *
114            * @param userId the primary key of the user moving the file shortcut
115            * @param fileShortcut the file shortcut to be moved
116            * @return the moved file shortcut
117            */
118            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
119                    long userId,
120                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
121                    throws com.liferay.portal.kernel.exception.PortalException {
122                    return getService().moveFileShortcutToTrash(userId, fileShortcut);
123            }
124    
125            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
126                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
127                    long parentFolderId,
128                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
129                    throws com.liferay.portal.kernel.exception.PortalException {
130                    return getService()
131                                       .moveFolderFromTrash(userId, folder, parentFolderId,
132                            serviceContext);
133            }
134    
135            /**
136            * Moves the folder to the recycle bin.
137            *
138            * @param userId the primary key of the user moving the folder
139            * @param folder the folder to be moved
140            * @return the moved folder
141            */
142            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
143                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
144                    throws com.liferay.portal.kernel.exception.PortalException {
145                    return getService().moveFolderToTrash(userId, folder);
146            }
147    
148            public static int getFileShortcutsCount(long groupId, long folderId,
149                    boolean active, int status) {
150                    return getService()
151                                       .getFileShortcutsCount(groupId, folderId, active, status);
152            }
153    
154            /**
155            * Returns the OSGi service identifier.
156            *
157            * @return the OSGi service identifier
158            */
159            public static java.lang.String getOSGiServiceIdentifier() {
160                    return getService().getOSGiServiceIdentifier();
161            }
162    
163            public static java.util.List<com.liferay.document.library.kernel.model.DLFileShortcut> getFileShortcuts(
164                    long groupId, long folderId, boolean active, int status) {
165                    return getService().getFileShortcuts(groupId, folderId, active, status);
166            }
167    
168            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
169                    return getService().getNoAssetFileEntries();
170            }
171    
172            public static void addFolder(long userId,
173                    com.liferay.portal.kernel.repository.model.Folder folder,
174                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
175                    throws com.liferay.portal.kernel.exception.PortalException {
176                    getService().addFolder(userId, folder, serviceContext);
177            }
178    
179            public static void cancelCheckOut(long userId,
180                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
181                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
182                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
183                    com.liferay.portal.kernel.repository.model.FileVersion draftFileVersion,
184                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
185                    throws com.liferay.portal.kernel.exception.PortalException {
186                    getService()
187                            .cancelCheckOut(userId, fileEntry, sourceFileVersion,
188                            destinationFileVersion, draftFileVersion, serviceContext);
189            }
190    
191            public static void checkAssetEntry(long userId,
192                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
193                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
194                    throws com.liferay.portal.kernel.exception.PortalException {
195                    getService().checkAssetEntry(userId, fileEntry, fileVersion);
196            }
197    
198            public static void deleteFileEntry(
199                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
200                    throws com.liferay.portal.kernel.exception.PortalException {
201                    getService().deleteFileEntry(fileEntry);
202            }
203    
204            public static void deleteFolder(
205                    com.liferay.portal.kernel.repository.model.Folder folder)
206                    throws com.liferay.portal.kernel.exception.PortalException {
207                    getService().deleteFolder(folder);
208            }
209    
210            public static void deleteRepositoryFileEntries(long repositoryId)
211                    throws com.liferay.portal.kernel.exception.PortalException {
212                    getService().deleteRepositoryFileEntries(repositoryId);
213            }
214    
215            public static void getFileAsStream(long userId,
216                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
217                    boolean incrementCounter) {
218                    getService().getFileAsStream(userId, fileEntry, incrementCounter);
219            }
220    
221            public static void moveDependentsToTrash(
222                    com.liferay.document.library.kernel.model.DLFolder dlFolder)
223                    throws com.liferay.portal.kernel.exception.PortalException {
224                    getService().moveDependentsToTrash(dlFolder);
225            }
226    
227            /**
228            * @deprecated As of 7.0.0, replaced by {@link
229            #moveDependentsToTrash(DLFolder)}
230            */
231            @Deprecated
232            public static void moveDependentsToTrash(
233                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
234                    long trashEntryId)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    getService()
237                            .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
238            }
239    
240            public static void restoreDependentsFromTrash(
241                    com.liferay.document.library.kernel.model.DLFolder dlFolder)
242                    throws com.liferay.portal.kernel.exception.PortalException {
243                    getService().restoreDependentsFromTrash(dlFolder);
244            }
245    
246            /**
247            * @deprecated As of 7.0.0, replaced by {@link
248            #restoreDependentsFromTrash(DLFolder)}
249            */
250            @Deprecated
251            public static void restoreDependentsFromTrash(
252                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
253                    throws com.liferay.portal.kernel.exception.PortalException {
254                    getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
255            }
256    
257            /**
258            * @deprecated As of 7.0.0, replaced by {@link
259            #restoreDependentsFromTrash(List)}
260            */
261            @Deprecated
262            public static void restoreDependentsFromTrash(
263                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
264                    long trashEntryId)
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    getService()
267                            .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
268            }
269    
270            public static void restoreFileEntryFromTrash(long userId,
271                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    getService().restoreFileEntryFromTrash(userId, fileEntry);
274            }
275    
276            public static void restoreFileShortcutFromTrash(long userId,
277                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
278                    throws com.liferay.portal.kernel.exception.PortalException {
279                    getService().restoreFileShortcutFromTrash(userId, fileShortcut);
280            }
281    
282            public static void restoreFolderFromTrash(long userId,
283                    com.liferay.portal.kernel.repository.model.Folder folder)
284                    throws com.liferay.portal.kernel.exception.PortalException {
285                    getService().restoreFolderFromTrash(userId, folder);
286            }
287    
288            public static void updateFileEntry(long userId,
289                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
290                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
291                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
292                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
293                    throws com.liferay.portal.kernel.exception.PortalException {
294                    getService()
295                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
296                            destinationFileVersion, serviceContext);
297            }
298    
299            public static void updateFileEntry(long userId,
300                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
301                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
302                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
303                    long assetClassPk)
304                    throws com.liferay.portal.kernel.exception.PortalException {
305                    getService()
306                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
307                            destinationFileVersion, assetClassPk);
308            }
309    
310            public static void updateFolder(long userId,
311                    com.liferay.portal.kernel.repository.model.Folder folder,
312                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
313                    throws com.liferay.portal.kernel.exception.PortalException {
314                    getService().updateFolder(userId, folder, serviceContext);
315            }
316    
317            public static void updateStatus(long userId,
318                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
319                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
320                    int oldStatus, int newStatus,
321                    com.liferay.portal.kernel.service.ServiceContext serviceContext,
322                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    getService()
325                            .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
326                            newStatus, serviceContext, workflowContext);
327            }
328    
329            public static DLAppHelperLocalService getService() {
330                    if (_service == null) {
331                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
332    
333                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
334                                    "_service");
335                    }
336    
337                    return _service;
338            }
339    
340            private static DLAppHelperLocalService _service;
341    }