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