001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.SystemException {
093                    getService().getFileAsStream(userId, fileEntry, incrementCounter);
094            }
095    
096            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
097                    long groupId, long folderId, int status)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getService().getFileShortcuts(groupId, folderId, status);
100            }
101    
102            public static int getFileShortcutsCount(long groupId, long folderId,
103                    int status) throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().getFileShortcutsCount(groupId, folderId, status);
105            }
106    
107            public static java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries() {
108                    return getService().getNoAssetFileEntries();
109            }
110    
111            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
112                    long userId,
113                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
114                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
115                    long assetClassPk)
116                    throws com.liferay.portal.kernel.exception.PortalException,
117                            com.liferay.portal.kernel.exception.SystemException {
118                    return getService()
119                                       .updateAsset(userId, fileEntry, fileVersion, assetClassPk);
120            }
121    
122            public static com.liferay.portlet.asset.model.AssetEntry updateAsset(
123                    long userId,
124                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
125                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
126                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
127                    long[] assetLinkEntryIds)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException {
130                    return getService()
131                                       .updateAsset(userId, fileEntry, fileVersion,
132                            assetCategoryIds, assetTagNames, assetLinkEntryIds);
133            }
134    
135            public static void updateFileEntry(long userId,
136                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
137                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
138                    com.liferay.portal.service.ServiceContext serviceContext)
139                    throws com.liferay.portal.kernel.exception.PortalException,
140                            com.liferay.portal.kernel.exception.SystemException {
141                    getService()
142                            .updateFileEntry(userId, fileEntry, fileVersion, serviceContext);
143            }
144    
145            public static void updateFolder(
146                    com.liferay.portal.kernel.repository.model.Folder folder,
147                    com.liferay.portal.service.ServiceContext serviceContext)
148                    throws com.liferay.portal.kernel.exception.PortalException,
149                            com.liferay.portal.kernel.exception.SystemException {
150                    getService().updateFolder(folder, serviceContext);
151            }
152    
153            public static void updateStatus(long userId,
154                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
155                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
156                    int status,
157                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
158                    throws com.liferay.portal.kernel.exception.PortalException,
159                            com.liferay.portal.kernel.exception.SystemException {
160                    getService()
161                            .updateStatus(userId, fileEntry, latestFileVersion, status,
162                            workflowContext);
163            }
164    
165            public static DLAppHelperLocalService getService() {
166                    if (_service == null) {
167                            _service = (DLAppHelperLocalService)PortalBeanLocatorUtil.locate(DLAppHelperLocalService.class.getName());
168    
169                            ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
170                                    "_service");
171                            MethodCache.remove(DLAppHelperLocalService.class);
172                    }
173    
174                    return _service;
175            }
176    
177            public void setService(DLAppHelperLocalService service) {
178                    MethodCache.remove(DLAppHelperLocalService.class);
179    
180                    _service = service;
181    
182                    ReferenceRegistry.registerReference(DLAppHelperLocalServiceUtil.class,
183                            "_service");
184                    MethodCache.remove(DLAppHelperLocalService.class);
185            }
186    
187            private static DLAppHelperLocalService _service;
188    }