001    /**
002     * Copyright (c) 2000-2013 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    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            public static void addFileEntry(long userId,
063                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
064                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
065                    com.liferay.portal.service.ServiceContext serviceContext)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    getService().addFileEntry(userId, fileEntry, fileVersion, serviceContext);
069            }
070    
071            public static void addFolder(long userId,
072                    com.liferay.portal.kernel.repository.model.Folder folder,
073                    com.liferay.portal.service.ServiceContext serviceContext)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    getService().addFolder(userId, folder, serviceContext);
077            }
078    
079            public static void cancelCheckOut(long userId,
080                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
081                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
082                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
083                    com.liferay.portal.kernel.repository.model.FileVersion draftFileVersion,
084                    com.liferay.portal.service.ServiceContext serviceContext)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    getService()
088                            .cancelCheckOut(userId, fileEntry, sourceFileVersion,
089                            destinationFileVersion, draftFileVersion, serviceContext);
090            }
091    
092            public static void checkAssetEntry(long userId,
093                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
094                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    getService().checkAssetEntry(userId, fileEntry, fileVersion);
098            }
099    
100            public static void deleteFileEntry(
101                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
102                    throws com.liferay.portal.kernel.exception.PortalException,
103                            com.liferay.portal.kernel.exception.SystemException {
104                    getService().deleteFileEntry(fileEntry);
105            }
106    
107            public static void deleteFolder(
108                    com.liferay.portal.kernel.repository.model.Folder folder)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            com.liferay.portal.kernel.exception.SystemException {
111                    getService().deleteFolder(folder);
112            }
113    
114            public static void getFileAsStream(long userId,
115                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
116                    boolean incrementCounter)
117                    throws com.liferay.portal.kernel.exception.SystemException {
118                    getService().getFileAsStream(userId, fileEntry, incrementCounter);
119            }
120    
121            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
122                    long groupId, long folderId, boolean active, int status)
123                    throws com.liferay.portal.kernel.exception.SystemException {
124                    return getService().getFileShortcuts(groupId, folderId, active, status);
125            }
126    
127            /**
128            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcuts(long, long,
129            boolean, int)}
130            */
131            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
132                    long groupId, long folderId, int status)
133                    throws com.liferay.portal.kernel.exception.SystemException {
134                    return getService().getFileShortcuts(groupId, folderId, status);
135            }
136    
137            public static int getFileShortcutsCount(long groupId, long folderId,
138                    boolean active, int status)
139                    throws com.liferay.portal.kernel.exception.SystemException {
140                    return getService()
141                                       .getFileShortcutsCount(groupId, folderId, active, status);
142            }
143    
144            /**
145            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcutsCount(long,
146            long, boolean, int)}
147            */
148            public static int getFileShortcutsCount(long groupId, long folderId,
149                    int status) throws com.liferay.portal.kernel.exception.SystemException {
150                    return getService().getFileShortcutsCount(groupId, folderId, status);
151            }
152    
153            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
154                    return getService().getNoAssetFileEntries();
155            }
156    
157            public static void moveDependentsToTrash(
158                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
159                    long trashEntryId)
160                    throws com.liferay.portal.kernel.exception.PortalException,
161                            com.liferay.portal.kernel.exception.SystemException {
162                    getService()
163                            .moveDependentsToTrash(dlFileEntriesAndDLFolders, trashEntryId);
164            }
165    
166            public static void moveFileEntry(
167                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    getService().moveFileEntry(fileEntry);
171            }
172    
173            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
174                    long userId,
175                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
176                    long newFolderId,
177                    com.liferay.portal.service.ServiceContext serviceContext)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getService()
181                                       .moveFileEntryFromTrash(userId, fileEntry, newFolderId,
182                            serviceContext);
183            }
184    
185            /**
186            * Moves the file entry to the recycle bin.
187            *
188            * @param userId the primary key of the user moving the file entry
189            * @param fileEntry the file entry to be moved
190            * @return the moved file entry
191            * @throws PortalException if a user with the primary key could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
195                    long userId,
196                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
197                    throws com.liferay.portal.kernel.exception.PortalException,
198                            com.liferay.portal.kernel.exception.SystemException {
199                    return getService().moveFileEntryToTrash(userId, fileEntry);
200            }
201    
202            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutFromTrash(
203                    long userId,
204                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
205                    long newFolderId,
206                    com.liferay.portal.service.ServiceContext serviceContext)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    return getService()
210                                       .moveFileShortcutFromTrash(userId, dlFileShortcut,
211                            newFolderId, serviceContext);
212            }
213    
214            /**
215            * Moves the file shortcut to the recycle bin.
216            *
217            * @param userId the primary key of the user moving the file shortcut
218            * @param dlFileShortcut the file shortcut to be moved
219            * @return the moved file shortcut
220            * @throws PortalException if a user with the primary key could not be found
221            * @throws SystemException if a system exception occurred
222            */
223            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutToTrash(
224                    long userId,
225                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
226                    throws com.liferay.portal.kernel.exception.PortalException,
227                            com.liferay.portal.kernel.exception.SystemException {
228                    return getService().moveFileShortcutToTrash(userId, dlFileShortcut);
229            }
230    
231            public static void moveFolder(
232                    com.liferay.portal.kernel.repository.model.Folder folder)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    getService().moveFolder(folder);
235            }
236    
237            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
238                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
239                    long parentFolderId,
240                    com.liferay.portal.service.ServiceContext serviceContext)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException {
243                    return getService()
244                                       .moveFolderFromTrash(userId, folder, parentFolderId,
245                            serviceContext);
246            }
247    
248            /**
249            * Moves the folder to the recycle bin.
250            *
251            * @param userId the primary key of the user moving the folder
252            * @param folder the folder to be moved
253            * @return the moved folder
254            * @throws PortalException if a user with the primary key could not be found
255            * @throws SystemException if a system exception occurred
256            */
257            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
258                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getService().moveFolderToTrash(userId, folder);
262            }
263    
264            public static void registerDLSyncEventCallback(java.lang.String event,
265                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
266                    throws com.liferay.portal.kernel.exception.PortalException,
267                            com.liferay.portal.kernel.exception.SystemException {
268                    getService().registerDLSyncEventCallback(event, fileEntry);
269            }
270    
271            public static void registerDLSyncEventCallback(java.lang.String event,
272                    com.liferay.portal.kernel.repository.model.Folder folder)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    getService().registerDLSyncEventCallback(event, folder);
275            }
276    
277            public static void restoreDependentsFromTrash(
278                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
279                    long trashEntryId)
280                    throws com.liferay.portal.kernel.exception.PortalException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    getService()
283                            .restoreDependentsFromTrash(dlFileEntriesAndDLFolders, trashEntryId);
284            }
285    
286            public static void restoreFileEntryFromTrash(long userId,
287                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
288                    throws com.liferay.portal.kernel.exception.PortalException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    getService().restoreFileEntryFromTrash(userId, fileEntry);
291            }
292    
293            public static void restoreFileShortcutFromTrash(long userId,
294                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    getService().restoreFileShortcutFromTrash(userId, dlFileShortcut);
298            }
299    
300            public static void restoreFolderFromTrash(long userId,
301                    com.liferay.portal.kernel.repository.model.Folder folder)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException {
304                    getService().restoreFolderFromTrash(userId, folder);
305            }
306    
307            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
308                    long userId,
309                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
310                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
311                    long assetClassPk)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    return getService()
315                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
316            }
317    
318            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
319                    long userId,
320                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
321                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
322                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
323                    long[] assetLinkEntryIds)
324                    throws com.liferay.portal.kernel.exception.PortalException,
325                            com.liferay.portal.kernel.exception.SystemException {
326                    return getService()
327                                       .updateAsset(userId, fileEntry, fileVersion,
328                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
329            }
330    
331            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
332                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
333                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
334                    long[] assetLinkEntryIds)
335                    throws com.liferay.portal.kernel.exception.PortalException,
336                            com.liferay.portal.kernel.exception.SystemException {
337                    return getService()
338                                       .updateAsset(userId, folder, assetCategoryIds,
339                            assetTagNames, assetLinkEntryIds);
340            }
341    
342            public static void updateFileEntry(long userId,
343                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
344                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
345                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
346                    long assetClassPk)
347                    throws com.liferay.portal.kernel.exception.PortalException,
348                            com.liferay.portal.kernel.exception.SystemException {
349                    getService()
350                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
351                            destinationFileVersion, assetClassPk);
352            }
353    
354            public static void updateFileEntry(long userId,
355                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
356                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
357                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
358                    com.liferay.portal.service.ServiceContext serviceContext)
359                    throws com.liferay.portal.kernel.exception.PortalException,
360                            com.liferay.portal.kernel.exception.SystemException {
361                    getService()
362                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
363                            destinationFileVersion, serviceContext);
364            }
365    
366            public static void updateFolder(long userId,
367                    com.liferay.portal.kernel.repository.model.Folder folder,
368                    com.liferay.portal.service.ServiceContext serviceContext)
369                    throws com.liferay.portal.kernel.exception.PortalException,
370                            com.liferay.portal.kernel.exception.SystemException {
371                    getService().updateFolder(userId, folder, serviceContext);
372            }
373    
374            public static void updateStatus(long userId,
375                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
376                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
377                    int oldStatus, int newStatus,
378                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
379                    com.liferay.portal.service.ServiceContext serviceContext)
380                    throws com.liferay.portal.kernel.exception.PortalException,
381                            com.liferay.portal.kernel.exception.SystemException {
382                    getService()
383                            .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
384                            newStatus, workflowContext, serviceContext);
385            }
386    
387            public static DLAppHelperLocalService getService() {
388                    if (_service == null) {
389                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
390    
391                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
392                                    "_service");
393                    }
394    
395                    return _service;
396            }
397    
398            /**
399             * @deprecated As of 6.2.0
400             */
401            public void setService(DLAppHelperLocalService service) {
402            }
403    
404            private static DLAppHelperLocalService _service;
405    }