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     * 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 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.PortalException,
222                            com.liferay.portal.kernel.exception.SystemException {
223                    getService().moveFolder(folder);
224            }
225    
226            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
227                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
228                    long parentFolderId,
229                    com.liferay.portal.service.ServiceContext serviceContext)
230                    throws com.liferay.portal.kernel.exception.PortalException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    return getService()
233                                       .moveFolderFromTrash(userId, folder, parentFolderId,
234                            serviceContext);
235            }
236    
237            /**
238            * Moves the folder to the recycle bin.
239            *
240            * @param userId the primary key of the user moving the folder
241            * @param folder the folder to be moved
242            * @return the moved folder
243            * @throws PortalException if a user with the primary key could not be found
244            * @throws SystemException if a system exception occurred
245            */
246            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
247                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
248                    throws com.liferay.portal.kernel.exception.PortalException,
249                            com.liferay.portal.kernel.exception.SystemException {
250                    return getService().moveFolderToTrash(userId, folder);
251            }
252    
253            public static void restoreFileEntryFromTrash(long userId,
254                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
255                    throws com.liferay.portal.kernel.exception.PortalException,
256                            com.liferay.portal.kernel.exception.SystemException {
257                    getService().restoreFileEntryFromTrash(userId, fileEntry);
258            }
259    
260            public static void restoreFileShortcutFromTrash(long userId,
261                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
262                    throws com.liferay.portal.kernel.exception.PortalException,
263                            com.liferay.portal.kernel.exception.SystemException {
264                    getService().restoreFileShortcutFromTrash(userId, dlFileShortcut);
265            }
266    
267            public static void restoreFolderFromTrash(long userId,
268                    com.liferay.portal.kernel.repository.model.Folder folder)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    getService().restoreFolderFromTrash(userId, folder);
272            }
273    
274            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
275                    long userId,
276                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
277                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
278                    long assetClassPk)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    return getService()
282                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
283            }
284    
285            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
286                    long userId,
287                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
288                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
289                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
290                    long[] assetLinkEntryIds)
291                    throws com.liferay.portal.kernel.exception.PortalException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    return getService()
294                                       .updateAsset(userId, fileEntry, fileVersion,
295                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
296            }
297    
298            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
299                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
300                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
301                    long[] assetLinkEntryIds)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException {
304                    return getService()
305                                       .updateAsset(userId, folder, assetCategoryIds,
306                            assetTagNames, assetLinkEntryIds);
307            }
308    
309            public static void updateDependentStatus(
310                    com.liferay.portal.model.User user,
311                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders, int status)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    getService()
315                            .updateDependentStatus(user, dlFileEntriesAndDLFolders, status);
316            }
317    
318            public static void updateFileEntry(long userId,
319                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
320                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
321                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
322                    long assetClassPk)
323                    throws com.liferay.portal.kernel.exception.PortalException,
324                            com.liferay.portal.kernel.exception.SystemException {
325                    getService()
326                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
327                            destinationFileVersion, assetClassPk);
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                    com.liferay.portal.service.ServiceContext serviceContext)
335                    throws com.liferay.portal.kernel.exception.PortalException,
336                            com.liferay.portal.kernel.exception.SystemException {
337                    getService()
338                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
339                            destinationFileVersion, serviceContext);
340            }
341    
342            public static void updateFolder(long userId,
343                    com.liferay.portal.kernel.repository.model.Folder folder,
344                    com.liferay.portal.service.ServiceContext serviceContext)
345                    throws com.liferay.portal.kernel.exception.PortalException,
346                            com.liferay.portal.kernel.exception.SystemException {
347                    getService().updateFolder(userId, folder, serviceContext);
348            }
349    
350            public static void updateStatus(long userId,
351                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
352                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
353                    int oldStatus, int newStatus,
354                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext,
355                    com.liferay.portal.service.ServiceContext serviceContext)
356                    throws com.liferay.portal.kernel.exception.PortalException,
357                            com.liferay.portal.kernel.exception.SystemException {
358                    getService()
359                            .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
360                            newStatus, workflowContext, serviceContext);
361            }
362    
363            public static DLAppHelperLocalService getService() {
364                    if (_service == null) {
365                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
366    
367                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
368                                    "_service");
369                    }
370    
371                    return _service;
372            }
373    
374            /**
375             * @deprecated As of 6.2.0
376             */
377            public void setService(DLAppHelperLocalService service) {
378            }
379    
380            private static DLAppHelperLocalService _service;
381    }