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 addFileEntry(long userId,
048                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
049                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
050                    com.liferay.portal.service.ServiceContext serviceContext)
051                    throws com.liferay.portal.kernel.exception.PortalException;
052    
053            public void addFolder(long userId,
054                    com.liferay.portal.kernel.repository.model.Folder folder,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws com.liferay.portal.kernel.exception.PortalException;
057    
058            public void cancelCheckOut(long userId,
059                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
060                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
061                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
062                    com.liferay.portal.kernel.repository.model.FileVersion draftFileVersion,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException;
065    
066            public void checkAssetEntry(long userId,
067                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
068                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
069                    throws com.liferay.portal.kernel.exception.PortalException;
070    
071            public void deleteFileEntry(
072                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
073                    throws com.liferay.portal.kernel.exception.PortalException;
074    
075            public void deleteFolder(
076                    com.liferay.portal.kernel.repository.model.Folder folder)
077                    throws com.liferay.portal.kernel.exception.PortalException;
078    
079            public void deleteRepositoryFileEntries(long repositoryId)
080                    throws com.liferay.portal.kernel.exception.PortalException;
081    
082            /**
083            * Returns the Spring bean ID for this bean.
084            *
085            * @return the Spring bean ID for this bean
086            */
087            public java.lang.String getBeanIdentifier();
088    
089            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
090            public void getFileAsStream(long userId,
091                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
092                    boolean incrementCounter);
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
096                    long groupId, long folderId, boolean active, int status);
097    
098            /**
099            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcuts(long, long,
100            boolean, int)}
101            */
102            @java.lang.Deprecated
103            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts(
105                    long groupId, long folderId, int status);
106    
107            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108            public int getFileShortcutsCount(long groupId, long folderId,
109                    boolean active, int status);
110    
111            /**
112            * @deprecated As of 6.2.0, replaced by {@link #getFileShortcutsCount(long,
113            long, boolean, int)}
114            */
115            @java.lang.Deprecated
116            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117            public int getFileShortcutsCount(long groupId, long folderId, int status);
118    
119            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getNoAssetFileEntries();
121    
122            public void moveDependentsToTrash(
123                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
124                    long trashEntryId)
125                    throws com.liferay.portal.kernel.exception.PortalException;
126    
127            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
128                    long userId,
129                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
130                    long newFolderId,
131                    com.liferay.portal.service.ServiceContext serviceContext)
132                    throws com.liferay.portal.kernel.exception.PortalException;
133    
134            /**
135            * Moves the file entry to the recycle bin.
136            *
137            * @param userId the primary key of the user moving the file entry
138            * @param fileEntry the file entry to be moved
139            * @return the moved file entry
140            * @throws PortalException if a user with the primary key could not be found
141            */
142            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
143                    long userId,
144                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
145                    throws com.liferay.portal.kernel.exception.PortalException;
146    
147            public com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutFromTrash(
148                    long userId,
149                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
150                    long newFolderId,
151                    com.liferay.portal.service.ServiceContext serviceContext)
152                    throws com.liferay.portal.kernel.exception.PortalException;
153    
154            /**
155            * Moves the file shortcut to the recycle bin.
156            *
157            * @param userId the primary key of the user moving the file shortcut
158            * @param dlFileShortcut the file shortcut to be moved
159            * @return the moved file shortcut
160            * @throws PortalException if a user with the primary key could not be found
161            */
162            public com.liferay.portlet.documentlibrary.model.DLFileShortcut moveFileShortcutToTrash(
163                    long userId,
164                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
165                    throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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            * @throws PortalException if a user with the primary key could not be found
180            */
181            public com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
182                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
183                    throws com.liferay.portal.kernel.exception.PortalException;
184    
185            public void restoreDependentsFromTrash(
186                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
187                    throws com.liferay.portal.kernel.exception.PortalException;
188    
189            /**
190            * @deprecated As of 7.0.0, replaced by {@link
191            #restoreDependentsFromTrash(List)}
192            */
193            @java.lang.Deprecated
194            public void restoreDependentsFromTrash(
195                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
196                    long trashEntryId)
197                    throws com.liferay.portal.kernel.exception.PortalException;
198    
199            public void restoreFileEntryFromTrash(long userId,
200                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
201                    throws com.liferay.portal.kernel.exception.PortalException;
202    
203            public void restoreFileShortcutFromTrash(long userId,
204                    com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
205                    throws com.liferay.portal.kernel.exception.PortalException;
206    
207            public void restoreFolderFromTrash(long userId,
208                    com.liferay.portal.kernel.repository.model.Folder folder)
209                    throws com.liferay.portal.kernel.exception.PortalException;
210    
211            /**
212            * Sets the Spring bean ID for this bean.
213            *
214            * @param beanIdentifier the Spring bean ID for this bean
215            */
216            public void setBeanIdentifier(java.lang.String beanIdentifier);
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)
223                    throws com.liferay.portal.kernel.exception.PortalException;
224    
225            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
226                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
227                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
228                    long assetClassPk)
229                    throws com.liferay.portal.kernel.exception.PortalException;
230    
231            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
232                    com.liferay.portal.kernel.repository.model.Folder folder,
233                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
234                    long[] assetLinkEntryIds)
235                    throws com.liferay.portal.kernel.exception.PortalException;
236    
237            public void updateFileEntry(long userId,
238                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
239                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
240                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
241                    long assetClassPk)
242                    throws com.liferay.portal.kernel.exception.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                    com.liferay.portal.service.ServiceContext serviceContext)
249                    throws com.liferay.portal.kernel.exception.PortalException;
250    
251            public void updateFolder(long userId,
252                    com.liferay.portal.kernel.repository.model.Folder folder,
253                    com.liferay.portal.service.ServiceContext serviceContext)
254                    throws com.liferay.portal.kernel.exception.PortalException;
255    
256            public void updateStatus(long userId,
257                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
258                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
259                    int oldStatus, int newStatus,
260                    com.liferay.portal.service.ServiceContext serviceContext,
261                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
262                    throws com.liferay.portal.kernel.exception.PortalException;
263    }