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