001
014
015 package com.liferay.portal.kernel.repository;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.lock.Lock;
019 import com.liferay.portal.kernel.repository.model.FileEntry;
020 import com.liferay.portal.kernel.repository.model.FileVersion;
021 import com.liferay.portal.kernel.repository.model.Folder;
022 import com.liferay.portal.kernel.repository.model.RepositoryEntry;
023 import com.liferay.portal.kernel.search.Hits;
024 import com.liferay.portal.kernel.search.Query;
025 import com.liferay.portal.kernel.search.SearchContext;
026 import com.liferay.portal.kernel.search.SearchException;
027 import com.liferay.portal.kernel.util.OrderByComparator;
028 import com.liferay.portal.service.ServiceContext;
029
030 import java.io.File;
031 import java.io.InputStream;
032
033 import java.util.List;
034
035
038 public interface Repository extends DocumentRepository {
039
040
044 @Deprecated
045 public FileEntry addFileEntry(
046 long folderId, String sourceFileName, String mimeType, String title,
047 String description, String changeLog, File file,
048 ServiceContext serviceContext)
049 throws PortalException;
050
051
056 @Deprecated
057 public FileEntry addFileEntry(
058 long folderId, String sourceFileName, String mimeType, String title,
059 String description, String changeLog, InputStream is, long size,
060 ServiceContext serviceContext)
061 throws PortalException;
062
063
067 @Deprecated
068 public Folder addFolder(
069 long parentFolderId, String name, String description,
070 ServiceContext serviceContext)
071 throws PortalException;
072
073
084 public FileVersion cancelCheckOut(long fileEntryId) throws PortalException;
085
086
090 @Deprecated
091 public void checkInFileEntry(
092 long fileEntryId, boolean major, String changeLog,
093 ServiceContext serviceContext)
094 throws PortalException;
095
096
100 @Deprecated
101 public void checkInFileEntry(long fileEntryId, String lockUuid)
102 throws PortalException;
103
104
108 @Deprecated
109 public void checkInFileEntry(
110 long fileEntryId, String lockUuid, ServiceContext serviceContext)
111 throws PortalException;
112
113 public FileEntry checkOutFileEntry(
114 long fileEntryId, ServiceContext serviceContext)
115 throws PortalException;
116
117 public FileEntry checkOutFileEntry(
118 long fileEntryId, String owner, long expirationTime,
119 ServiceContext serviceContext)
120 throws PortalException;
121
122
126 @Deprecated
127 public FileEntry copyFileEntry(
128 long groupId, long fileEntryId, long destFolderId,
129 ServiceContext serviceContext)
130 throws PortalException;
131
132 public void deleteFileEntry(long folderId, String title)
133 throws PortalException;
134
135 public void deleteFileVersion(long fileEntryId, String version)
136 throws PortalException;
137
138 public void deleteFolder(long parentFolderId, String name)
139 throws PortalException;
140
141 public List<FileEntry> getFileEntries(
142 long folderId, long fileEntryTypeId, int start, int end,
143 OrderByComparator<FileEntry> obc)
144 throws PortalException;
145
146 public List<FileEntry> getFileEntries(
147 long folderId, String[] mimeTypes, int start, int end,
148 OrderByComparator<FileEntry> obc)
149 throws PortalException;
150
151 public int getFileEntriesAndFileShortcutsCount(
152 long folderId, int status, String[] mimeTypes)
153 throws PortalException;
154
155 public int getFileEntriesCount(long folderId, long fileEntryTypeId)
156 throws PortalException;
157
158 public int getFileEntriesCount(long folderId, String[] mimeTypes)
159 throws PortalException;
160
161 public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
162 long folderId, int status, boolean includeMountFolders, int start,
163 int end, OrderByComparator<?> obc)
164 throws PortalException;
165
166 public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(
167 long folderId, int status, String[] mimetypes,
168 boolean includeMountFolders, int start, int end,
169 OrderByComparator<?> obc)
170 throws PortalException;
171
172 public int getFoldersAndFileEntriesAndFileShortcutsCount(
173 long folderId, int status, boolean includeMountFolders)
174 throws PortalException;
175
176 public int getFoldersAndFileEntriesAndFileShortcutsCount(
177 long folderId, int status, String[] mimetypes,
178 boolean includeMountFolders)
179 throws PortalException;
180
181 public int getFoldersFileEntriesCount(List<Long> folderIds, int status)
182 throws PortalException;
183
184 public List<Folder> getMountFolders(
185 long parentFolderId, int start, int end,
186 OrderByComparator<Folder> obc)
187 throws PortalException;
188
189 public int getMountFoldersCount(long parentFolderId) throws PortalException;
190
191 public List<FileEntry> getRepositoryFileEntries(
192 long userId, long rootFolderId, String[] mimeTypes, int status,
193 int start, int end, OrderByComparator<FileEntry> obc)
194 throws PortalException;
195
196 public int getRepositoryFileEntriesCount(long userId, long rootFolderId)
197 throws PortalException;
198
199 public int getRepositoryFileEntriesCount(
200 long userId, long rootFolderId, String[] mimeTypes, int status)
201 throws PortalException;
202
203 public void getSubfolderIds(List<Long> folderIds, long folderId)
204 throws PortalException;
205
206 public List<Long> getSubfolderIds(long folderId, boolean recurse)
207 throws PortalException;
208
209 public Lock lockFolder(long folderId) throws PortalException;
210
211 public Lock lockFolder(
212 long folderId, String owner, boolean inheritable,
213 long expirationTime)
214 throws PortalException;
215
216
220 @Deprecated
221 public FileEntry moveFileEntry(
222 long fileEntryId, long newFolderId, ServiceContext serviceContext)
223 throws PortalException;
224
225
229 @Deprecated
230 public Folder moveFolder(
231 long folderId, long newParentFolderId,
232 ServiceContext serviceContext)
233 throws PortalException;
234
235 public Lock refreshFileEntryLock(
236 String lockUuid, long companyId, long expirationTime)
237 throws PortalException;
238
239 public Lock refreshFolderLock(
240 String lockUuid, long companyId, long expirationTime)
241 throws PortalException;
242
243
247 @Deprecated
248 public void revertFileEntry(
249 long fileEntryId, String version, ServiceContext serviceContext)
250 throws PortalException;
251
252 public Hits search(long creatorUserId, int status, int start, int end)
253 throws PortalException;
254
255 public Hits search(
256 long creatorUserId, long folderId, String[] mimeTypes, int status,
257 int start, int end)
258 throws PortalException;
259
260 public Hits search(SearchContext searchContext) throws SearchException;
261
262 public Hits search(SearchContext searchContext, Query query)
263 throws SearchException;
264
265 public void unlockFolder(long folderId, String lockUuid)
266 throws PortalException;
267
268 public void unlockFolder(long parentFolderId, String name, String lockUuid)
269 throws PortalException;
270
271
276 @Deprecated
277 public FileEntry updateFileEntry(
278 long fileEntryId, String sourceFileName, String mimeType,
279 String title, String description, String changeLog,
280 boolean majorVersion, File file, ServiceContext serviceContext)
281 throws PortalException;
282
283
288 @Deprecated
289 public FileEntry updateFileEntry(
290 long fileEntryId, String sourceFileName, String mimeType,
291 String title, String description, String changeLog,
292 boolean majorVersion, InputStream is, long size,
293 ServiceContext serviceContext)
294 throws PortalException;
295
296 public Folder updateFolder(
297 long folderId, String name, String description,
298 ServiceContext serviceContext)
299 throws PortalException;
300
301 public boolean verifyFileEntryCheckOut(long fileEntryId, String lockUuid)
302 throws PortalException;
303
304 public boolean verifyFileEntryLock(long fileEntryId, String lockUuid)
305 throws PortalException;
306
307 public boolean verifyInheritableLock(long folderId, String lockUuid)
308 throws PortalException;
309
310 }