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            /**
077            * Returns the Spring bean ID for this bean.
078            *
079            * @return the Spring bean ID for this bean
080            */
081            public java.lang.String getBeanIdentifier();
082    
083            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
084            public void getFileAsStream(long userId,
085                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
086                    boolean incrementCounter);
087    
088            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
089            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
090                    long groupId, long folderId, boolean active, int status);
091    
092            /**
093            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcuts(long, long,
094            boolean, int)}
095            */
096            @java.lang.Deprecated
097            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
098            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
099                    long groupId, long folderId, int status);
100    
101            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102            public int getFileShortcutsCount(long groupId, long folderId,
103                    boolean active, int status);
104    
105            /**
106            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcutsCount(long,
107            long, boolean, int)}
108            */
109            @java.lang.Deprecated
110            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111            public int getFileShortcutsCount(long groupId, long folderId, int status);
112    
113            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries();
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            * @throws PortalException if a user with the primary key could not be found
143            */
144            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
145                    long userId,
146                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
147                    throws PortalException;
148    
149            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
150                    long userId,
151                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
152                    long newFolderId,
153                    com.liferay.portal.service.ServiceContext serviceContext)
154                    throws PortalException;
155    
156            /**
157            * Moves the file shortcut to the recycle bin.
158            *
159            * @param userId the primary key of the user moving the file shortcut
160            * @param fileShortcut the file shortcut to be moved
161            * @return the moved file shortcut
162            * @throws PortalException if a user with the primary key could not be found
163            */
164            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
165                    long userId,
166                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
167                    throws PortalException;
168    
169            public com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
170                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
171                    long parentFolderId,
172                    com.liferay.portal.service.ServiceContext serviceContext)
173                    throws PortalException;
174    
175            /**
176            * Moves the folder to the recycle bin.
177            *
178            * @param userId the primary key of the user moving the folder
179            * @param folder the folder to be moved
180            * @return the moved folder
181            * @throws PortalException if a user with the primary key could not be found
182            */
183            public com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
184                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
185                    throws PortalException;
186    
187            /**
188            * @deprecated As of 7.0.0, replaced by {@link
189            #restoreDependentsFromTrash(DLFolder)}
190            */
191            @java.lang.Deprecated
192            public void restoreDependentsFromTrash(
193                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
194                    throws PortalException;
195    
196            /**
197            * @deprecated As of 7.0.0, replaced by {@link
198            #restoreDependentsFromTrash(List)}
199            */
200            @java.lang.Deprecated
201            public void restoreDependentsFromTrash(
202                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
203                    long trashEntryId) throws PortalException;
204    
205            public void restoreDependentsFromTrash(
206                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
207                    throws PortalException;
208    
209            public void restoreFileEntryFromTrash(long userId,
210                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
211                    throws PortalException;
212    
213            public void restoreFileShortcutFromTrash(long userId,
214                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
215                    throws PortalException;
216    
217            public void restoreFolderFromTrash(long userId,
218                    com.liferay.portal.kernel.repository.model.Folder folder)
219                    throws PortalException;
220    
221            /**
222            * Sets the Spring bean ID for this bean.
223            *
224            * @param beanIdentifier the Spring bean ID for this bean
225            */
226            public void setBeanIdentifier(java.lang.String beanIdentifier);
227    
228            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
229                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
230                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
231                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
232                    long[] assetLinkEntryIds) throws PortalException;
233    
234            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
235                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
236                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
237                    long assetClassPk) throws PortalException;
238    
239            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
240                    com.liferay.portal.kernel.repository.model.Folder folder,
241                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
242                    long[] assetLinkEntryIds) throws PortalException;
243    
244            public void updateFileEntry(long userId,
245                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
246                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
247                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
248                    long assetClassPk) throws PortalException;
249    
250            public void updateFileEntry(long userId,
251                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
252                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
253                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
254                    com.liferay.portal.service.ServiceContext serviceContext)
255                    throws PortalException;
256    
257            public void updateFolder(long userId,
258                    com.liferay.portal.kernel.repository.model.Folder folder,
259                    com.liferay.portal.service.ServiceContext serviceContext)
260                    throws PortalException;
261    
262            public void updateStatus(long userId,
263                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
264                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
265                    int oldStatus, int newStatus,
266                    com.liferay.portal.service.ServiceContext serviceContext,
267                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
268                    throws PortalException;
269    }