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            * Returns the OSGi service identifier.
056            *
057            * @return the OSGi service identifier
058            */
059            public java.lang.String getOSGiServiceIdentifier();
060    
061            /**
062            * Moves the file entry from a trashed folder to the new folder.
063            *
064            * @param fileEntryId the primary key of the file entry
065            * @param newFolderId the primary key of the new folder
066            * @param serviceContext the service context to be applied
067            * @return the file entry
068            */
069            public FileEntry moveFileEntryFromTrash(long fileEntryId, long newFolderId,
070                    ServiceContext serviceContext) throws PortalException;
071    
072            /**
073            * Moves the file entry with the primary key to the trash portlet.
074            *
075            * @param fileEntryId the primary key of the file entry
076            * @return the file entry
077            */
078            public FileEntry moveFileEntryToTrash(long fileEntryId)
079                    throws PortalException;
080    
081            /**
082            * Moves the file shortcut from a trashed folder to the new folder.
083            *
084            * @param fileShortcutId the primary key of the file shortcut
085            * @param newFolderId the primary key of the new folder
086            * @param serviceContext the service context to be applied
087            * @return the file shortcut
088            */
089            public FileShortcut moveFileShortcutFromTrash(long fileShortcutId,
090                    long newFolderId, ServiceContext serviceContext)
091                    throws PortalException;
092    
093            /**
094            * Moves the file shortcut with the primary key to the trash portlet.
095            *
096            * @param fileShortcutId the primary key of the file shortcut
097            * @return the file shortcut
098            */
099            public FileShortcut moveFileShortcutToTrash(long fileShortcutId)
100                    throws PortalException;
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 Folder moveFolderFromTrash(long folderId, long parentFolderId,
112                    ServiceContext serviceContext) throws PortalException;
113    
114            /**
115            * Moves the folder with the primary key to the trash portlet.
116            *
117            * @param folderId the primary key of the folder
118            * @return the file entry
119            */
120            public Folder moveFolderToTrash(long folderId) throws PortalException;
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    }