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 int getFileEntriesCount(long groupId, long folderId)
126 throws com.liferay.portal.kernel.exception.SystemException;
127
128 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129 public int getFileEntriesCount(long groupId, long folderId,
130 long fileEntryTypeId)
131 throws com.liferay.portal.kernel.exception.SystemException;
132
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
135 long fileEntryId)
136 throws com.liferay.portal.kernel.exception.PortalException,
137 com.liferay.portal.kernel.exception.SystemException;
138
139 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
141 long groupId, long folderId, java.lang.String title)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException;
144
145 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
147 java.lang.String uuid, long groupId)
148 throws com.liferay.portal.kernel.exception.PortalException,
149 com.liferay.portal.kernel.exception.SystemException;
150
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
153
154 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155 public int getFoldersFileEntriesCount(long groupId,
156 java.util.List<java.lang.Long> folderIds, int status)
157 throws com.liferay.portal.kernel.exception.SystemException;
158
159 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
161 long groupId, long userId, long rootFolderId, int start, int end,
162 com.liferay.portal.kernel.util.OrderByComparator obc)
163 throws com.liferay.portal.kernel.exception.SystemException;
164
165 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166 public int getGroupFileEntriesCount(long groupId, long userId,
167 long rootFolderId)
168 throws com.liferay.portal.kernel.exception.SystemException;
169
170 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171 public boolean hasFileEntryLock(long fileEntryId)
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 boolean isFileEntryCheckedOut(long fileEntryId)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException;
179
180 public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
181 long fileEntryId, long newFolderId,
182 com.liferay.portal.service.ServiceContext serviceContext)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException;
185
186 public com.liferay.portal.model.Lock refreshFileEntryLock(
187 java.lang.String lockUuid, long expirationTime)
188 throws com.liferay.portal.kernel.exception.PortalException,
189 com.liferay.portal.kernel.exception.SystemException;
190
191 public void revertFileEntry(long fileEntryId, java.lang.String version,
192 com.liferay.portal.service.ServiceContext serviceContext)
193 throws com.liferay.portal.kernel.exception.PortalException,
194 com.liferay.portal.kernel.exception.SystemException;
195
196 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
197 long fileEntryId, java.lang.String sourceFileName,
198 java.lang.String mimeType, java.lang.String title,
199 java.lang.String description, java.lang.String changeLog,
200 boolean majorVersion, long fileEntryTypeId,
201 java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
202 java.io.File file, java.io.InputStream is, long size,
203 com.liferay.portal.service.ServiceContext serviceContext)
204 throws com.liferay.portal.kernel.exception.PortalException,
205 com.liferay.portal.kernel.exception.SystemException;
206
207 public boolean verifyFileEntryCheckOut(long fileEntryId,
208 java.lang.String lockUuid)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException;
211 }