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            /**
086            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcuts(long, long,
087            boolean, int)}
088            */
089            @java.lang.Deprecated
090            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
091            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
092                    long groupId, long folderId, int status);
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public int getFileShortcutsCount(long groupId, long folderId,
096                    boolean active, int status);
097    
098            /**
099            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcutsCount(long,
100            long, boolean, int)}
101            */
102            @java.lang.Deprecated
103            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104            public int getFileShortcutsCount(long groupId, long folderId, int status);
105    
106            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries();
108    
109            /**
110            * Returns the OSGi service identifier.
111            *
112            * @return the OSGi service identifier
113            */
114            public java.lang.String getOSGiServiceIdentifier();
115    
116            /**
117            * @deprecated As of 7.0.0, replaced by {@link
118            #moveDependentsToTrash(DLFolder)}
119            */
120            @java.lang.Deprecated
121            public void moveDependentsToTrash(
122                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
123                    long trashEntryId) throws PortalException;
124    
125            public void moveDependentsToTrash(
126                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
127                    throws PortalException;
128    
129            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
130                    long userId,
131                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
132                    long newFolderId,
133                    com.liferay.portal.service.ServiceContext serviceContext)
134                    throws PortalException;
135    
136            /**
137            * Moves the file entry to the recycle bin.
138            *
139            * @param userId the primary key of the user moving the file entry
140            * @param fileEntry the file entry to be moved
141            * @return the moved file entry
142            */
143            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
144                    long userId,
145                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
146                    throws PortalException;
147    
148            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
149                    long userId,
150                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
151                    long newFolderId,
152                    com.liferay.portal.service.ServiceContext serviceContext)
153                    throws PortalException;
154    
155            /**
156            * Moves the file shortcut to the recycle bin.
157            *
158            * @param userId the primary key of the user moving the file shortcut
159            * @param fileShortcut the file shortcut to be moved
160            * @return the moved file shortcut
161            */
162            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
163                    long userId,
164                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
165                    throws PortalException;
166    
167            public com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
168                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
169                    long parentFolderId,
170                    com.liferay.portal.service.ServiceContext serviceContext)
171                    throws PortalException;
172    
173            /**
174            * Moves the folder to the recycle bin.
175            *
176            * @param userId the primary key of the user moving the folder
177            * @param folder the folder to be moved
178            * @return the moved folder
179            */
180            public com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
181                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
182                    throws PortalException;
183    
184            /**
185            * @deprecated As of 7.0.0, replaced by {@link
186            #restoreDependentsFromTrash(DLFolder)}
187            */
188            @java.lang.Deprecated
189            public void restoreDependentsFromTrash(
190                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
191                    throws PortalException;
192    
193            /**
194            * @deprecated As of 7.0.0, replaced by {@link
195            #restoreDependentsFromTrash(List)}
196            */
197            @java.lang.Deprecated
198            public void restoreDependentsFromTrash(
199                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
200                    long trashEntryId) throws PortalException;
201    
202            public void restoreDependentsFromTrash(
203                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
204                    throws PortalException;
205    
206            public void restoreFileEntryFromTrash(long userId,
207                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
208                    throws PortalException;
209    
210            public void restoreFileShortcutFromTrash(long userId,
211                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
212                    throws PortalException;
213    
214            public void restoreFolderFromTrash(long userId,
215                    com.liferay.portal.kernel.repository.model.Folder folder)
216                    throws PortalException;
217    
218            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
219                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
220                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
221                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
222                    long[] assetLinkEntryIds) throws PortalException;
223    
224            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
225                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
226                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
227                    long assetClassPk) throws PortalException;
228    
229            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
230                    com.liferay.portal.kernel.repository.model.Folder folder,
231                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
232                    long[] assetLinkEntryIds) throws PortalException;
233    
234            public void updateFileEntry(long userId,
235                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
236                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
237                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
238                    long assetClassPk) throws PortalException;
239    
240            public void updateFileEntry(long userId,
241                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
242                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
243                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
244                    com.liferay.portal.service.ServiceContext serviceContext)
245                    throws PortalException;
246    
247            public void updateFolder(long userId,
248                    com.liferay.portal.kernel.repository.model.Folder folder,
249                    com.liferay.portal.service.ServiceContext serviceContext)
250                    throws PortalException;
251    
252            public void updateStatus(long userId,
253                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
254                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
255                    int oldStatus, int newStatus,
256                    com.liferay.portal.service.ServiceContext serviceContext,
257                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
258                    throws PortalException;
259    }