001
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
052 @ProviderType
053 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
054 PortalException.class, SystemException.class})
055 public interface DLAppHelperLocalService extends BaseLocalService {
056
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
099 public java.lang.String getOSGiServiceIdentifier();
100
101
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
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
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
152 public Folder moveFolderToTrash(long userId, Folder folder)
153 throws PortalException;
154
155
159 @java.lang.Deprecated
160 public void restoreDependentsFromTrash(
161 List<java.lang.Object> dlFileEntriesAndDLFolders)
162 throws PortalException;
163
164
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 }