001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
020 import com.liferay.portal.kernel.transaction.Isolation;
021 import com.liferay.portal.kernel.transaction.Propagation;
022 import com.liferay.portal.kernel.transaction.Transactional;
023 import com.liferay.portal.security.ac.AccessControlled;
024 import com.liferay.portal.service.BaseService;
025
026
039 @AccessControlled
040 @JSONWebService
041 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
042 PortalException.class, SystemException.class})
043 public interface DLFileEntryService extends BaseService {
044
049
050
055 public java.lang.String getBeanIdentifier();
056
057
062 public void setBeanIdentifier(java.lang.String beanIdentifier);
063
064 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
065 long groupId, long repositoryId, long folderId,
066 java.lang.String sourceFileName, java.lang.String mimeType,
067 java.lang.String title, java.lang.String description,
068 java.lang.String changeLog, long fileEntryTypeId,
069 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
070 java.io.File file, java.io.InputStream is, long size,
071 com.liferay.portal.service.ServiceContext serviceContext)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException;
074
075 public com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
076 long fileEntryId)
077 throws com.liferay.portal.kernel.exception.PortalException,
078 com.liferay.portal.kernel.exception.SystemException;
079
080 public void checkInFileEntry(long fileEntryId, boolean major,
081 java.lang.String changeLog,
082 com.liferay.portal.service.ServiceContext serviceContext)
083 throws com.liferay.portal.kernel.exception.PortalException,
084 com.liferay.portal.kernel.exception.SystemException;
085
086
090 public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException;
093
094 public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
095 com.liferay.portal.service.ServiceContext serviceContext)
096 throws com.liferay.portal.kernel.exception.PortalException,
097 com.liferay.portal.kernel.exception.SystemException;
098
099
103 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
104 long fileEntryId)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException;
107
108 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
109 long fileEntryId,
110 com.liferay.portal.service.ServiceContext serviceContext)
111 throws com.liferay.portal.kernel.exception.PortalException,
112 com.liferay.portal.kernel.exception.SystemException;
113
114
118 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
119 long fileEntryId, java.lang.String owner, long expirationTime)
120 throws com.liferay.portal.kernel.exception.PortalException,
121 com.liferay.portal.kernel.exception.SystemException;
122
123 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
124 long fileEntryId, java.lang.String owner, long expirationTime,
125 com.liferay.portal.service.ServiceContext serviceContext)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException;
128
129 public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
130 long groupId, long repositoryId, long fileEntryId, long destFolderId,
131 com.liferay.portal.service.ServiceContext serviceContext)
132 throws com.liferay.portal.kernel.exception.PortalException,
133 com.liferay.portal.kernel.exception.SystemException;
134
135 public void deleteFileEntry(long fileEntryId)
136 throws com.liferay.portal.kernel.exception.PortalException,
137 com.liferay.portal.kernel.exception.SystemException;
138
139 public void deleteFileEntry(long groupId, long folderId,
140 java.lang.String title)
141 throws com.liferay.portal.kernel.exception.PortalException,
142 com.liferay.portal.kernel.exception.SystemException;
143
144 public void deleteFileVersion(long fileEntryId, java.lang.String version)
145 throws com.liferay.portal.kernel.exception.PortalException,
146 com.liferay.portal.kernel.exception.SystemException;
147
148 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149 public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
150 long imageId)
151 throws com.liferay.portal.kernel.exception.PortalException,
152 com.liferay.portal.kernel.exception.SystemException;
153
154 public java.io.InputStream getFileAsStream(long fileEntryId,
155 java.lang.String version)
156 throws com.liferay.portal.kernel.exception.PortalException,
157 com.liferay.portal.kernel.exception.SystemException;
158
159 public java.io.InputStream getFileAsStream(long fileEntryId,
160 java.lang.String version, boolean incrementCounter)
161 throws com.liferay.portal.kernel.exception.PortalException,
162 com.liferay.portal.kernel.exception.SystemException;
163
164 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
166 long groupId, long folderId, int status, int start, int end,
167 com.liferay.portal.kernel.util.OrderByComparator obc)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException;
170
171 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
173 long groupId, long folderId, int start, int end,
174 com.liferay.portal.kernel.util.OrderByComparator obc)
175 throws com.liferay.portal.kernel.exception.PortalException,
176 com.liferay.portal.kernel.exception.SystemException;
177
178 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
180 long groupId, long folderId, long fileEntryTypeId, int start, int end,
181 com.liferay.portal.kernel.util.OrderByComparator obc)
182 throws com.liferay.portal.kernel.exception.PortalException,
183 com.liferay.portal.kernel.exception.SystemException;
184
185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
187 long groupId, long folderId, java.lang.String[] mimeTypes, int start,
188 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
189 throws com.liferay.portal.kernel.exception.PortalException,
190 com.liferay.portal.kernel.exception.SystemException;
191
192 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193 public int getFileEntriesCount(long groupId, long folderId)
194 throws com.liferay.portal.kernel.exception.SystemException;
195
196 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197 public int getFileEntriesCount(long groupId, long folderId, int status)
198 throws com.liferay.portal.kernel.exception.SystemException;
199
200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201 public int getFileEntriesCount(long groupId, long folderId,
202 long fileEntryTypeId)
203 throws com.liferay.portal.kernel.exception.SystemException;
204
205 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206 public int getFileEntriesCount(long groupId, long folderId,
207 java.lang.String[] mimeTypes)
208 throws com.liferay.portal.kernel.exception.SystemException;
209
210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
212 long fileEntryId)
213 throws com.liferay.portal.kernel.exception.PortalException,
214 com.liferay.portal.kernel.exception.SystemException;
215
216 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
218 long groupId, long folderId, java.lang.String title)
219 throws com.liferay.portal.kernel.exception.PortalException,
220 com.liferay.portal.kernel.exception.SystemException;
221
222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
224 java.lang.String uuid, long groupId)
225 throws com.liferay.portal.kernel.exception.PortalException,
226 com.liferay.portal.kernel.exception.SystemException;
227
228 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229 public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
230
231 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232 public int getFoldersFileEntriesCount(long groupId,
233 java.util.List<java.lang.Long> folderIds, int status)
234 throws com.liferay.portal.kernel.exception.SystemException;
235
236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
238 long groupId, long userId, long rootFolderId, int start, int end,
239 com.liferay.portal.kernel.util.OrderByComparator obc)
240 throws com.liferay.portal.kernel.exception.PortalException,
241 com.liferay.portal.kernel.exception.SystemException;
242
243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
245 long groupId, long userId, long rootFolderId,
246 java.lang.String[] mimeTypes, int status, int start, int end,
247 com.liferay.portal.kernel.util.OrderByComparator obc)
248 throws com.liferay.portal.kernel.exception.PortalException,
249 com.liferay.portal.kernel.exception.SystemException;
250
251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252 public int getGroupFileEntriesCount(long groupId, long userId,
253 long rootFolderId)
254 throws com.liferay.portal.kernel.exception.PortalException,
255 com.liferay.portal.kernel.exception.SystemException;
256
257 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258 public int getGroupFileEntriesCount(long groupId, long userId,
259 long rootFolderId, java.lang.String[] mimeTypes, int status)
260 throws com.liferay.portal.kernel.exception.PortalException,
261 com.liferay.portal.kernel.exception.SystemException;
262
263 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264 public boolean hasFileEntryLock(long fileEntryId)
265 throws com.liferay.portal.kernel.exception.PortalException,
266 com.liferay.portal.kernel.exception.SystemException;
267
268 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269 public boolean isFileEntryCheckedOut(long fileEntryId)
270 throws com.liferay.portal.kernel.exception.PortalException,
271 com.liferay.portal.kernel.exception.SystemException;
272
273 public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
274 long fileEntryId, long newFolderId,
275 com.liferay.portal.service.ServiceContext serviceContext)
276 throws com.liferay.portal.kernel.exception.PortalException,
277 com.liferay.portal.kernel.exception.SystemException;
278
279 public com.liferay.portal.model.Lock refreshFileEntryLock(
280 java.lang.String lockUuid, long companyId, long expirationTime)
281 throws com.liferay.portal.kernel.exception.PortalException,
282 com.liferay.portal.kernel.exception.SystemException;
283
284 public void revertFileEntry(long fileEntryId, java.lang.String version,
285 com.liferay.portal.service.ServiceContext serviceContext)
286 throws com.liferay.portal.kernel.exception.PortalException,
287 com.liferay.portal.kernel.exception.SystemException;
288
289 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
290 long fileEntryId, java.lang.String sourceFileName,
291 java.lang.String mimeType, java.lang.String title,
292 java.lang.String description, java.lang.String changeLog,
293 boolean majorVersion, long fileEntryTypeId,
294 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
295 java.io.File file, java.io.InputStream is, long size,
296 com.liferay.portal.service.ServiceContext serviceContext)
297 throws com.liferay.portal.kernel.exception.PortalException,
298 com.liferay.portal.kernel.exception.SystemException;
299
300 public boolean verifyFileEntryCheckOut(long fileEntryId,
301 java.lang.String lockUuid)
302 throws com.liferay.portal.kernel.exception.PortalException,
303 com.liferay.portal.kernel.exception.SystemException;
304
305 public boolean verifyFileEntryLock(long fileEntryId,
306 java.lang.String lockUuid)
307 throws com.liferay.portal.kernel.exception.PortalException,
308 com.liferay.portal.kernel.exception.SystemException;
309 }