001
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
053 @ProviderType
054 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
055 PortalException.class, SystemException.class})
056 public interface DLAppHelperLocalService extends BaseLocalService {
057
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
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
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
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
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
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
175 @java.lang.Deprecated
176 public void restoreDependentsFromTrash(
177 List<java.lang.Object> dlFileEntriesAndDLFolders)
178 throws PortalException;
179
180
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 }