001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for DLTrash. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLTrashServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLTrashService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLTrashServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLTrashServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLTrashServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLTrashServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Returns the OSGi service identifier.
046            *
047            * @return the OSGi service identifier
048            */
049            public static java.lang.String getOSGiServiceIdentifier() {
050                    return getService().getOSGiServiceIdentifier();
051            }
052    
053            /**
054            * Moves the file entry from a trashed folder to the new folder.
055            *
056            * @param fileEntryId the primary key of the file entry
057            * @param newFolderId the primary key of the new folder
058            * @param serviceContext the service context to be applied
059            * @return the file entry
060            */
061            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
062                    long fileEntryId, long newFolderId,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException {
065                    return getService()
066                                       .moveFileEntryFromTrash(fileEntryId, newFolderId,
067                            serviceContext);
068            }
069    
070            /**
071            * Moves the file entry with the primary key to the trash portlet.
072            *
073            * @param fileEntryId the primary key of the file entry
074            * @return the file entry
075            */
076            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
077                    long fileEntryId)
078                    throws com.liferay.portal.kernel.exception.PortalException {
079                    return getService().moveFileEntryToTrash(fileEntryId);
080            }
081    
082            /**
083            * Moves the file shortcut from a trashed folder to the new folder.
084            *
085            * @param fileShortcutId the primary key of the file shortcut
086            * @param newFolderId the primary key of the new folder
087            * @param serviceContext the service context to be applied
088            * @return the file shortcut
089            */
090            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
091                    long fileShortcutId, long newFolderId,
092                    com.liferay.portal.service.ServiceContext serviceContext)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    return getService()
095                                       .moveFileShortcutFromTrash(fileShortcutId, newFolderId,
096                            serviceContext);
097            }
098    
099            /**
100            * Moves the file shortcut with the primary key to the trash portlet.
101            *
102            * @param fileShortcutId the primary key of the file shortcut
103            * @return the file shortcut
104            */
105            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
106                    long fileShortcutId)
107                    throws com.liferay.portal.kernel.exception.PortalException {
108                    return getService().moveFileShortcutToTrash(fileShortcutId);
109            }
110    
111            /**
112            * Moves the folder with the primary key from the trash portlet to the new
113            * parent folder with the primary key.
114            *
115            * @param folderId the primary key of the folder
116            * @param parentFolderId the primary key of the new parent folder
117            * @param serviceContext the service context to be applied
118            * @return the file entry
119            */
120            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
121                    long folderId, long parentFolderId,
122                    com.liferay.portal.service.ServiceContext serviceContext)
123                    throws com.liferay.portal.kernel.exception.PortalException {
124                    return getService()
125                                       .moveFolderFromTrash(folderId, parentFolderId, serviceContext);
126            }
127    
128            /**
129            * Moves the folder with the primary key to the trash portlet.
130            *
131            * @param folderId the primary key of the folder
132            * @return the file entry
133            */
134            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
135                    long folderId)
136                    throws com.liferay.portal.kernel.exception.PortalException {
137                    return getService().moveFolderToTrash(folderId);
138            }
139    
140            /**
141            * Restores the file entry with the primary key from the trash portlet.
142            *
143            * @param fileEntryId the primary key of the file entry
144            */
145            public static void restoreFileEntryFromTrash(long fileEntryId)
146                    throws com.liferay.portal.kernel.exception.PortalException {
147                    getService().restoreFileEntryFromTrash(fileEntryId);
148            }
149    
150            /**
151            * Restores the file shortcut with the primary key from the trash portlet.
152            *
153            * @param fileShortcutId the primary key of the file shortcut
154            */
155            public static void restoreFileShortcutFromTrash(long fileShortcutId)
156                    throws com.liferay.portal.kernel.exception.PortalException {
157                    getService().restoreFileShortcutFromTrash(fileShortcutId);
158            }
159    
160            /**
161            * Restores the folder with the primary key from the trash portlet.
162            *
163            * @param folderId the primary key of the folder
164            */
165            public static void restoreFolderFromTrash(long folderId)
166                    throws com.liferay.portal.kernel.exception.PortalException {
167                    getService().restoreFolderFromTrash(folderId);
168            }
169    
170            public static DLTrashService getService() {
171                    if (_service == null) {
172                            _service = (DLTrashService)PortalBeanLocatorUtil.locate(DLTrashService.class.getName());
173    
174                            ReferenceRegistry.registerReference(DLTrashServiceUtil.class,
175                                    "_service");
176                    }
177    
178                    return _service;
179            }
180    
181            private static DLTrashService _service;
182    }