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.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * 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.
023     *
024     * <p>
025     * 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.
026     * </p>
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(
069                    com.liferay.portal.kernel.repository.model.Folder folder,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    getService().addFolder(folder, serviceContext);
073            }
074    
075            public static void checkAssetEntry(long userId,
076                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
077                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    getService().checkAssetEntry(userId, fileEntry, fileVersion);
081            }
082    
083            public static void deleteFileEntry(
084                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    getService().deleteFileEntry(fileEntry);
088            }
089    
090            public static void deleteFolder(
091                    com.liferay.portal.kernel.repository.model.Folder folder)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    getService().deleteFolder(folder);
095            }
096    
097            public static void getFileAsStream(long userId,
098                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
099                    boolean incrementCounter)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    getService().getFileAsStream(userId, fileEntry, incrementCounter);
102            }
103    
104            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
105                    long groupId, long folderId, int status)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().getFileShortcuts(groupId, folderId, status);
108            }
109    
110            public static int getFileShortcutsCount(long groupId, long folderId,
111                    int status) throws com.liferay.portal.kernel.exception.SystemException {
112                    return getService().getFileShortcutsCount(groupId, folderId, status);
113            }
114    
115            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
116                    return getService().getNoAssetFileEntries();
117            }
118    
119            public static void moveFileEntry(
120                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
121                    throws com.liferay.portal.kernel.exception.PortalException,
122                            com.liferay.portal.kernel.exception.SystemException {
123                    getService().moveFileEntry(fileEntry);
124            }
125    
126            public static void moveFolder(
127                    com.liferay.portal.kernel.repository.model.Folder folder)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException {
130                    getService().moveFolder(folder);
131            }
132    
133            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
134                    long userId,
135                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
136                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
137                    long assetClassPk)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    return getService()
141                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
142            }
143    
144            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
145                    long userId,
146                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
147                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
148                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
149                    long[] assetLinkEntryIds)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getService()
153                                       .updateAsset(userId, fileEntry, fileVersion,
154                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
155            }
156    
157            public static void updateFileEntry(long userId,
158                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
159                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
160                    long assetClassPk)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    getService()
164                            .updateFileEntry(userId, fileEntry, fileVersion, assetClassPk);
165            }
166    
167            public static void updateFileEntry(long userId,
168                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
169                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
170                    com.liferay.portal.service.ServiceContext serviceContext)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    getService()
174                            .updateFileEntry(userId, fileEntry, fileVersion, serviceContext);
175            }
176    
177            public static void updateFolder(
178                    com.liferay.portal.kernel.repository.model.Folder folder,
179                    com.liferay.portal.service.ServiceContext serviceContext)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    getService().updateFolder(folder, serviceContext);
183            }
184    
185            public static void updateStatus(long userId,
186                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
187                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
188                    int status,
189                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
190                    throws com.liferay.portal.kernel.exception.PortalException,
191                            com.liferay.portal.kernel.exception.SystemException {
192                    getService()
193                            .updateStatus(userId, fileEntry, latestFileVersion, status,
194                            workflowContext);
195            }
196    
197            public static DLAppHelperLocalService getService() {
198                    if (_service == null) {
199                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
200    
201                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
202                                    "_service");
203                            MethodCache.remove(DLAppHelperLocalService.class);
204                    }
205    
206                    return _service;
207            }
208    
209            public void setService(DLAppHelperLocalService service) {
210                    MethodCache.remove(DLAppHelperLocalService.class);
211    
212                    _service = service;
213    
214                    ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
215                            "_service");
216                    MethodCache.remove(DLAppHelperLocalService.class);
217            }
218    
219            private static DLAppHelperLocalService _service;
220    }