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.document.library.kernel.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            * Moves the file entry from a trashed folder to the new folder.
046            *
047            * @param fileEntryId the primary key of the file entry
048            * @param newFolderId the primary key of the new folder
049            * @param serviceContext the service context to be applied
050            * @return the file entry
051            */
052            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
053                    long fileEntryId, long newFolderId,
054                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
055                    throws com.liferay.portal.kernel.exception.PortalException {
056                    return getService()
057                                       .moveFileEntryFromTrash(fileEntryId, newFolderId,
058                            serviceContext);
059            }
060    
061            /**
062            * Moves the file entry with the primary key to the trash portlet.
063            *
064            * @param fileEntryId the primary key of the file entry
065            * @return the file entry
066            */
067            public static com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
068                    long fileEntryId)
069                    throws com.liferay.portal.kernel.exception.PortalException {
070                    return getService().moveFileEntryToTrash(fileEntryId);
071            }
072    
073            /**
074            * Moves the file shortcut from a trashed folder to the new folder.
075            *
076            * @param fileShortcutId the primary key of the file shortcut
077            * @param newFolderId the primary key of the new folder
078            * @param serviceContext the service context to be applied
079            * @return the file shortcut
080            */
081            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
082                    long fileShortcutId, long newFolderId,
083                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
084                    throws com.liferay.portal.kernel.exception.PortalException {
085                    return getService()
086                                       .moveFileShortcutFromTrash(fileShortcutId, newFolderId,
087                            serviceContext);
088            }
089    
090            /**
091            * Moves the file shortcut with the primary key to the trash portlet.
092            *
093            * @param fileShortcutId the primary key of the file shortcut
094            * @return the file shortcut
095            */
096            public static com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
097                    long fileShortcutId)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    return getService().moveFileShortcutToTrash(fileShortcutId);
100            }
101    
102            /**
103            * Moves the folder with the primary key from the trash portlet to the new
104            * parent folder with the primary key.
105            *
106            * @param folderId the primary key of the folder
107            * @param parentFolderId the primary key of the new parent folder
108            * @param serviceContext the service context to be applied
109            * @return the file entry
110            */
111            public static com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
112                    long folderId, long parentFolderId,
113                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
114                    throws com.liferay.portal.kernel.exception.PortalException {
115                    return getService()
116                                       .moveFolderFromTrash(folderId, parentFolderId, serviceContext);
117            }
118    
119            /**
120            * Moves the folder with the primary key to the trash portlet.
121            *
122            * @param folderId the primary key of the folder
123            * @return the file entry
124            */
125            public static com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
126                    long folderId)
127                    throws com.liferay.portal.kernel.exception.PortalException {
128                    return getService().moveFolderToTrash(folderId);
129            }
130    
131            /**
132            * Returns the OSGi service identifier.
133            *
134            * @return the OSGi service identifier
135            */
136            public static java.lang.String getOSGiServiceIdentifier() {
137                    return getService().getOSGiServiceIdentifier();
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    }