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