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            public void moveDependentsToTrash(
117                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
118                    long trashEntryId) throws PortalException;
119    
120            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryFromTrash(
121                    long userId,
122                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
123                    long newFolderId,
124                    com.liferay.portal.service.ServiceContext serviceContext)
125                    throws PortalException;
126    
127            /**
128            * Moves the file entry to the recycle bin.
129            *
130            * @param userId the primary key of the user moving the file entry
131            * @param fileEntry the file entry to be moved
132            * @return the moved file entry
133            * @throws PortalException if a user with the primary key could not be found
134            */
135            public com.liferay.portal.kernel.repository.model.FileEntry moveFileEntryToTrash(
136                    long userId,
137                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
138                    throws PortalException;
139    
140            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutFromTrash(
141                    long userId,
142                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut,
143                    long newFolderId,
144                    com.liferay.portal.service.ServiceContext serviceContext)
145                    throws PortalException;
146    
147            /**
148            * Moves the file shortcut to the recycle bin.
149            *
150            * @param userId the primary key of the user moving the file shortcut
151            * @param fileShortcut the file shortcut to be moved
152            * @return the moved file shortcut
153            * @throws PortalException if a user with the primary key could not be found
154            */
155            public com.liferay.portal.kernel.repository.model.FileShortcut moveFileShortcutToTrash(
156                    long userId,
157                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
158                    throws PortalException;
159    
160            public com.liferay.portal.kernel.repository.model.Folder moveFolderFromTrash(
161                    long userId, com.liferay.portal.kernel.repository.model.Folder folder,
162                    long parentFolderId,
163                    com.liferay.portal.service.ServiceContext serviceContext)
164                    throws PortalException;
165    
166            /**
167            * Moves the folder to the recycle bin.
168            *
169            * @param userId the primary key of the user moving the folder
170            * @param folder the folder to be moved
171            * @return the moved folder
172            * @throws PortalException if a user with the primary key could not be found
173            */
174            public com.liferay.portal.kernel.repository.model.Folder moveFolderToTrash(
175                    long userId, com.liferay.portal.kernel.repository.model.Folder folder)
176                    throws PortalException;
177    
178            public void restoreDependentsFromTrash(
179                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders)
180                    throws PortalException;
181    
182            /**
183            * @deprecated As of 7.0.0, replaced by {@link
184            #restoreDependentsFromTrash(List)}
185            */
186            @java.lang.Deprecated
187            public void restoreDependentsFromTrash(
188                    java.util.List<java.lang.Object> dlFileEntriesAndDLFolders,
189                    long trashEntryId) throws PortalException;
190    
191            public void restoreFileEntryFromTrash(long userId,
192                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
193                    throws PortalException;
194    
195            public void restoreFileShortcutFromTrash(long userId,
196                    com.liferay.portal.kernel.repository.model.FileShortcut fileShortcut)
197                    throws PortalException;
198    
199            public void restoreFolderFromTrash(long userId,
200                    com.liferay.portal.kernel.repository.model.Folder folder)
201                    throws PortalException;
202    
203            /**
204            * Sets the Spring bean ID for this bean.
205            *
206            * @param beanIdentifier the Spring bean ID for this bean
207            */
208            public void setBeanIdentifier(java.lang.String beanIdentifier);
209    
210            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
211                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
212                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
213                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
214                    long[] assetLinkEntryIds) throws PortalException;
215    
216            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
217                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
218                    com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
219                    long assetClassPk) throws PortalException;
220    
221            public com.liferay.portlet.asset.model.AssetEntry updateAsset(long userId,
222                    com.liferay.portal.kernel.repository.model.Folder folder,
223                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
224                    long[] assetLinkEntryIds) throws PortalException;
225    
226            public void updateFileEntry(long userId,
227                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
228                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
229                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
230                    long assetClassPk) throws PortalException;
231    
232            public void updateFileEntry(long userId,
233                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
234                    com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
235                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion,
236                    com.liferay.portal.service.ServiceContext serviceContext)
237                    throws PortalException;
238    
239            public void updateFolder(long userId,
240                    com.liferay.portal.kernel.repository.model.Folder folder,
241                    com.liferay.portal.service.ServiceContext serviceContext)
242                    throws PortalException;
243    
244            public void updateStatus(long userId,
245                    com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
246                    com.liferay.portal.kernel.repository.model.FileVersion latestFileVersion,
247                    int oldStatus, int newStatus,
248                    com.liferay.portal.service.ServiceContext serviceContext,
249                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
250                    throws PortalException;
251    }