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