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 AssetEntry updateAsset(long userId, FileEntry fileEntry,
063                    FileVersion fileVersion, long assetClassPk) throws PortalException;
064    
065            public AssetEntry updateAsset(long userId, FileEntry fileEntry,
066                    FileVersion fileVersion, long[] assetCategoryIds,
067                    java.lang.String[] assetTagNames, long[] assetLinkEntryIds)
068                    throws PortalException;
069    
070            public AssetEntry updateAsset(long userId, Folder folder,
071                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
072                    long[] assetLinkEntryIds) throws PortalException;
073    
074            public FileEntry moveFileEntryFromTrash(long userId, FileEntry fileEntry,
075                    long newFolderId, ServiceContext serviceContext)
076                    throws PortalException;
077    
078            /**
079            * Moves the file entry to the recycle bin.
080            *
081            * @param userId the primary key of the user moving the file entry
082            * @param fileEntry the file entry to be moved
083            * @return the moved file entry
084            */
085            public FileEntry moveFileEntryToTrash(long userId, FileEntry fileEntry)
086                    throws PortalException;
087    
088            public FileShortcut moveFileShortcutFromTrash(long userId,
089                    FileShortcut fileShortcut, long newFolderId,
090                    ServiceContext serviceContext) throws PortalException;
091    
092            /**
093            * Moves the file shortcut to the recycle bin.
094            *
095            * @param userId the primary key of the user moving the file shortcut
096            * @param fileShortcut the file shortcut to be moved
097            * @return the moved file shortcut
098            */
099            public FileShortcut moveFileShortcutToTrash(long userId,
100                    FileShortcut fileShortcut) throws PortalException;
101    
102            public Folder moveFolderFromTrash(long userId, Folder folder,
103                    long parentFolderId, ServiceContext serviceContext)
104                    throws PortalException;
105    
106            /**
107            * Moves the folder to the recycle bin.
108            *
109            * @param userId the primary key of the user moving the folder
110            * @param folder the folder to be moved
111            * @return the moved folder
112            */
113            public Folder moveFolderToTrash(long userId, Folder folder)
114                    throws PortalException;
115    
116            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117            public int getFileShortcutsCount(long groupId, long folderId,
118                    boolean active, int status);
119    
120            /**
121            * Returns the OSGi service identifier.
122            *
123            * @return the OSGi service identifier
124            */
125            public java.lang.String getOSGiServiceIdentifier();
126    
127            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128            public List<DLFileShortcut> getFileShortcuts(long groupId, long folderId,
129                    boolean active, int status);
130    
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public List<FileEntry> getNoAssetFileEntries();
133    
134            public void addFolder(long userId, Folder folder,
135                    ServiceContext serviceContext) throws PortalException;
136    
137            public void cancelCheckOut(long userId, FileEntry fileEntry,
138                    FileVersion sourceFileVersion, FileVersion destinationFileVersion,
139                    FileVersion draftFileVersion, ServiceContext serviceContext)
140                    throws PortalException;
141    
142            public void checkAssetEntry(long userId, FileEntry fileEntry,
143                    FileVersion fileVersion) throws PortalException;
144    
145            public void deleteFileEntry(FileEntry fileEntry) throws PortalException;
146    
147            public void deleteFolder(Folder folder) throws PortalException;
148    
149            public void deleteRepositoryFileEntries(long repositoryId)
150                    throws PortalException;
151    
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public void getFileAsStream(long userId, FileEntry fileEntry,
154                    boolean incrementCounter);
155    
156            public void moveDependentsToTrash(DLFolder dlFolder)
157                    throws PortalException;
158    
159            /**
160            * @deprecated As of 7.0.0, replaced by {@link
161            #moveDependentsToTrash(DLFolder)}
162            */
163            @java.lang.Deprecated
164            public void moveDependentsToTrash(
165                    List<java.lang.Object> dlFileEntriesAndDLFolders, long trashEntryId)
166                    throws PortalException;
167    
168            public void restoreDependentsFromTrash(DLFolder dlFolder)
169                    throws PortalException;
170    
171            /**
172            * @deprecated As of 7.0.0, replaced by {@link
173            #restoreDependentsFromTrash(DLFolder)}
174            */
175            @java.lang.Deprecated
176            public void restoreDependentsFromTrash(
177                    List<java.lang.Object> dlFileEntriesAndDLFolders)
178                    throws PortalException;
179    
180            /**
181            * @deprecated As of 7.0.0, replaced by {@link
182            #restoreDependentsFromTrash(List)}
183            */
184            @java.lang.Deprecated
185            public void restoreDependentsFromTrash(
186                    List<java.lang.Object> dlFileEntriesAndDLFolders, long trashEntryId)
187                    throws PortalException;
188    
189            public void restoreFileEntryFromTrash(long userId, FileEntry fileEntry)
190                    throws PortalException;
191    
192            public void restoreFileShortcutFromTrash(long userId,
193                    FileShortcut fileShortcut) throws PortalException;
194    
195            public void restoreFolderFromTrash(long userId, Folder folder)
196                    throws PortalException;
197    
198            public void updateFileEntry(long userId, FileEntry fileEntry,
199                    FileVersion sourceFileVersion, FileVersion destinationFileVersion,
200                    ServiceContext serviceContext) throws PortalException;
201    
202            public void updateFileEntry(long userId, FileEntry fileEntry,
203                    FileVersion sourceFileVersion, FileVersion destinationFileVersion,
204                    long assetClassPk) 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    }