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 folderId, java.lang.String name,
048 java.lang.String title, java.lang.String description,
049 java.lang.String changeLog, java.lang.String extraSettings,
050 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
051 throws com.liferay.portal.kernel.exception.PortalException,
052 com.liferay.portal.kernel.exception.SystemException;
053
054 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
055 long groupId, long folderId, java.lang.String name,
056 java.lang.String title, java.lang.String description,
057 java.lang.String changeLog, java.lang.String extraSettings,
058 java.io.File file,
059 com.liferay.portal.service.ServiceContext serviceContext)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException;
062
063 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
064 long groupId, long folderId, java.lang.String name,
065 java.lang.String title, java.lang.String description,
066 java.lang.String changeLog, java.lang.String extraSettings,
067 java.io.InputStream is, long size,
068 com.liferay.portal.service.ServiceContext serviceContext)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException;
071
072 public void deleteFileEntry(long fileEntryId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException;
075
076 public void deleteFileEntry(long groupId, long folderId,
077 java.lang.String name)
078 throws com.liferay.portal.kernel.exception.PortalException,
079 com.liferay.portal.kernel.exception.SystemException;
080
081 public void deleteFileEntry(long groupId, long folderId,
082 java.lang.String name, java.lang.String version)
083 throws com.liferay.portal.kernel.exception.PortalException,
084 com.liferay.portal.kernel.exception.SystemException;
085
086 public void deleteFileEntryByTitle(long groupId, long folderId,
087 java.lang.String titleWithExtension)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException;
090
091 public java.io.InputStream getFileAsStream(long fileEntryId,
092 java.lang.String version)
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 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
098 long groupId, long folderId)
099 throws com.liferay.portal.kernel.exception.PortalException,
100 com.liferay.portal.kernel.exception.SystemException;
101
102 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
104 long groupId, long folderId, int start, int end)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException;
107
108 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
110 long groupId, long folderId, int start, int end,
111 com.liferay.portal.kernel.util.OrderByComparator obc)
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 int getFileEntriesCount(long groupId, long folderId)
117 throws com.liferay.portal.kernel.exception.PortalException,
118 com.liferay.portal.kernel.exception.SystemException;
119
120 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
122 long fileEntryId)
123 throws com.liferay.portal.kernel.exception.PortalException,
124 com.liferay.portal.kernel.exception.SystemException;
125
126 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
128 long groupId, long folderId, java.lang.String name)
129 throws com.liferay.portal.kernel.exception.PortalException,
130 com.liferay.portal.kernel.exception.SystemException;
131
132 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
134 long groupId, long folderId, java.lang.String titleWithExtension)
135 throws com.liferay.portal.kernel.exception.PortalException,
136 com.liferay.portal.kernel.exception.SystemException;
137
138 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
140 java.lang.String uuid, long groupId)
141 throws com.liferay.portal.kernel.exception.PortalException,
142 com.liferay.portal.kernel.exception.SystemException;
143
144 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145 public com.liferay.portal.model.Lock getFileEntryLock(long groupId,
146 long folderId, java.lang.String name)
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 int getFoldersFileEntriesCount(long groupId,
152 java.util.List<java.lang.Long> folderIds, int status)
153 throws com.liferay.portal.kernel.exception.SystemException;
154
155 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
157 long groupId, long userId, int start, int end)
158 throws com.liferay.portal.kernel.exception.SystemException;
159
160 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
162 long groupId, long userId, int start, int end,
163 com.liferay.portal.kernel.util.OrderByComparator obc)
164 throws com.liferay.portal.kernel.exception.SystemException;
165
166 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
168 long groupId, long userId, long rootFolderId, int start, int end)
169 throws 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> getGroupFileEntries(
173 long groupId, long userId, long rootFolderId, int start, int end,
174 com.liferay.portal.kernel.util.OrderByComparator obc)
175 throws com.liferay.portal.kernel.exception.SystemException;
176
177 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178 public int getGroupFileEntriesCount(long groupId, long userId)
179 throws com.liferay.portal.kernel.exception.SystemException;
180
181 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182 public int getGroupFileEntriesCount(long groupId, long userId,
183 long rootFolderId)
184 throws com.liferay.portal.kernel.exception.SystemException;
185
186 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187 public boolean hasFileEntryLock(long groupId, long folderId,
188 java.lang.String name)
189 throws com.liferay.portal.kernel.exception.PortalException,
190 com.liferay.portal.kernel.exception.SystemException;
191
192 public com.liferay.portal.model.Lock lockFileEntry(long groupId,
193 long folderId, java.lang.String name)
194 throws com.liferay.portal.kernel.exception.PortalException,
195 com.liferay.portal.kernel.exception.SystemException;
196
197 public com.liferay.portal.model.Lock lockFileEntry(long groupId,
198 long folderId, java.lang.String name, java.lang.String owner,
199 long expirationTime)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException;
202
203 public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
204 long groupId, long folderId, long newFolderId, java.lang.String name,
205 com.liferay.portal.service.ServiceContext serviceContext)
206 throws com.liferay.portal.kernel.exception.PortalException,
207 com.liferay.portal.kernel.exception.SystemException;
208
209 public com.liferay.portal.model.Lock refreshFileEntryLock(
210 java.lang.String lockUuid, long expirationTime)
211 throws com.liferay.portal.kernel.exception.PortalException,
212 com.liferay.portal.kernel.exception.SystemException;
213
214 public void revertFileEntry(long fileEntryId)
215 throws com.liferay.portal.kernel.exception.PortalException,
216 com.liferay.portal.kernel.exception.SystemException;
217
218 public void unlockFileEntry(long groupId, long folderId,
219 java.lang.String name)
220 throws com.liferay.portal.kernel.exception.PortalException,
221 com.liferay.portal.kernel.exception.SystemException;
222
223 public void unlockFileEntry(long groupId, long folderId,
224 java.lang.String name, java.lang.String lockUuid)
225 throws com.liferay.portal.kernel.exception.PortalException,
226 com.liferay.portal.kernel.exception.SystemException;
227
228 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
229 long groupId, long folderId, java.lang.String name,
230 java.lang.String sourceFileName, java.lang.String title,
231 java.lang.String description, java.lang.String changeLog,
232 boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
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.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
238 long groupId, long folderId, java.lang.String name,
239 java.lang.String sourceFileName, java.lang.String title,
240 java.lang.String description, java.lang.String changeLog,
241 boolean majorVersion, java.lang.String extraSettings,
242 java.io.File file,
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 com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
248 long groupId, long folderId, java.lang.String name,
249 java.lang.String sourceFileName, java.lang.String title,
250 java.lang.String description, java.lang.String changeLog,
251 boolean majorVersion, java.lang.String extraSettings,
252 java.io.InputStream is, long size,
253 com.liferay.portal.service.ServiceContext serviceContext)
254 throws com.liferay.portal.kernel.exception.PortalException,
255 com.liferay.portal.kernel.exception.SystemException;
256
257 public boolean verifyFileEntryLock(long groupId, long folderId,
258 java.lang.String name, java.lang.String lockUuid)
259 throws com.liferay.portal.kernel.exception.PortalException,
260 com.liferay.portal.kernel.exception.SystemException;
261 }