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.service.BaseService;
024    
025    /**
026     * The interface for the document library file entry remote service.
027     *
028     * <p>
029     * 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.
030     * </p>
031     *
032     * @author Brian Wing Shun Chan
033     * @see DLFileEntryServiceUtil
034     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryServiceBaseImpl
035     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl
036     * @generated
037     */
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            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * @deprecated {@link #checkOutFileEntry(long, ServiceContext)}
090            */
091            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
092                    long fileEntryId)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException;
095    
096            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
097                    long fileEntryId,
098                    com.liferay.portal.service.ServiceContext serviceContext)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * @deprecated {@link #checkOutFileEntry(long, String, long,
104            ServiceContext)}
105            */
106            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
107                    long fileEntryId, java.lang.String owner, long expirationTime)
108                    throws com.liferay.portal.kernel.exception.PortalException,
109                            com.liferay.portal.kernel.exception.SystemException;
110    
111            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
112                    long fileEntryId, java.lang.String owner, long expirationTime,
113                    com.liferay.portal.service.ServiceContext serviceContext)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException;
116    
117            public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
118                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
119                    com.liferay.portal.service.ServiceContext serviceContext)
120                    throws com.liferay.portal.kernel.exception.PortalException,
121                            com.liferay.portal.kernel.exception.SystemException;
122    
123            public void deleteFileEntry(long fileEntryId)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException;
126    
127            public void deleteFileEntry(long groupId, long folderId,
128                    java.lang.String title)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException;
131    
132            public void deleteFileVersion(long fileEntryId, java.lang.String version)
133                    throws com.liferay.portal.kernel.exception.PortalException,
134                            com.liferay.portal.kernel.exception.SystemException;
135    
136            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137            public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
138                    long imageId)
139                    throws com.liferay.portal.kernel.exception.PortalException,
140                            com.liferay.portal.kernel.exception.SystemException;
141    
142            public java.io.InputStream getFileAsStream(long fileEntryId,
143                    java.lang.String version)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException;
146    
147            public java.io.InputStream getFileAsStream(long fileEntryId,
148                    java.lang.String version, boolean incrementCounter)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException;
151    
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
154                    long groupId, long folderId, int start, int end,
155                    com.liferay.portal.kernel.util.OrderByComparator obc)
156                    throws com.liferay.portal.kernel.exception.SystemException;
157    
158            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
160                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
161                    com.liferay.portal.kernel.util.OrderByComparator obc)
162                    throws com.liferay.portal.kernel.exception.SystemException;
163    
164            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
166                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
167                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public int getFileEntriesCount(long groupId, long folderId)
172                    throws com.liferay.portal.kernel.exception.SystemException;
173    
174            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175            public int getFileEntriesCount(long groupId, long folderId,
176                    long fileEntryTypeId)
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public int getFileEntriesCount(long groupId, long folderId,
181                    java.lang.String[] mimeTypes)
182                    throws com.liferay.portal.kernel.exception.SystemException;
183    
184            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
186                    long fileEntryId)
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 com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
192                    long groupId, long folderId, java.lang.String title)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException;
195    
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
198                    java.lang.String uuid, long groupId)
199                    throws com.liferay.portal.kernel.exception.PortalException,
200                            com.liferay.portal.kernel.exception.SystemException;
201    
202            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
204    
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public int getFoldersFileEntriesCount(long groupId,
207                    java.util.List<java.lang.Long> folderIds, int status)
208                    throws com.liferay.portal.kernel.exception.SystemException;
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
212                    long groupId, long userId, long rootFolderId, int start, int end,
213                    com.liferay.portal.kernel.util.OrderByComparator obc)
214                    throws com.liferay.portal.kernel.exception.SystemException;
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
218                    long groupId, long userId, long rootFolderId,
219                    java.lang.String[] mimeTypes, int status, int start, int end,
220                    com.liferay.portal.kernel.util.OrderByComparator obc)
221                    throws com.liferay.portal.kernel.exception.SystemException;
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public int getGroupFileEntriesCount(long groupId, long userId,
225                    long rootFolderId)
226                    throws com.liferay.portal.kernel.exception.SystemException;
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public int getGroupFileEntriesCount(long groupId, long userId,
230                    long rootFolderId, java.lang.String[] mimeTypes, int status)
231                    throws com.liferay.portal.kernel.exception.SystemException;
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public boolean hasFileEntryLock(long fileEntryId)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException;
237    
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public boolean isFileEntryCheckedOut(long fileEntryId)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException;
242    
243            public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
244                    long fileEntryId, long newFolderId,
245                    com.liferay.portal.service.ServiceContext serviceContext)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException;
248    
249            public com.liferay.portal.model.Lock refreshFileEntryLock(
250                    java.lang.String lockUuid, long expirationTime)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException;
253    
254            public void revertFileEntry(long fileEntryId, java.lang.String version,
255                    com.liferay.portal.service.ServiceContext serviceContext)
256                    throws com.liferay.portal.kernel.exception.PortalException,
257                            com.liferay.portal.kernel.exception.SystemException;
258    
259            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
260                    long fileEntryId, java.lang.String sourceFileName,
261                    java.lang.String mimeType, java.lang.String title,
262                    java.lang.String description, java.lang.String changeLog,
263                    boolean majorVersion, long fileEntryTypeId,
264                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
265                    java.io.File file, java.io.InputStream is, long size,
266                    com.liferay.portal.service.ServiceContext serviceContext)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException;
269    
270            public boolean verifyFileEntryCheckOut(long fileEntryId,
271                    java.lang.String lockUuid)
272                    throws com.liferay.portal.kernel.exception.PortalException,
273                            com.liferay.portal.kernel.exception.SystemException;
274    
275            public boolean verifyFileEntryLock(long fileEntryId,
276                    java.lang.String lockUuid)
277                    throws com.liferay.portal.kernel.exception.PortalException,
278                            com.liferay.portal.kernel.exception.SystemException;
279    }