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