001
014
015 package com.liferay.portal.kernel.repository;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.repository.model.FileEntry;
019 import com.liferay.portal.kernel.repository.model.FileVersion;
020 import com.liferay.portal.kernel.repository.model.Folder;
021 import com.liferay.portal.kernel.search.Hits;
022 import com.liferay.portal.kernel.search.Query;
023 import com.liferay.portal.kernel.search.SearchContext;
024 import com.liferay.portal.kernel.search.SearchException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.model.Lock;
027 import com.liferay.portal.service.ServiceContext;
028
029 import java.io.File;
030 import java.io.InputStream;
031
032 import java.util.List;
033
034
037 public interface Repository extends DocumentRepository {
038
039
043 @Deprecated
044 public FileEntry addFileEntry(
045 long folderId, String sourceFileName, String mimeType, String title,
046 String description, String changeLog, File file,
047 ServiceContext serviceContext)
048 throws PortalException;
049
050
055 @Deprecated
056 public FileEntry addFileEntry(
057 long folderId, String sourceFileName, String mimeType, String title,
058 String description, String changeLog, InputStream is, long size,
059 ServiceContext serviceContext)
060 throws PortalException;
061
062
066 @Deprecated
067 public Folder addFolder(
068 long parentFolderId, String name, String description,
069 ServiceContext serviceContext)
070 throws PortalException;
071
072 public FileVersion cancelCheckOut(long fileEntryId) throws PortalException;
073
074
078 @Deprecated
079 public void checkInFileEntry(
080 long fileEntryId, boolean major, String changeLog,
081 ServiceContext serviceContext)
082 throws PortalException;
083
084
088 @Deprecated
089 public void checkInFileEntry(long fileEntryId, String lockUuid)
090 throws PortalException;
091
092
096 @Deprecated
097 public void checkInFileEntry(
098 long fileEntryId, String lockUuid, ServiceContext serviceContext)
099 throws PortalException;
100
101 public FileEntry checkOutFileEntry(
102 long fileEntryId, ServiceContext serviceContext)
103 throws PortalException;
104
105 public FileEntry checkOutFileEntry(
106 long fileEntryId, String owner, long expirationTime,
107 ServiceContext serviceContext)
108 throws PortalException;
109
110
114 @Deprecated
115 public FileEntry copyFileEntry(
116 long groupId, long fileEntryId, long destFolderId,
117 ServiceContext serviceContext)
118 throws PortalException;
119
120 public void deleteFileEntry(long folderId, String title)
121 throws PortalException;
122
123 public void deleteFileVersion(long fileEntryId, String version)
124 throws PortalException;
125
126 public void deleteFolder(long parentFolderId, String name)
127 throws PortalException;
128
129 public List<FileEntry> getFileEntries(
130 long folderId, int start, int end, OrderByComparator<FileEntry> obc)
131 throws PortalException;
132
133 public List<FileEntry> getFileEntries(
134 long folderId, long fileEntryTypeId, int start, int end,
135 OrderByComparator<FileEntry> obc)
136 throws PortalException;
137
138 public List<FileEntry> getFileEntries(
139 long folderId, String[] mimeTypes, int start, int end,
140 OrderByComparator<FileEntry> obc)
141 throws PortalException;
142
143 public List<Object> getFileEntriesAndFileShortcuts(
144 long folderId, int status, int start, int end)
145 throws PortalException;
146
147 public int getFileEntriesAndFileShortcutsCount(long folderId, int status)
148 throws PortalException;
149
150 public int getFileEntriesAndFileShortcutsCount(
151 long folderId, int status, String[] mimeTypes)
152 throws PortalException;
153
154 public int getFileEntriesCount(long folderId) throws PortalException;
155
156 public int getFileEntriesCount(long folderId, long fileEntryTypeId)
157 throws PortalException;
158
159 public int getFileEntriesCount(long folderId, String[] mimeTypes)
160 throws PortalException;
161
162 public List<Folder> getFolders(
163 long parentFolderId, boolean includeMountFolders, int start,
164 int end, OrderByComparator<Folder> obc)
165 throws PortalException;
166
167 public List<Folder> getFolders(
168 long parentFolderId, int status, boolean includeMountFolders,
169 int start, int end, OrderByComparator<Folder> obc)
170 throws PortalException;
171
172 public List<Object> getFoldersAndFileEntriesAndFileShortcuts(
173 long folderId, int status, boolean includeMountFolders, int start,
174 int end, OrderByComparator<?> obc)
175 throws PortalException;
176
177 public List<Object> getFoldersAndFileEntriesAndFileShortcuts(
178 long folderId, int status, String[] mimetypes,
179 boolean includeMountFolders, int start, int end,
180 OrderByComparator<?> obc)
181 throws PortalException;
182
183 public int getFoldersAndFileEntriesAndFileShortcutsCount(
184 long folderId, int status, boolean includeMountFolders)
185 throws PortalException;
186
187 public int getFoldersAndFileEntriesAndFileShortcutsCount(
188 long folderId, int status, String[] mimetypes,
189 boolean includeMountFolders)
190 throws PortalException;
191
192 public int getFoldersCount(long parentFolderId, boolean includeMountfolders)
193 throws PortalException;
194
195 public int getFoldersCount(
196 long parentFolderId, int status, boolean includeMountfolders)
197 throws PortalException;
198
199 public int getFoldersFileEntriesCount(List<Long> folderIds, int status)
200 throws PortalException;
201
202 public List<Folder> getMountFolders(
203 long parentFolderId, int start, int end,
204 OrderByComparator<Folder> obc)
205 throws PortalException;
206
207 public int getMountFoldersCount(long parentFolderId) throws PortalException;
208
209 public List<FileEntry> getRepositoryFileEntries(
210 long userId, long rootFolderId, String[] mimeTypes, int status,
211 int start, int end, OrderByComparator<FileEntry> obc)
212 throws PortalException;
213
214 public int getRepositoryFileEntriesCount(long userId, long rootFolderId)
215 throws PortalException;
216
217 public int getRepositoryFileEntriesCount(
218 long userId, long rootFolderId, String[] mimeTypes, int status)
219 throws PortalException;
220
221 public void getSubfolderIds(List<Long> folderIds, long folderId)
222 throws PortalException;
223
224 public List<Long> getSubfolderIds(long folderId, boolean recurse)
225 throws PortalException;
226
227
231 @Deprecated
232 public Lock lockFileEntry(long fileEntryId) throws PortalException;
233
234
238 @Deprecated
239 public Lock lockFileEntry(
240 long fileEntryId, String owner, long expirationTime)
241 throws PortalException;
242
243 public Lock lockFolder(long folderId) throws PortalException;
244
245 public Lock lockFolder(
246 long folderId, String owner, boolean inheritable,
247 long expirationTime)
248 throws PortalException;
249
250
254 @Deprecated
255 public FileEntry moveFileEntry(
256 long fileEntryId, long newFolderId, ServiceContext serviceContext)
257 throws PortalException;
258
259
263 @Deprecated
264 public Folder moveFolder(
265 long folderId, long newParentFolderId,
266 ServiceContext serviceContext)
267 throws PortalException;
268
269 public Lock refreshFileEntryLock(
270 String lockUuid, long companyId, long expirationTime)
271 throws PortalException;
272
273 public Lock refreshFolderLock(
274 String lockUuid, long companyId, long expirationTime)
275 throws PortalException;
276
277
281 @Deprecated
282 public void revertFileEntry(
283 long fileEntryId, String version, ServiceContext serviceContext)
284 throws PortalException;
285
286 public Hits search(long creatorUserId, int status, int start, int end)
287 throws PortalException;
288
289 public Hits search(
290 long creatorUserId, long folderId, String[] mimeTypes, int status,
291 int start, int end)
292 throws PortalException;
293
294 public Hits search(SearchContext searchContext) throws SearchException;
295
296 public Hits search(SearchContext searchContext, Query query)
297 throws SearchException;
298
299 public void unlockFolder(long folderId, String lockUuid)
300 throws PortalException;
301
302 public void unlockFolder(long parentFolderId, String name, String lockUuid)
303 throws PortalException;
304
305
310 @Deprecated
311 public FileEntry updateFileEntry(
312 long fileEntryId, String sourceFileName, String mimeType,
313 String title, String description, String changeLog,
314 boolean majorVersion, File file, ServiceContext serviceContext)
315 throws PortalException;
316
317
322 @Deprecated
323 public FileEntry updateFileEntry(
324 long fileEntryId, String sourceFileName, String mimeType,
325 String title, String description, String changeLog,
326 boolean majorVersion, InputStream is, long size,
327 ServiceContext serviceContext)
328 throws PortalException;
329
330 public Folder updateFolder(
331 long folderId, String name, String description,
332 ServiceContext serviceContext)
333 throws PortalException;
334
335 public boolean verifyFileEntryCheckOut(long fileEntryId, String lockUuid)
336 throws PortalException;
337
338 public boolean verifyFileEntryLock(long fileEntryId, String lockUuid)
339 throws PortalException;
340
341 public boolean verifyInheritableLock(long folderId, String lockUuid)
342 throws PortalException;
343
344 }