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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.repository.model.FileEntry;
023    import com.liferay.portal.kernel.repository.model.FileShortcut;
024    import com.liferay.portal.kernel.repository.model.Folder;
025    import com.liferay.portal.kernel.security.access.control.AccessControlled;
026    import com.liferay.portal.kernel.service.BaseService;
027    import com.liferay.portal.kernel.service.ServiceContext;
028    import com.liferay.portal.kernel.transaction.Isolation;
029    import com.liferay.portal.kernel.transaction.Transactional;
030    
031    /**
032     * Provides the remote service interface for DLTrash. Methods of this
033     * service are expected to have security checks based on the propagated JAAS
034     * credentials because this service can be accessed remotely.
035     *
036     * @author Brian Wing Shun Chan
037     * @see DLTrashServiceUtil
038     * @see com.liferay.portlet.documentlibrary.service.base.DLTrashServiceBaseImpl
039     * @see com.liferay.portlet.documentlibrary.service.impl.DLTrashServiceImpl
040     * @generated
041     */
042    @AccessControlled
043    @JSONWebService
044    @ProviderType
045    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
046            PortalException.class, SystemException.class})
047    public interface DLTrashService extends BaseService {
048            /*
049             * NOTE FOR DEVELOPERS:
050             *
051             * Never modify or reference this interface directly. Always use {@link DLTrashServiceUtil} to access the d l trash remote service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLTrashServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
052             */
053    
054            /**
055            * Moves the file entry from a trashed folder to the new folder.
056            *
057            * @param fileEntryId the primary key of the file entry
058            * @param newFolderId the primary key of the new folder
059            * @param serviceContext the service context to be applied
060            * @return the file entry
061            */
062            public FileEntry moveFileEntryFromTrash(long fileEntryId, long newFolderId,
063                    ServiceContext serviceContext) throws PortalException;
064    
065            /**
066            * Moves the file entry with the primary key to the trash portlet.
067            *
068            * @param fileEntryId the primary key of the file entry
069            * @return the file entry
070            */
071            public FileEntry moveFileEntryToTrash(long fileEntryId)
072                    throws PortalException;
073    
074            /**
075            * Moves the file shortcut from a trashed folder to the new folder.
076            *
077            * @param fileShortcutId the primary key of the file shortcut
078            * @param newFolderId the primary key of the new folder
079            * @param serviceContext the service context to be applied
080            * @return the file shortcut
081            */
082            public FileShortcut moveFileShortcutFromTrash(long fileShortcutId,
083                    long newFolderId, ServiceContext serviceContext)
084                    throws PortalException;
085    
086            /**
087            * Moves the file shortcut with the primary key to the trash portlet.
088            *
089            * @param fileShortcutId the primary key of the file shortcut
090            * @return the file shortcut
091            */
092            public FileShortcut moveFileShortcutToTrash(long fileShortcutId)
093                    throws PortalException;
094    
095            /**
096            * Moves the folder with the primary key from the trash portlet to the new
097            * parent folder with the primary key.
098            *
099            * @param folderId the primary key of the folder
100            * @param parentFolderId the primary key of the new parent folder
101            * @param serviceContext the service context to be applied
102            * @return the file entry
103            */
104            public Folder moveFolderFromTrash(long folderId, long parentFolderId,
105                    ServiceContext serviceContext) throws PortalException;
106    
107            /**
108            * Moves the folder with the primary key to the trash portlet.
109            *
110            * @param folderId the primary key of the folder
111            * @return the file entry
112            */
113            public Folder moveFolderToTrash(long folderId) throws PortalException;
114    
115            /**
116            * Returns the OSGi service identifier.
117            *
118            * @return the OSGi service identifier
119            */
120            public java.lang.String getOSGiServiceIdentifier();
121    
122            /**
123            * Restores the file entry with the primary key from the trash portlet.
124            *
125            * @param fileEntryId the primary key of the file entry
126            */
127            public void restoreFileEntryFromTrash(long fileEntryId)
128                    throws PortalException;
129    
130            /**
131            * Restores the file shortcut with the primary key from the trash portlet.
132            *
133            * @param fileShortcutId the primary key of the file shortcut
134            */
135            public void restoreFileShortcutFromTrash(long fileShortcutId)
136                    throws PortalException;
137    
138            /**
139            * Restores the folder with the primary key from the trash portlet.
140            *
141            * @param folderId the primary key of the folder
142            */
143            public void restoreFolderFromTrash(long folderId) throws PortalException;
144    }