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            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
171                    long userId,
172                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    return getService().moveFileEntryToTrash(userId, fileEntry);
176            }
177    
178            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutFromTrash(
179                    long userId,
180                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
181                    long newFolderId,
182                    com.liferay.portal.service.ServiceContext serviceContext)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return getService()
186                                       .moveFileShortcutFromTrash(userId, dlFileShortcut,
187                            newFolderId, serviceContext);
188            }
189    
190            public static com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutToTrash(
191                    long userId,
192                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException {
195                    return getService().moveFileShortcutToTrash(userId, dlFileShortcut);
196            }
197    
198            public static void moveFolder(
199                    com.liferay.portal.kernel.repository.model.Folder folder)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException {
202                    getService().moveFolder(folder);
203            }
204    
205            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
206                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
207                    long parentFolderId,
208                    com.liferay.portal.service.ServiceContext serviceContext)
209                    throws com.liferay.portal.kernel.exception.PortalException,
210                            com.liferay.portal.kernel.exception.SystemException {
211                    return getService()
212                                       .moveFolderFromTrash(userId, folder, parentFolderId,
213                            serviceContext);
214            }
215    
216            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
217                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    return getService().moveFolderToTrash(userId, folder);
221            }
222    
223            public static void restoreFileEntryFromTrash(long userId,
224                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    getService().restoreFileEntryFromTrash(userId, fileEntry);
228            }
229    
230            public static void restoreFileShortcutFromTrash(long userId,
231                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException {
234                    getService().restoreFileShortcutFromTrash(userId, dlFileShortcut);
235            }
236    
237            public static void restoreFolderFromTrash(long userId,
238                    com.liferay.portal.kernel.repository.model.Folder folder)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    getService().restoreFolderFromTrash(userId, folder);
242            }
243    
244            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
245                    long userId,
246                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
247                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
248                    long assetClassPk)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    return getService()
252                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
253            }
254    
255            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
256                    long userId,
257                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
258                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
259                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
260                    long[] assetLinkEntryIds)
261                    throws com.liferay.portal.kernel.exception.PortalException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return getService()
264                                       .updateAsset(userId, fileEntry, fileVersion,
265                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
266            }
267    
268            public static void updateFileEntry(long userId,
269                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
270                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
271                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
272                    long assetClassPk)
273                    throws com.liferay.portal.kernel.exception.PortalException,
274                            com.liferay.portal.kernel.exception.SystemException {
275                    getService()
276                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
277                            destinationFileVersion, assetClassPk);
278            }
279    
280            public static void updateFileEntry(long userId,
281                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
282                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
283                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
284                    com.liferay.portal.service.ServiceContext serviceContext)
285                    throws com.liferay.portal.kernel.exception.PortalException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    getService()
288                            .updateFileEntry(userId, fileEntry, sourceFileVersion,
289                            destinationFileVersion, serviceContext);
290            }
291    
292            public static void updateFolder(
293                    com.liferay.portal.kernel.repository.model.Folder folder,
294                    com.liferay.portal.service.ServiceContext serviceContext)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    getService().updateFolder(folder, serviceContext);
298            }
299    
300            public static void updateStatus(long userId,
301                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
302                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
303                    int oldStatus, int newStatus,
304                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
305                    throws com.liferay.portal.kernel.exception.PortalException,
306                            com.liferay.portal.kernel.exception.SystemException {
307                    getService()
308                            .updateStatus(userId, fileEntry, latestFileVersion, oldStatus,
309                            newStatus, workflowContext);
310            }
311    
312            public static void updateStatuses(com.liferay.portal.model.User user,
313                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders, int status)
314                    throws com.liferay.portal.kernel.exception.PortalException,
315                            com.liferay.portal.kernel.exception.SystemException {
316                    getService().updateStatuses(user, dlFileEntriesAndDLFolders, status);
317            }
318    
319            public static DLAppHelperLocalService getService() {
320                    if (_service == null) {
321                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
322    
323                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
324                                    "_service");
325                    }
326    
327                    return _service;
328            }
329    
330            /**
331             * @deprecated
332             */
333            public void setService(DLAppHelperLocalService service) {
334            }
335    
336            private static DLAppHelperLocalService _service;
337    }