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 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
072 long fileEntryId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException;
075
076 public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
077 long fileEntryId, java.lang.String owner, long expirationTime)
078 throws com.liferay.portal.kernel.exception.PortalException,
079 com.liferay.portal.kernel.exception.SystemException;
080
081 public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
082 long groupId, long repositoryId, long fileEntryId, long destFolderId,
083 com.liferay.portal.service.ServiceContext serviceContext)
084 throws com.liferay.portal.kernel.exception.PortalException,
085 com.liferay.portal.kernel.exception.SystemException;
086
087 public void deleteFileEntry(long fileEntryId)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException;
090
091 public void deleteFileEntry(long groupId, long folderId,
092 java.lang.String title)
093 throws com.liferay.portal.kernel.exception.PortalException,
094 com.liferay.portal.kernel.exception.SystemException;
095
096 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
097 public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
098 long imageId)
099 throws com.liferay.portal.kernel.exception.PortalException,
100 com.liferay.portal.kernel.exception.SystemException;
101
102 public java.io.InputStream getFileAsStream(long fileEntryId,
103 java.lang.String version)
104 throws com.liferay.portal.kernel.exception.PortalException,
105 com.liferay.portal.kernel.exception.SystemException;
106
107 public java.io.InputStream getFileAsStream(long fileEntryId,
108 java.lang.String version, boolean incrementCounter)
109 throws com.liferay.portal.kernel.exception.PortalException,
110 com.liferay.portal.kernel.exception.SystemException;
111
112 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
114 long groupId, long folderId, int start, int end,
115 com.liferay.portal.kernel.util.OrderByComparator obc)
116 throws com.liferay.portal.kernel.exception.SystemException;
117
118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
120 long groupId, long folderId, long fileEntryTypeId, int start, int end,
121 com.liferay.portal.kernel.util.OrderByComparator obc)
122 throws com.liferay.portal.kernel.exception.SystemException;
123
124 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
126 long groupId, long folderId, java.lang.String[] mimeTypes, int start,
127 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
128 throws com.liferay.portal.kernel.exception.SystemException;
129
130 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131 public int getFileEntriesCount(long groupId, long folderId)
132 throws com.liferay.portal.kernel.exception.SystemException;
133
134 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135 public int getFileEntriesCount(long groupId, long folderId,
136 long fileEntryTypeId)
137 throws com.liferay.portal.kernel.exception.SystemException;
138
139 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140 public int getFileEntriesCount(long groupId, long folderId,
141 java.lang.String[] mimeTypes)
142 throws com.liferay.portal.kernel.exception.SystemException;
143
144 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
146 long fileEntryId)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException;
149
150 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
151 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
152 long groupId, long folderId, java.lang.String title)
153 throws com.liferay.portal.kernel.exception.PortalException,
154 com.liferay.portal.kernel.exception.SystemException;
155
156 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
158 java.lang.String uuid, long groupId)
159 throws com.liferay.portal.kernel.exception.PortalException,
160 com.liferay.portal.kernel.exception.SystemException;
161
162 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163 public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
164
165 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166 public int getFoldersFileEntriesCount(long groupId,
167 java.util.List<java.lang.Long> folderIds, int status)
168 throws com.liferay.portal.kernel.exception.SystemException;
169
170 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
172 long groupId, long userId, long rootFolderId, int start, int end,
173 com.liferay.portal.kernel.util.OrderByComparator obc)
174 throws com.liferay.portal.kernel.exception.SystemException;
175
176 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
178 long groupId, long userId, long rootFolderId,
179 java.lang.String[] mimeTypes, int status, int start, int end,
180 com.liferay.portal.kernel.util.OrderByComparator obc)
181 throws com.liferay.portal.kernel.exception.SystemException;
182
183 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184 public int getGroupFileEntriesCount(long groupId, long userId,
185 long rootFolderId)
186 throws com.liferay.portal.kernel.exception.SystemException;
187
188 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189 public int getGroupFileEntriesCount(long groupId, long userId,
190 long rootFolderId, java.lang.String[] mimeTypes, int status)
191 throws com.liferay.portal.kernel.exception.SystemException;
192
193 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194 public boolean hasFileEntryLock(long fileEntryId)
195 throws com.liferay.portal.kernel.exception.PortalException,
196 com.liferay.portal.kernel.exception.SystemException;
197
198 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199 public boolean isFileEntryCheckedOut(long fileEntryId)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException;
202
203 public com.liferay.portal.model.Lock lockFileEntry(long fileEntryId)
204 throws com.liferay.portal.kernel.exception.PortalException,
205 com.liferay.portal.kernel.exception.SystemException;
206
207 public com.liferay.portal.model.Lock lockFileEntry(long fileEntryId,
208 java.lang.String owner, long expirationTime)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException;
211
212 public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
213 long fileEntryId, long newFolderId,
214 com.liferay.portal.service.ServiceContext serviceContext)
215 throws com.liferay.portal.kernel.exception.PortalException,
216 com.liferay.portal.kernel.exception.SystemException;
217
218 public com.liferay.portal.model.Lock refreshFileEntryLock(
219 java.lang.String lockUuid, long expirationTime)
220 throws com.liferay.portal.kernel.exception.PortalException,
221 com.liferay.portal.kernel.exception.SystemException;
222
223 public void revertFileEntry(long fileEntryId, java.lang.String version,
224 com.liferay.portal.service.ServiceContext serviceContext)
225 throws com.liferay.portal.kernel.exception.PortalException,
226 com.liferay.portal.kernel.exception.SystemException;
227
228 public void unlockFileEntry(long fileEntryId)
229 throws com.liferay.portal.kernel.exception.PortalException,
230 com.liferay.portal.kernel.exception.SystemException;
231
232 public void unlockFileEntry(long fileEntryId, java.lang.String lockUuid)
233 throws com.liferay.portal.kernel.exception.PortalException,
234 com.liferay.portal.kernel.exception.SystemException;
235
236 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
237 long fileEntryId, java.lang.String sourceFileName,
238 java.lang.String mimeType, java.lang.String title,
239 java.lang.String description, java.lang.String changeLog,
240 boolean majorVersion, long fileEntryTypeId,
241 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
242 java.io.File file, java.io.InputStream is, long size,
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 boolean verifyFileEntryCheckOut(long fileEntryId,
248 java.lang.String lockUuid)
249 throws com.liferay.portal.kernel.exception.PortalException,
250 com.liferay.portal.kernel.exception.SystemException;
251
252 public boolean verifyFileEntryLock(long fileEntryId,
253 java.lang.String lockUuid)
254 throws com.liferay.portal.kernel.exception.PortalException,
255 com.liferay.portal.kernel.exception.SystemException;
256 }