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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.security.ac.AccessControlled;
026    import com.liferay.portal.service.BaseService;
027    
028    /**
029     * Provides the remote service interface for DLFileEntry. Methods of this
030     * service are expected to have security checks based on the propagated JAAS
031     * credentials because this service can be accessed remotely.
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    @ProviderType
040    @AccessControlled
041    @JSONWebService
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface DLFileEntryService extends BaseService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * 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.
049             */
050    
051            /**
052            * Returns the Spring bean ID for this bean.
053            *
054            * @return the Spring bean ID for this bean
055            */
056            public java.lang.String getBeanIdentifier();
057    
058            /**
059            * Sets the Spring bean ID for this bean.
060            *
061            * @param beanIdentifier the Spring bean ID for this bean
062            */
063            public void setBeanIdentifier(java.lang.String beanIdentifier);
064    
065            public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
066                    long groupId, long repositoryId, long folderId,
067                    java.lang.String sourceFileName, java.lang.String mimeType,
068                    java.lang.String title, java.lang.String description,
069                    java.lang.String changeLog, long fileEntryTypeId,
070                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
071                    java.io.File file, java.io.InputStream is, long size,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            public com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
077                    long fileEntryId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException;
080    
081            public void checkInFileEntry(long fileEntryId, boolean major,
082                    java.lang.String changeLog,
083                    com.liferay.portal.service.ServiceContext serviceContext)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
089            String, ServiceContext)}
090            */
091            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException;
094    
095            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException;
099    
100            /**
101            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
102            ServiceContext)}
103            */
104            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
105                    long fileEntryId)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException;
108    
109            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
110                    long fileEntryId,
111                    com.liferay.portal.service.ServiceContext serviceContext)
112                    throws com.liferay.portal.kernel.exception.PortalException,
113                            com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
117            String, long, ServiceContext)}
118            */
119            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
120                    long fileEntryId, java.lang.String owner, long expirationTime)
121                    throws com.liferay.portal.kernel.exception.PortalException,
122                            com.liferay.portal.kernel.exception.SystemException;
123    
124            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
125                    long fileEntryId, java.lang.String owner, long expirationTime,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException;
129    
130            public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
131                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
132                    com.liferay.portal.service.ServiceContext serviceContext)
133                    throws com.liferay.portal.kernel.exception.PortalException,
134                            com.liferay.portal.kernel.exception.SystemException;
135    
136            public void deleteFileEntry(long fileEntryId)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException;
139    
140            public void deleteFileEntry(long groupId, long folderId,
141                    java.lang.String title)
142                    throws com.liferay.portal.kernel.exception.PortalException,
143                            com.liferay.portal.kernel.exception.SystemException;
144    
145            public void deleteFileVersion(long fileEntryId, java.lang.String version)
146                    throws com.liferay.portal.kernel.exception.PortalException,
147                            com.liferay.portal.kernel.exception.SystemException;
148    
149            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150            public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
151                    long imageId)
152                    throws com.liferay.portal.kernel.exception.PortalException,
153                            com.liferay.portal.kernel.exception.SystemException;
154    
155            public java.io.InputStream getFileAsStream(long fileEntryId,
156                    java.lang.String version)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            public java.io.InputStream getFileAsStream(long fileEntryId,
161                    java.lang.String version, boolean incrementCounter)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
167                    long groupId, long folderId, int status, int start, int end,
168                    com.liferay.portal.kernel.util.OrderByComparator obc)
169                    throws com.liferay.portal.kernel.exception.PortalException,
170                            com.liferay.portal.kernel.exception.SystemException;
171    
172            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
174                    long groupId, long folderId, int start, int end,
175                    com.liferay.portal.kernel.util.OrderByComparator obc)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException;
178    
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
181                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
182                    com.liferay.portal.kernel.util.OrderByComparator obc)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException;
185    
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
188                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
189                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
190                    throws com.liferay.portal.kernel.exception.PortalException,
191                            com.liferay.portal.kernel.exception.SystemException;
192    
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public int getFileEntriesCount(long groupId, long folderId)
195                    throws com.liferay.portal.kernel.exception.SystemException;
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public int getFileEntriesCount(long groupId, long folderId, int status)
199                    throws com.liferay.portal.kernel.exception.SystemException;
200    
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public int getFileEntriesCount(long groupId, long folderId,
203                    long fileEntryTypeId)
204                    throws com.liferay.portal.kernel.exception.SystemException;
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public int getFileEntriesCount(long groupId, long folderId,
208                    java.lang.String[] mimeTypes)
209                    throws com.liferay.portal.kernel.exception.SystemException;
210    
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
213                    long fileEntryId)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException;
216    
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
219                    long groupId, long folderId, java.lang.String title)
220                    throws com.liferay.portal.kernel.exception.PortalException,
221                            com.liferay.portal.kernel.exception.SystemException;
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
225                    java.lang.String uuid, long groupId)
226                    throws com.liferay.portal.kernel.exception.PortalException,
227                            com.liferay.portal.kernel.exception.SystemException;
228    
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public int getFoldersFileEntriesCount(long groupId,
234                    java.util.List<java.lang.Long> folderIds, int status)
235                    throws com.liferay.portal.kernel.exception.SystemException;
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
239                    long groupId, long userId, long rootFolderId, int start, int end,
240                    com.liferay.portal.kernel.util.OrderByComparator obc)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException;
243    
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
246                    long groupId, long userId, long rootFolderId,
247                    java.lang.String[] mimeTypes, int status, int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator obc)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException;
251    
252            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
254                    long groupId, long userId, long repositoryId, long rootFolderId,
255                    java.lang.String[] mimeTypes, int status, int start, int end,
256                    com.liferay.portal.kernel.util.OrderByComparator obc)
257                    throws com.liferay.portal.kernel.exception.PortalException,
258                            com.liferay.portal.kernel.exception.SystemException;
259    
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public int getGroupFileEntriesCount(long groupId, long userId,
262                    long rootFolderId)
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 int getGroupFileEntriesCount(long groupId, long userId,
268                    long rootFolderId, java.lang.String[] mimeTypes, int status)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException;
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public int getGroupFileEntriesCount(long groupId, long userId,
274                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
275                    int status)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException;
278    
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public boolean hasFileEntryLock(long fileEntryId)
281                    throws com.liferay.portal.kernel.exception.PortalException,
282                            com.liferay.portal.kernel.exception.SystemException;
283    
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public boolean isFileEntryCheckedOut(long fileEntryId)
286                    throws com.liferay.portal.kernel.exception.PortalException,
287                            com.liferay.portal.kernel.exception.SystemException;
288    
289            public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
290                    long fileEntryId, long newFolderId,
291                    com.liferay.portal.service.ServiceContext serviceContext)
292                    throws com.liferay.portal.kernel.exception.PortalException,
293                            com.liferay.portal.kernel.exception.SystemException;
294    
295            public com.liferay.portal.model.Lock refreshFileEntryLock(
296                    java.lang.String lockUuid, long companyId, long expirationTime)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException;
299    
300            public void revertFileEntry(long fileEntryId, java.lang.String version,
301                    com.liferay.portal.service.ServiceContext serviceContext)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException;
304    
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public com.liferay.portal.kernel.search.Hits search(long groupId,
307                    long creatorUserId, int status, int start, int end)
308                    throws com.liferay.portal.kernel.exception.PortalException,
309                            com.liferay.portal.kernel.exception.SystemException;
310    
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public com.liferay.portal.kernel.search.Hits search(long groupId,
313                    long creatorUserId, long folderId, java.lang.String[] mimeTypes,
314                    int status, int start, int end)
315                    throws com.liferay.portal.kernel.exception.PortalException,
316                            com.liferay.portal.kernel.exception.SystemException;
317    
318            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
319                    long fileEntryId, java.lang.String sourceFileName,
320                    java.lang.String mimeType, java.lang.String title,
321                    java.lang.String description, java.lang.String changeLog,
322                    boolean majorVersion, long fileEntryTypeId,
323                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
324                    java.io.File file, java.io.InputStream is, long size,
325                    com.liferay.portal.service.ServiceContext serviceContext)
326                    throws com.liferay.portal.kernel.exception.PortalException,
327                            com.liferay.portal.kernel.exception.SystemException;
328    
329            public boolean verifyFileEntryCheckOut(long fileEntryId,
330                    java.lang.String lockUuid)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException;
333    
334            public boolean verifyFileEntryLock(long fileEntryId,
335                    java.lang.String lockUuid)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException;
338    }