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
024
037 @JSONWebService
038 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
039 PortalException.class, SystemException.class})
040 public interface DLFileEntryService {
041
046 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
047 long groupId, long repositoryId, long folderId,
048 java.lang.String sourceFileName, java.lang.String mimeType,
049 java.lang.String title, java.lang.String description,
050 java.lang.String changeLog, long fileEntryTypeId,
051 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
052 java.io.File file, java.io.InputStream is, long size,
053 com.liferay.portal.service.ServiceContext serviceContext)
054 throws com.liferay.portal.kernel.exception.PortalException,
055 com.liferay.portal.kernel.exception.SystemException;
056
057 public void cancelCheckOut(long fileEntryId)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException;
060
061 public void checkInFileEntry(long fileEntryId, boolean major,
062 java.lang.String changeLog,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException;
066
067 public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException;
070
071
074 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
075 long fileEntryId)
076 throws com.liferay.portal.kernel.exception.PortalException,
077 com.liferay.portal.kernel.exception.SystemException;
078
079 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
080 long fileEntryId,
081 com.liferay.portal.service.ServiceContext serviceContext)
082 throws com.liferay.portal.kernel.exception.PortalException,
083 com.liferay.portal.kernel.exception.SystemException;
084
085
089 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
090 long fileEntryId, java.lang.String owner, long expirationTime)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException;
093
094 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
095 long fileEntryId, java.lang.String owner, long expirationTime,
096 com.liferay.portal.service.ServiceContext serviceContext)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException;
099
100 public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
101 long groupId, long repositoryId, long fileEntryId, long destFolderId,
102 com.liferay.portal.service.ServiceContext serviceContext)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException;
105
106 public void deleteFileEntry(long fileEntryId)
107 throws com.liferay.portal.kernel.exception.PortalException,
108 com.liferay.portal.kernel.exception.SystemException;
109
110 public void deleteFileEntry(long groupId, long folderId,
111 java.lang.String title)
112 throws com.liferay.portal.kernel.exception.PortalException,
113 com.liferay.portal.kernel.exception.SystemException;
114
115 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116 public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
117 long imageId)
118 throws com.liferay.portal.kernel.exception.PortalException,
119 com.liferay.portal.kernel.exception.SystemException;
120
121 public java.io.InputStream getFileAsStream(long fileEntryId,
122 java.lang.String version)
123 throws com.liferay.portal.kernel.exception.PortalException,
124 com.liferay.portal.kernel.exception.SystemException;
125
126 public java.io.InputStream getFileAsStream(long fileEntryId,
127 java.lang.String version, boolean incrementCounter)
128 throws com.liferay.portal.kernel.exception.PortalException,
129 com.liferay.portal.kernel.exception.SystemException;
130
131 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
133 long groupId, long folderId, int start, int end,
134 com.liferay.portal.kernel.util.OrderByComparator obc)
135 throws com.liferay.portal.kernel.exception.SystemException;
136
137 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
139 long groupId, long folderId, long fileEntryTypeId, int start, int end,
140 com.liferay.portal.kernel.util.OrderByComparator obc)
141 throws com.liferay.portal.kernel.exception.SystemException;
142
143 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
145 long groupId, long folderId, java.lang.String[] mimeTypes, int start,
146 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
147 throws com.liferay.portal.kernel.exception.SystemException;
148
149 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150 public int getFileEntriesCount(long groupId, long folderId)
151 throws com.liferay.portal.kernel.exception.SystemException;
152
153 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154 public int getFileEntriesCount(long groupId, long folderId,
155 long fileEntryTypeId)
156 throws com.liferay.portal.kernel.exception.SystemException;
157
158 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159 public int getFileEntriesCount(long groupId, long folderId,
160 java.lang.String[] mimeTypes)
161 throws com.liferay.portal.kernel.exception.SystemException;
162
163 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
165 long fileEntryId)
166 throws com.liferay.portal.kernel.exception.PortalException,
167 com.liferay.portal.kernel.exception.SystemException;
168
169 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
171 long groupId, long folderId, java.lang.String title)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException;
174
175 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
177 java.lang.String uuid, long groupId)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException;
180
181 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182 public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
183
184 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185 public int getFoldersFileEntriesCount(long groupId,
186 java.util.List<java.lang.Long> folderIds, int status)
187 throws com.liferay.portal.kernel.exception.SystemException;
188
189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
191 long groupId, long userId, long rootFolderId, int start, int end,
192 com.liferay.portal.kernel.util.OrderByComparator obc)
193 throws com.liferay.portal.kernel.exception.SystemException;
194
195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
197 long groupId, long userId, long rootFolderId,
198 java.lang.String[] mimeTypes, int status, int start, int end,
199 com.liferay.portal.kernel.util.OrderByComparator obc)
200 throws com.liferay.portal.kernel.exception.SystemException;
201
202 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203 public int getGroupFileEntriesCount(long groupId, long userId,
204 long rootFolderId)
205 throws com.liferay.portal.kernel.exception.SystemException;
206
207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208 public int getGroupFileEntriesCount(long groupId, long userId,
209 long rootFolderId, java.lang.String[] mimeTypes, int status)
210 throws com.liferay.portal.kernel.exception.SystemException;
211
212 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213 public boolean hasFileEntryLock(long fileEntryId)
214 throws com.liferay.portal.kernel.exception.PortalException,
215 com.liferay.portal.kernel.exception.SystemException;
216
217 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218 public boolean isFileEntryCheckedOut(long fileEntryId)
219 throws com.liferay.portal.kernel.exception.PortalException,
220 com.liferay.portal.kernel.exception.SystemException;
221
222 public com.liferay.portal.model.Lock lockFileEntry(long fileEntryId)
223 throws com.liferay.portal.kernel.exception.PortalException,
224 com.liferay.portal.kernel.exception.SystemException;
225
226 public com.liferay.portal.model.Lock lockFileEntry(long fileEntryId,
227 java.lang.String owner, long expirationTime)
228 throws com.liferay.portal.kernel.exception.PortalException,
229 com.liferay.portal.kernel.exception.SystemException;
230
231 public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
232 long fileEntryId, long newFolderId,
233 com.liferay.portal.service.ServiceContext serviceContext)
234 throws com.liferay.portal.kernel.exception.PortalException,
235 com.liferay.portal.kernel.exception.SystemException;
236
237 public com.liferay.portal.model.Lock refreshFileEntryLock(
238 java.lang.String lockUuid, long expirationTime)
239 throws com.liferay.portal.kernel.exception.PortalException,
240 com.liferay.portal.kernel.exception.SystemException;
241
242 public void revertFileEntry(long fileEntryId, java.lang.String version,
243 com.liferay.portal.service.ServiceContext serviceContext)
244 throws com.liferay.portal.kernel.exception.PortalException,
245 com.liferay.portal.kernel.exception.SystemException;
246
247 public void unlockFileEntry(long fileEntryId)
248 throws com.liferay.portal.kernel.exception.PortalException,
249 com.liferay.portal.kernel.exception.SystemException;
250
251 public void unlockFileEntry(long fileEntryId, java.lang.String lockUuid)
252 throws com.liferay.portal.kernel.exception.PortalException,
253 com.liferay.portal.kernel.exception.SystemException;
254
255 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
256 long fileEntryId, java.lang.String sourceFileName,
257 java.lang.String mimeType, java.lang.String title,
258 java.lang.String description, java.lang.String changeLog,
259 boolean majorVersion, long fileEntryTypeId,
260 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
261 java.io.File file, java.io.InputStream is, long size,
262 com.liferay.portal.service.ServiceContext serviceContext)
263 throws com.liferay.portal.kernel.exception.PortalException,
264 com.liferay.portal.kernel.exception.SystemException;
265
266 public boolean verifyFileEntryCheckOut(long fileEntryId,
267 java.lang.String lockUuid)
268 throws com.liferay.portal.kernel.exception.PortalException,
269 com.liferay.portal.kernel.exception.SystemException;
270
271 public boolean verifyFileEntryLock(long fileEntryId,
272 java.lang.String lockUuid)
273 throws com.liferay.portal.kernel.exception.PortalException,
274 com.liferay.portal.kernel.exception.SystemException;
275 }