001    /**
002     * Copyright (c) 2000-2011 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 deleteFileEntry(
076                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    getService().deleteFileEntry(fileEntry);
080            }
081    
082            public static void deleteFolder(
083                    com.liferay.portal.kernel.repository.model.Folder folder)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    getService().deleteFolder(folder);
087            }
088    
089            public static void getFileAsStream(long userId,
090                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
091                    boolean incrementCounter)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    getService().getFileAsStream(userId, fileEntry, incrementCounter);
095            }
096    
097            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
098                    long groupId, long folderId, int status)
099                    throws com.liferay.portal.kernel.exception.SystemException {
100                    return getService().getFileShortcuts(groupId, folderId, status);
101            }
102    
103            public static int getFileShortcutsCount(long groupId, long folderId,
104                    int status) throws com.liferay.portal.kernel.exception.SystemException {
105                    return getService().getFileShortcutsCount(groupId, folderId, status);
106            }
107    
108            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
109                    return getService().getNoAssetFileEntries();
110            }
111    
112            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
113                    long userId,
114                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
115                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
116                    long assetClassPk)
117                    throws com.liferay.portal.kernel.exception.PortalException,
118                            com.liferay.portal.kernel.exception.SystemException {
119                    return getService()
120                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
121            }
122    
123            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
124                    long userId,
125                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
126                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
127                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
128                    long[] assetLinkEntryIds)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    return getService()
132                                       .updateAsset(userId, fileEntry, fileVersion,
133                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
134            }
135    
136            public static void updateFileEntry(long userId,
137                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
138                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
139                    com.liferay.portal.service.ServiceContext serviceContext)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException {
142                    getService()
143                            .updateFileEntry(userId, fileEntry, fileVersion, serviceContext);
144            }
145    
146            public static void updateFolder(
147                    com.liferay.portal.kernel.repository.model.Folder folder,
148                    com.liferay.portal.service.ServiceContext serviceContext)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    getService().updateFolder(folder, serviceContext);
152            }
153    
154            public static void updateStatus(long userId,
155                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
156                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
157                    int status,
158                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    getService()
162                            .updateStatus(userId, fileEntry, latestFileVersion, status,
163                            workflowContext);
164            }
165    
166            public static DLAppHelperLocalService getService() {
167                    if (_service == null) {
168                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
169    
170                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
171                                    "_service");
172                            MethodCache.remove(DLAppHelperLocalService.class);
173                    }
174    
175                    return _service;
176            }
177    
178            public void setService(DLAppHelperLocalService service) {
179                    MethodCache.remove(DLAppHelperLocalService.class);
180    
181                    _service = service;
182    
183                    ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
184                            "_service");
185                    MethodCache.remove(DLAppHelperLocalService.class);
186            }
187    
188            private static DLAppHelperLocalService _service;
189    }