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.transaction.Isolation;
022    import com.liferay.portal.kernel.transaction.Propagation;
023    import com.liferay.portal.kernel.transaction.Transactional;
024    import com.liferay.portal.service.BaseLocalService;
025    
026    /**
027     * Provides the local service interface for DLAppHelper. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see DLAppHelperLocalServiceUtil
034     * @see com.liferay.portlet.documentlibrary.service.base.DLAppHelperLocalServiceBaseImpl
035     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppHelperLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface DLAppHelperLocalService extends BaseLocalService {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify or reference this interface directly. Always use {@link DLAppHelperLocalServiceUtil} to access the d l app helper local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppHelperLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
046             */
047            public void addFolder(long userId,
048                    com.liferay.portal.kernel.repository.model.Folder folder,
049                    com.liferay.portal.service.ServiceContext serviceContext)
050                    throws PortalException;
051    
052            public void cancelCheckOut(long userId,
053                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
054                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
055                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
056                    com.liferay.portal.kernel.repository.model.FileVersion draftFileVersion,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws PortalException;
059    
060            public void checkAssetEntry(long userId,
061                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
062                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
063                    throws PortalException;
064    
065            public void deleteFileEntry(
066                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
067                    throws PortalException;
068    
069            public void deleteFolder(
070                    com.liferay.portal.kernel.repository.model.Folder folder)
071                    throws PortalException;
072    
073            public void deleteRepositoryFileEntries(long repositoryId)
074                    throws PortalException;
075    
076            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077            public void getFileAsStream(long userId,
078                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
079                    boolean incrementCounter);
080    
081            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
082            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
083                    long groupId, long folderId, boolean active, int status);
084    
085            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
086            public int getFileShortcutsCount(long groupId, long folderId,
087                    boolean active, int status);
088    
089            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
090            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries();
091    
092            /**
093            * Returns the OSGi service identifier.
094            *
095            * @return the OSGi service identifier
096            */
097            public java.lang.String getOSGiServiceIdentifier();
098    
099            /**
100            * @deprecated As of 7.0.0, replaced by {@link
101            #moveDependentsToTrash(DLFolder)}
102            */
103            @java.lang.Deprecated
104            public void moveDependentsToTrash(
105                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
106                    long trashEntryId) throws PortalException;
107    
108            public void moveDependentsToTrash(
109                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
110                    throws PortalException;
111    
112            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
113                    long userId,
114                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
115                    long newFolderId,
116                    com.liferay.portal.service.ServiceContext serviceContext)
117                    throws PortalException;
118    
119            /**
120            * Moves the file entry to the recycle bin.
121            *
122            * @param userId the primary key of the user moving the file entry
123            * @param fileEntry the file entry to be moved
124            * @return the moved file entry
125            */
126            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
127                    long userId,
128                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
129                    throws PortalException;
130    
131            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
132                    long userId,
133                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
134                    long newFolderId,
135                    com.liferay.portal.service.ServiceContext serviceContext)
136                    throws PortalException;
137    
138            /**
139            * Moves the file shortcut to the recycle bin.
140            *
141            * @param userId the primary key of the user moving the file shortcut
142            * @param fileShortcut the file shortcut to be moved
143            * @return the moved file shortcut
144            */
145            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
146                    long userId,
147                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
148                    throws PortalException;
149    
150            public com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
151                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
152                    long parentFolderId,
153                    com.liferay.portal.service.ServiceContext serviceContext)
154                    throws PortalException;
155    
156            /**
157            * Moves the folder to the recycle bin.
158            *
159            * @param userId the primary key of the user moving the folder
160            * @param folder the folder to be moved
161            * @return the moved folder
162            */
163            public com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
164                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
165                    throws PortalException;
166    
167            /**
168            * @deprecated As of 7.0.0, replaced by {@link
169            #restoreDependentsFromTrash(DLFolder)}
170            */
171            @java.lang.Deprecated
172            public void restoreDependentsFromTrash(
173                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
174                    throws PortalException;
175    
176            /**
177            * @deprecated As of 7.0.0, replaced by {@link
178            #restoreDependentsFromTrash(List)}
179            */
180            @java.lang.Deprecated
181            public void restoreDependentsFromTrash(
182                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
183                    long trashEntryId) throws PortalException;
184    
185            public void restoreDependentsFromTrash(
186                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
187                    throws PortalException;
188    
189            public void restoreFileEntryFromTrash(long userId,
190                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
191                    throws PortalException;
192    
193            public void restoreFileShortcutFromTrash(long userId,
194                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
195                    throws PortalException;
196    
197            public void restoreFolderFromTrash(long userId,
198                    com.liferay.portal.kernel.repository.model.Folder folder)
199                    throws PortalException;
200    
201            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
202                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
203                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
204                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
205                    long[] assetLinkEntryIds) throws PortalException;
206    
207            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
208                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
209                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
210                    long assetClassPk) throws PortalException;
211    
212            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
213                    com.liferay.portal.kernel.repository.model.Folder folder,
214                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
215                    long[] assetLinkEntryIds) throws PortalException;
216    
217            public void updateFileEntry(long userId,
218                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
219                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
220                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
221                    long assetClassPk) throws PortalException;
222    
223            public void updateFileEntry(long userId,
224                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
225                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
226                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
227                    com.liferay.portal.service.ServiceContext serviceContext)
228                    throws PortalException;
229    
230            public void updateFolder(long userId,
231                    com.liferay.portal.kernel.repository.model.Folder folder,
232                    com.liferay.portal.service.ServiceContext serviceContext)
233                    throws PortalException;
234    
235            public void updateStatus(long userId,
236                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
237                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
238                    int oldStatus, int newStatus,
239                    com.liferay.portal.service.ServiceContext serviceContext,
240                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
241                    throws PortalException;
242    }