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