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            public static void moveDependentsToTrash(
137                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
138                    long trashEntryId)
139                    throws com.liferay.portal.kernel.exception.PortalException {
140                    getService()
141                            .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
142            }
143    
144            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
145                    long userId,
146                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
147                    long newFolderId,
148                    com.liferay.portal.service.ServiceContext serviceContext)
149                    throws com.liferay.portal.kernel.exception.PortalException {
150                    return getService()
151                                       .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
152                            serviceContext);
153            }
154    
155            /**
156            * Moves the file entry to the recycle bin.
157            *
158            * @param userId the primary key of the user moving the file entry
159            * @param fileEntry the file entry to be moved
160            * @return the moved file entry
161            * @throws PortalException if a user with the primary key could not be found
162            */
163            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
164                    long userId,
165                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
166                    throws com.liferay.portal.kernel.exception.PortalException {
167                    return getService().moveFileEntryToTrash(userId, fileEntry);
168            }
169    
170            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
171                    long userId,
172                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
173                    long newFolderId,
174                    com.liferay.portal.service.ServiceContext serviceContext)
175                    throws com.liferay.portal.kernel.exception.PortalException {
176                    return getService()
177                                       .moveFileShortcutFromTrash(userId, fileShortcut,
178                            newFolderId, serviceContext);
179            }
180    
181            /**
182            * Moves the file shortcut to the recycle bin.
183            *
184            * @param userId the primary key of the user moving the file shortcut
185            * @param fileShortcut the file shortcut to be moved
186            * @return the moved file shortcut
187            * @throws PortalException if a user with the primary key could not be found
188            */
189            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
190                    long userId,
191                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
192                    throws com.liferay.portal.kernel.exception.PortalException {
193                    return getService().moveFileShortcutToTrash(userId, fileShortcut);
194            }
195    
196            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
197                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
198                    long parentFolderId,
199                    com.liferay.portal.service.ServiceContext serviceContext)
200                    throws com.liferay.portal.kernel.exception.PortalException {
201                    return getService()
202                                       .moveFolderFromTrash(userId, folder, parentFolderId,
203                            serviceContext);
204            }
205    
206            /**
207            * Moves the folder to the recycle bin.
208            *
209            * @param userId the primary key of the user moving the folder
210            * @param folder the folder to be moved
211            * @return the moved folder
212            * @throws PortalException if a user with the primary key could not be found
213            */
214            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
215                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
216                    throws com.liferay.portal.kernel.exception.PortalException {
217                    return getService().moveFolderToTrash(userId, folder);
218            }
219    
220            public static void restoreDependentsFromTrash(
221                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
222                    throws com.liferay.portal.kernel.exception.PortalException {
223                    getService().restoreDependentsFromTrash(dlFileEntriesAndDLFolders);
224            }
225    
226            /**
227            * @deprecated As of 7.0.0, replaced by {@link
228            #restoreDependentsFromTrash(List)}
229            */
230            @Deprecated
231            public static void restoreDependentsFromTrash(
232                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
233                    long trashEntryId)
234                    throws com.liferay.portal.kernel.exception.PortalException {
235                    getService()
236                            .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
237            }
238    
239            public static void restoreFileEntryFromTrash(long userId,
240                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
241                    throws com.liferay.portal.kernel.exception.PortalException {
242                    getService().restoreFileEntryFromTrash(userId, fileEntry);
243            }
244    
245            public static void restoreFileShortcutFromTrash(long userId,
246                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
247                    throws com.liferay.portal.kernel.exception.PortalException {
248                    getService().restoreFileShortcutFromTrash(userId, fileShortcut);
249            }
250    
251            public static void restoreFolderFromTrash(long userId,
252                    com.liferay.portal.kernel.repository.model.Folder folder)
253                    throws com.liferay.portal.kernel.exception.PortalException {
254                    getService().restoreFolderFromTrash(userId, folder);
255            }
256    
257            /**
258            * Sets the Spring bean ID for this bean.
259            *
260            * @param beanIdentifier the Spring bean ID for this bean
261            */
262            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
263                    getService().setBeanIdentifier(beanIdentifier);
264            }
265    
266            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
267                    long userId,
268                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
269                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
270                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
271                    long[] assetLinkEntryIds)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    return getService()
274                                       .updateAsset(userId, fileEntry, fileVersion,
275                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
276            }
277    
278            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
279                    long userId,
280                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
281                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
282                    long assetClassPk)
283                    throws com.liferay.portal.kernel.exception.PortalException {
284                    return getService()
285                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
286            }
287    
288            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
289                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
290                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
291                    long[] assetLinkEntryIds)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    return getService()
294                                       .updateAsset(userId, folder, assetCategoryIds,
295                            assetTagNames, assetLinkEntryIds);
296            }
297    
298            public static void updateFileEntry(long userId,
299                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
300                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
301                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
302                    long assetClassPk)
303                    throws com.liferay.portal.kernel.exception.PortalException {
304                    getService()
305                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
306                            destinationFileVersion, assetClassPk);
307            }
308    
309            public static void updateFileEntry(long userId,
310                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
311                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
312                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
313                    com.liferay.portal.service.ServiceContext serviceContext)
314                    throws com.liferay.portal.kernel.exception.PortalException {
315                    getService()
316                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
317                            destinationFileVersion, serviceContext);
318            }
319    
320            public static void updateFolder(long userId,
321                    com.liferay.portal.kernel.repository.model.Folder folder,
322                    com.liferay.portal.service.ServiceContext serviceContext)
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    getService().updateFolder(userId, folder, serviceContext);
325            }
326    
327            public static void updateStatus(long userId,
328                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
329                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
330                    int oldStatus, int newStatus,
331                    com.liferay.portal.service.ServiceContext serviceContext,
332                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
333                    throws com.liferay.portal.kernel.exception.PortalException {
334                    getService()
335                            .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
336                            newStatus, serviceContext, workflowContext);
337            }
338    
339            public static DLAppHelperLocalService getService() {
340                    if (_service == null) {
341                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
342    
343                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
344                                    "_service");
345                    }
346    
347                    return _service;
348            }
349    
350            /**
351             * @deprecated As of 6.2.0
352             */
353            @Deprecated
354            public void setService(DLAppHelperLocalService service) {
355            }
356    
357            private static DLAppHelperLocalService _service;
358    }