001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
027     * The interface for the document library file entry remote service.
028     *
029     * <p>
030     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
031     * </p>
032     *
033     * @author Brian Wing Shun Chan
034     * @see DLFileEntryServiceUtil
035     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryServiceBaseImpl
036     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl
037     * @generated
038     */
039    @AccessControlled
040    @JSONWebService
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface DLFileEntryService extends BaseService {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify or reference this interface directly. Always use {@link DLFileEntryServiceUtil} to access the document library file entry remote service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
048             */
049    
050            /**
051            * Returns the Spring bean ID for this bean.
052            *
053            * @return the Spring bean ID for this bean
054            */
055            public java.lang.String getBeanIdentifier();
056    
057            /**
058            * Sets the Spring bean ID for this bean.
059            *
060            * @param beanIdentifier the Spring bean ID for this bean
061            */
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            /**
087            * @deprecated {@link #checkInFileEntry(long, String, ServiceContext)}
088            */
089            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException;
092    
093            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
094                    com.liferay.portal.service.ServiceContext serviceContext)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException;
097    
098            /**
099            * @deprecated {@link #checkOutFileEntry(long, ServiceContext)}
100            */
101            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
102                    long fileEntryId)
103                    throws com.liferay.portal.kernel.exception.PortalException,
104                            com.liferay.portal.kernel.exception.SystemException;
105    
106            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
107                    long fileEntryId,
108                    com.liferay.portal.service.ServiceContext serviceContext)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            com.liferay.portal.kernel.exception.SystemException;
111    
112            /**
113            * @deprecated {@link #checkOutFileEntry(long, String, long,
114            ServiceContext)}
115            */
116            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
117                    long fileEntryId, java.lang.String owner, long expirationTime)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException;
120    
121            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
122                    long fileEntryId, java.lang.String owner, long expirationTime,
123                    com.liferay.portal.service.ServiceContext serviceContext)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException;
126    
127            public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
128                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
129                    com.liferay.portal.service.ServiceContext serviceContext)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException;
132    
133            public void deleteFileEntry(long fileEntryId)
134                    throws com.liferay.portal.kernel.exception.PortalException,
135                            com.liferay.portal.kernel.exception.SystemException;
136    
137            public void deleteFileEntry(long groupId, long folderId,
138                    java.lang.String title)
139                    throws com.liferay.portal.kernel.exception.PortalException,
140                            com.liferay.portal.kernel.exception.SystemException;
141    
142            public void deleteFileVersion(long fileEntryId, java.lang.String version)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException;
145    
146            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147            public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
148                    long imageId)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException;
151    
152            public java.io.InputStream getFileAsStream(long fileEntryId,
153                    java.lang.String version)
154                    throws com.liferay.portal.kernel.exception.PortalException,
155                            com.liferay.portal.kernel.exception.SystemException;
156    
157            public java.io.InputStream getFileAsStream(long fileEntryId,
158                    java.lang.String version, boolean incrementCounter)
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 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
164                    long groupId, long folderId, int status, int start, int end,
165                    com.liferay.portal.kernel.util.OrderByComparator obc)
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 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
171                    long groupId, long folderId, int start, int end,
172                    com.liferay.portal.kernel.util.OrderByComparator obc)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            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> getFileEntries(
178                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
179                    com.liferay.portal.kernel.util.OrderByComparator obc)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException;
182    
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
185                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
186                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
187                    throws com.liferay.portal.kernel.exception.PortalException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public int getFileEntriesCount(long groupId, long folderId)
192                    throws com.liferay.portal.kernel.exception.SystemException;
193    
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public int getFileEntriesCount(long groupId, long folderId, int status)
196                    throws com.liferay.portal.kernel.exception.SystemException;
197    
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public int getFileEntriesCount(long groupId, long folderId,
200                    long fileEntryTypeId)
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public int getFileEntriesCount(long groupId, long folderId,
205                    java.lang.String[] mimeTypes)
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
210                    long fileEntryId)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException;
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
216                    long groupId, long folderId, java.lang.String title)
217                    throws com.liferay.portal.kernel.exception.PortalException,
218                            com.liferay.portal.kernel.exception.SystemException;
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
222                    java.lang.String uuid, long groupId)
223                    throws com.liferay.portal.kernel.exception.PortalException,
224                            com.liferay.portal.kernel.exception.SystemException;
225    
226            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227            public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
228    
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public int getFoldersFileEntriesCount(long groupId,
231                    java.util.List<java.lang.Long> folderIds, int status)
232                    throws com.liferay.portal.kernel.exception.SystemException;
233    
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
236                    long groupId, long userId, long rootFolderId, int start, int end,
237                    com.liferay.portal.kernel.util.OrderByComparator obc)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException;
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
243                    long groupId, long userId, long rootFolderId,
244                    java.lang.String[] mimeTypes, int status, int start, int end,
245                    com.liferay.portal.kernel.util.OrderByComparator obc)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException;
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public int getGroupFileEntriesCount(long groupId, long userId,
251                    long rootFolderId)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException;
254    
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public int getGroupFileEntriesCount(long groupId, long userId,
257                    long rootFolderId, java.lang.String[] mimeTypes, int status)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException;
260    
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public boolean hasFileEntryLock(long fileEntryId)
263                    throws com.liferay.portal.kernel.exception.PortalException,
264                            com.liferay.portal.kernel.exception.SystemException;
265    
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public boolean isFileEntryCheckedOut(long fileEntryId)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException;
270    
271            public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
272                    long fileEntryId, long newFolderId,
273                    com.liferay.portal.service.ServiceContext serviceContext)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException;
276    
277            public com.liferay.portal.model.Lock refreshFileEntryLock(
278                    java.lang.String lockUuid, long companyId, long expirationTime)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException;
281    
282            public void revertFileEntry(long fileEntryId, java.lang.String version,
283                    com.liferay.portal.service.ServiceContext serviceContext)
284                    throws com.liferay.portal.kernel.exception.PortalException,
285                            com.liferay.portal.kernel.exception.SystemException;
286    
287            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
288                    long fileEntryId, java.lang.String sourceFileName,
289                    java.lang.String mimeType, java.lang.String title,
290                    java.lang.String description, java.lang.String changeLog,
291                    boolean majorVersion, long fileEntryTypeId,
292                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
293                    java.io.File file, java.io.InputStream is, long size,
294                    com.liferay.portal.service.ServiceContext serviceContext)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException;
297    
298            public boolean verifyFileEntryCheckOut(long fileEntryId,
299                    java.lang.String lockUuid)
300                    throws com.liferay.portal.kernel.exception.PortalException,
301                            com.liferay.portal.kernel.exception.SystemException;
302    
303            public boolean verifyFileEntryLock(long fileEntryId,
304                    java.lang.String lockUuid)
305                    throws com.liferay.portal.kernel.exception.PortalException,
306                            com.liferay.portal.kernel.exception.SystemException;
307    }