001    /**
002     * Copyright (c) 2000-2013 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     * Provides the remote service interface for DLFileEntry. Methods of this
028     * service are expected to have security checks based on the propagated JAAS
029     * credentials because this service can be accessed remotely.
030     *
031     * @author Brian Wing Shun Chan
032     * @see DLFileEntryServiceUtil
033     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryServiceBaseImpl
034     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl
035     * @generated
036     */
037    @AccessControlled
038    @JSONWebService
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface DLFileEntryService extends BaseService {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * 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.
046             */
047    
048            /**
049            * Returns the Spring bean ID for this bean.
050            *
051            * @return the Spring bean ID for this bean
052            */
053            public java.lang.String getBeanIdentifier();
054    
055            /**
056            * Sets the Spring bean ID for this bean.
057            *
058            * @param beanIdentifier the Spring bean ID for this bean
059            */
060            public void setBeanIdentifier(java.lang.String beanIdentifier);
061    
062            public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
063                    long groupId, long repositoryId, long folderId,
064                    java.lang.String sourceFileName, java.lang.String mimeType,
065                    java.lang.String title, java.lang.String description,
066                    java.lang.String changeLog, long fileEntryTypeId,
067                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
068                    java.io.File file, java.io.InputStream is, long size,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            public com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
074                    long fileEntryId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException;
077    
078            public void checkInFileEntry(long fileEntryId, boolean major,
079                    java.lang.String changeLog,
080                    com.liferay.portal.service.ServiceContext serviceContext)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
086            String, ServiceContext)}
087            */
088            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException;
091    
092            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
093                    com.liferay.portal.service.ServiceContext serviceContext)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException;
096    
097            /**
098            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
099            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 As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
114            String, long, 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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public com.liferay.portal.kernel.search.Hits search(long groupId,
289                    long creatorUserId, int status, int start, int end)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException;
292    
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public com.liferay.portal.kernel.search.Hits search(long groupId,
295                    long creatorUserId, long folderId, java.lang.String[] mimeTypes,
296                    int status, int start, int end)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException;
299    
300            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
301                    long fileEntryId, java.lang.String sourceFileName,
302                    java.lang.String mimeType, java.lang.String title,
303                    java.lang.String description, java.lang.String changeLog,
304                    boolean majorVersion, long fileEntryTypeId,
305                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
306                    java.io.File file, java.io.InputStream is, long size,
307                    com.liferay.portal.service.ServiceContext serviceContext)
308                    throws com.liferay.portal.kernel.exception.PortalException,
309                            com.liferay.portal.kernel.exception.SystemException;
310    
311            public boolean verifyFileEntryCheckOut(long fileEntryId,
312                    java.lang.String lockUuid)
313                    throws com.liferay.portal.kernel.exception.PortalException,
314                            com.liferay.portal.kernel.exception.SystemException;
315    
316            public boolean verifyFileEntryLock(long fileEntryId,
317                    java.lang.String lockUuid)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException;
320    }