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 void addFolder(long userId,
044                    com.liferay.portal.kernel.repository.model.Folder folder,
045                    com.liferay.portal.kernel.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.kernel.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.document.library.kernel.model.DLFileShortcut> getFileShortcuts(
093                    long groupId, long folderId, boolean active, int status) {
094                    return getService().getFileShortcuts(groupId, folderId, active, status);
095            }
096    
097            public static int getFileShortcutsCount(long groupId, long folderId,
098                    boolean active, int status) {
099                    return getService()
100                                       .getFileShortcutsCount(groupId, folderId, active, status);
101            }
102    
103            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
104                    return getService().getNoAssetFileEntries();
105            }
106    
107            /**
108            * Returns the OSGi service identifier.
109            *
110            * @return the OSGi service identifier
111            */
112            public static java.lang.String getOSGiServiceIdentifier() {
113                    return getService().getOSGiServiceIdentifier();
114            }
115    
116            /**
117            * @deprecated As of 7.0.0, replaced by {@link
118            #moveDependentsToTrash(DLFolder)}
119            */
120            @Deprecated
121            public static void moveDependentsToTrash(
122                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
123                    long trashEntryId)
124                    throws com.liferay.portal.kernel.exception.PortalException {
125                    getService()
126                            .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
127            }
128    
129            public static void moveDependentsToTrash(
130                    com.liferay.document.library.kernel.model.DLFolder dlFolder)
131                    throws com.liferay.portal.kernel.exception.PortalException {
132                    getService().moveDependentsToTrash(dlFolder);
133            }
134    
135            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
136                    long userId,
137                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
138                    long newFolderId,
139                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
140                    throws com.liferay.portal.kernel.exception.PortalException {
141                    return getService()
142                                       .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
143                            serviceContext);
144            }
145    
146            /**
147            * Moves the file entry to the recycle bin.
148            *
149            * @param userId the primary key of the user moving the file entry
150            * @param fileEntry the file entry to be moved
151            * @return the moved file entry
152            */
153            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
154                    long userId,
155                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
156                    throws com.liferay.portal.kernel.exception.PortalException {
157                    return getService().moveFileEntryToTrash(userId, fileEntry);
158            }
159    
160            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
161                    long userId,
162                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
163                    long newFolderId,
164                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
165                    throws com.liferay.portal.kernel.exception.PortalException {
166                    return getService()
167                                       .moveFileShortcutFromTrash(userId, fileShortcut,
168                            newFolderId, serviceContext);
169            }
170    
171            /**
172            * Moves the file shortcut to the recycle bin.
173            *
174            * @param userId the primary key of the user moving the file shortcut
175            * @param fileShortcut the file shortcut to be moved
176            * @return the moved file shortcut
177            */
178            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
179                    long userId,
180                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
181                    throws com.liferay.portal.kernel.exception.PortalException {
182                    return getService().moveFileShortcutToTrash(userId, fileShortcut);
183            }
184    
185            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
186                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
187                    long parentFolderId,
188                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
189                    throws com.liferay.portal.kernel.exception.PortalException {
190                    return getService()
191                                       .moveFolderFromTrash(userId, folder, parentFolderId,
192                            serviceContext);
193            }
194    
195            /**
196            * Moves the folder to the recycle bin.
197            *
198            * @param userId the primary key of the user moving the folder
199            * @param folder the folder to be moved
200            * @return the moved folder
201            */
202            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
203                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
204                    throws com.liferay.portal.kernel.exception.PortalException {
205                    return getService().moveFolderToTrash(userId, folder);
206            }
207    
208            /**
209            * @deprecated As of 7.0.0, replaced by {@link
210            #restoreDependentsFromTrash(DLFolder)}
211            */
212            @Deprecated
213            public static void restoreDependentsFromTrash(
214                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
215                    throws com.liferay.portal.kernel.exception.PortalException {
216                    getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
217            }
218    
219            /**
220            * @deprecated As of 7.0.0, replaced by {@link
221            #restoreDependentsFromTrash(List)}
222            */
223            @Deprecated
224            public static void restoreDependentsFromTrash(
225                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
226                    long trashEntryId)
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    getService()
229                            .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
230            }
231    
232            public static void restoreDependentsFromTrash(
233                    com.liferay.document.library.kernel.model.DLFolder dlFolder)
234                    throws com.liferay.portal.kernel.exception.PortalException {
235                    getService().restoreDependentsFromTrash(dlFolder);
236            }
237    
238            public static void restoreFileEntryFromTrash(long userId,
239                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
240                    throws com.liferay.portal.kernel.exception.PortalException {
241                    getService().restoreFileEntryFromTrash(userId, fileEntry);
242            }
243    
244            public static void restoreFileShortcutFromTrash(long userId,
245                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
246                    throws com.liferay.portal.kernel.exception.PortalException {
247                    getService().restoreFileShortcutFromTrash(userId, fileShortcut);
248            }
249    
250            public static void restoreFolderFromTrash(long userId,
251                    com.liferay.portal.kernel.repository.model.Folder folder)
252                    throws com.liferay.portal.kernel.exception.PortalException {
253                    getService().restoreFolderFromTrash(userId, folder);
254            }
255    
256            public static com.liferay.asset.kernel.model.AssetEntry updateAsset(
257                    long userId,
258                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
259                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
260                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
261                    long[] assetLinkEntryIds)
262                    throws com.liferay.portal.kernel.exception.PortalException {
263                    return getService()
264                                       .updateAsset(userId, fileEntry, fileVersion,
265                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
266            }
267    
268            public static com.liferay.asset.kernel.model.AssetEntry updateAsset(
269                    long userId,
270                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
271                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
272                    long assetClassPk)
273                    throws com.liferay.portal.kernel.exception.PortalException {
274                    return getService()
275                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
276            }
277    
278            public static com.liferay.asset.kernel.model.AssetEntry updateAsset(
279                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
280                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
281                    long[] assetLinkEntryIds)
282                    throws com.liferay.portal.kernel.exception.PortalException {
283                    return getService()
284                                       .updateAsset(userId, folder, assetCategoryIds,
285                            assetTagNames, assetLinkEntryIds);
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                    long assetClassPk)
293                    throws com.liferay.portal.kernel.exception.PortalException {
294                    getService()
295                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
296                            destinationFileVersion, assetClassPk);
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                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
304                    throws com.liferay.portal.kernel.exception.PortalException {
305                    getService()
306                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
307                            destinationFileVersion, serviceContext);
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    }