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            /**
087            * Returns the Spring bean ID for this bean.
088            *
089            * @return the Spring bean ID for this bean
090            */
091            public static java.lang.String getBeanIdentifier() {
092                    return getService().getBeanIdentifier();
093            }
094    
095            public static void getFileAsStream(long userId,
096                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
097                    boolean incrementCounter) {
098                    getService().getFileAsStream(userId, fileEntry, incrementCounter);
099            }
100    
101            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
102                    long groupId, long folderId, boolean active, int status) {
103                    return getService().getFileShortcuts(groupId, folderId, active, status);
104            }
105    
106            /**
107            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcuts(long, long,
108            boolean, int)}
109            */
110            @Deprecated
111            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
112                    long groupId, long folderId, int status) {
113                    return getService().getFileShortcuts(groupId, folderId, status);
114            }
115    
116            public static int getFileShortcutsCount(long groupId, long folderId,
117                    boolean active, int status) {
118                    return getService()
119                                       .getFileShortcutsCount(groupId, folderId, active, status);
120            }
121    
122            /**
123            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcutsCount(long,
124            long, boolean, int)}
125            */
126            @Deprecated
127            public static int getFileShortcutsCount(long groupId, long folderId,
128                    int status) {
129                    return getService().getFileShortcutsCount(groupId, folderId, status);
130            }
131    
132            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
133                    return getService().getNoAssetFileEntries();
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            * @throws PortalException if a user with the primary key could not be found
173            */
174            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
175                    long userId,
176                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
177                    throws com.liferay.portal.kernel.exception.PortalException {
178                    return getService().moveFileEntryToTrash(userId, fileEntry);
179            }
180    
181            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
182                    long userId,
183                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
184                    long newFolderId,
185                    com.liferay.portal.service.ServiceContext serviceContext)
186                    throws com.liferay.portal.kernel.exception.PortalException {
187                    return getService()
188                                       .moveFileShortcutFromTrash(userId, fileShortcut,
189                            newFolderId, serviceContext);
190            }
191    
192            /**
193            * Moves the file shortcut to the recycle bin.
194            *
195            * @param userId the primary key of the user moving the file shortcut
196            * @param fileShortcut the file shortcut to be moved
197            * @return the moved file shortcut
198            * @throws PortalException if a user with the primary key could not be found
199            */
200            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
201                    long userId,
202                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
203                    throws com.liferay.portal.kernel.exception.PortalException {
204                    return getService().moveFileShortcutToTrash(userId, fileShortcut);
205            }
206    
207            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
208                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
209                    long parentFolderId,
210                    com.liferay.portal.service.ServiceContext serviceContext)
211                    throws com.liferay.portal.kernel.exception.PortalException {
212                    return getService()
213                                       .moveFolderFromTrash(userId, folder, parentFolderId,
214                            serviceContext);
215            }
216    
217            /**
218            * Moves the folder to the recycle bin.
219            *
220            * @param userId the primary key of the user moving the folder
221            * @param folder the folder to be moved
222            * @return the moved folder
223            * @throws PortalException if a user with the primary key could not be found
224            */
225            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
226                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return getService().moveFolderToTrash(userId, folder);
229            }
230    
231            /**
232            * @deprecated As of 7.0.0, replaced by {@link
233            #restoreDependentsFromTrash(DLFolder)}
234            */
235            @Deprecated
236            public static void restoreDependentsFromTrash(
237                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
238                    throws com.liferay.portal.kernel.exception.PortalException {
239                    getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
240            }
241    
242            /**
243            * @deprecated As of 7.0.0, replaced by {@link
244            #restoreDependentsFromTrash(List)}
245            */
246            @Deprecated
247            public static void restoreDependentsFromTrash(
248                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
249                    long trashEntryId)
250                    throws com.liferay.portal.kernel.exception.PortalException {
251                    getService()
252                            .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
253            }
254    
255            public static void restoreDependentsFromTrash(
256                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
257                    throws com.liferay.portal.kernel.exception.PortalException {
258                    getService().restoreDependentsFromTrash(dlFolder);
259            }
260    
261            public static void restoreFileEntryFromTrash(long userId,
262                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
263                    throws com.liferay.portal.kernel.exception.PortalException {
264                    getService().restoreFileEntryFromTrash(userId, fileEntry);
265            }
266    
267            public static void restoreFileShortcutFromTrash(long userId,
268                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    getService().restoreFileShortcutFromTrash(userId, fileShortcut);
271            }
272    
273            public static void restoreFolderFromTrash(long userId,
274                    com.liferay.portal.kernel.repository.model.Folder folder)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    getService().restoreFolderFromTrash(userId, folder);
277            }
278    
279            /**
280            * Sets the Spring bean ID for this bean.
281            *
282            * @param beanIdentifier the Spring bean ID for this bean
283            */
284            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
285                    getService().setBeanIdentifier(beanIdentifier);
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[] assetCategoryIds, java.lang.String[] assetTagNames,
293                    long[] assetLinkEntryIds)
294                    throws com.liferay.portal.kernel.exception.PortalException {
295                    return getService()
296                                       .updateAsset(userId, fileEntry, fileVersion,
297                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
298            }
299    
300            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
301                    long userId,
302                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
303                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
304                    long assetClassPk)
305                    throws com.liferay.portal.kernel.exception.PortalException {
306                    return getService()
307                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
308            }
309    
310            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
311                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
312                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
313                    long[] assetLinkEntryIds)
314                    throws com.liferay.portal.kernel.exception.PortalException {
315                    return getService()
316                                       .updateAsset(userId, folder, assetCategoryIds,
317                            assetTagNames, assetLinkEntryIds);
318            }
319    
320            public static void updateFileEntry(long userId,
321                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
322                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
323                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
324                    long assetClassPk)
325                    throws com.liferay.portal.kernel.exception.PortalException {
326                    getService()
327                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
328                            destinationFileVersion, assetClassPk);
329            }
330    
331            public static void updateFileEntry(long userId,
332                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
333                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
334                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
335                    com.liferay.portal.service.ServiceContext serviceContext)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    getService()
338                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
339                            destinationFileVersion, serviceContext);
340            }
341    
342            public static void updateFolder(long userId,
343                    com.liferay.portal.kernel.repository.model.Folder folder,
344                    com.liferay.portal.service.ServiceContext serviceContext)
345                    throws com.liferay.portal.kernel.exception.PortalException {
346                    getService().updateFolder(userId, folder, serviceContext);
347            }
348    
349            public static void updateStatus(long userId,
350                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
351                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
352                    int oldStatus, int newStatus,
353                    com.liferay.portal.service.ServiceContext serviceContext,
354                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
355                    throws com.liferay.portal.kernel.exception.PortalException {
356                    getService()
357                            .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
358                            newStatus, serviceContext, workflowContext);
359            }
360    
361            public static DLAppHelperLocalService getService() {
362                    if (_service == null) {
363                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
364    
365                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
366                                    "_service");
367                    }
368    
369                    return _service;
370            }
371    
372            /**
373             * @deprecated As of 6.2.0
374             */
375            @Deprecated
376            public void setService(DLAppHelperLocalService service) {
377            }
378    
379            private static DLAppHelperLocalService _service;
380    }