001    /**
002     * Copyright (c) 2000-present 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.security.access.control.AccessControlled;
023    import com.liferay.portal.kernel.transaction.Isolation;
024    import com.liferay.portal.kernel.transaction.Propagation;
025    import com.liferay.portal.kernel.transaction.Transactional;
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    @AccessControlled
040    @JSONWebService
041    @ProviderType
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            public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
051                    long groupId, long repositoryId, long folderId,
052                    java.lang.String sourceFileName, java.lang.String mimeType,
053                    java.lang.String title, java.lang.String description,
054                    java.lang.String changeLog, long fileEntryTypeId,
055                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
056                    java.io.File file, java.io.InputStream is, long size,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws PortalException;
059    
060            public com.liferay.portlet.documentlibrary.model.DLFileVersion cancelCheckOut(
061                    long fileEntryId) throws PortalException;
062    
063            /**
064            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
065            String, ServiceContext)}
066            */
067            @java.lang.Deprecated
068            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
069                    throws PortalException;
070    
071            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws PortalException;
074    
075            public void checkInFileEntry(long fileEntryId, boolean major,
076                    java.lang.String changeLog,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws PortalException;
079    
080            /**
081            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
082            ServiceContext)}
083            */
084            @java.lang.Deprecated
085            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
086                    long fileEntryId) throws PortalException;
087    
088            /**
089            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
090            String, long, ServiceContext)}
091            */
092            @java.lang.Deprecated
093            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
094                    long fileEntryId, java.lang.String owner, long expirationTime)
095                    throws PortalException;
096    
097            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
098                    long fileEntryId, java.lang.String owner, long expirationTime,
099                    com.liferay.portal.service.ServiceContext serviceContext)
100                    throws PortalException;
101    
102            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
103                    long fileEntryId,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws PortalException;
106    
107            public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
108                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
109                    com.liferay.portal.service.ServiceContext serviceContext)
110                    throws PortalException;
111    
112            public void deleteFileEntry(long fileEntryId) throws PortalException;
113    
114            public void deleteFileEntry(long groupId, long folderId,
115                    java.lang.String title) throws PortalException;
116    
117            public void deleteFileVersion(long fileEntryId, java.lang.String version)
118                    throws PortalException;
119    
120            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121            public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
122                    long imageId) throws PortalException;
123    
124            /**
125            * Returns the Spring bean ID for this bean.
126            *
127            * @return the Spring bean ID for this bean
128            */
129            public java.lang.String getBeanIdentifier();
130    
131            public java.io.InputStream getFileAsStream(long fileEntryId,
132                    java.lang.String version) throws PortalException;
133    
134            public java.io.InputStream getFileAsStream(long fileEntryId,
135                    java.lang.String version, boolean incrementCounter)
136                    throws PortalException;
137    
138            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
140                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
141                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
142                    throws PortalException;
143    
144            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
146                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
149                    throws PortalException;
150    
151            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
153                    long groupId, long folderId, int start, int end,
154                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
155                    throws PortalException;
156    
157            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
159                    long groupId, long folderId, int status, int start, int end,
160                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
161                    throws PortalException;
162    
163            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164            public int getFileEntriesCount(long groupId, long folderId);
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public int getFileEntriesCount(long groupId, long folderId,
168                    long fileEntryTypeId);
169    
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public int getFileEntriesCount(long groupId, long folderId,
172                    java.lang.String[] mimeTypes);
173    
174            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175            public int getFileEntriesCount(long groupId, long folderId, int status);
176    
177            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
179                    long fileEntryId) throws PortalException;
180    
181            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
183                    long groupId, long folderId, java.lang.String title)
184                    throws PortalException;
185    
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
188                    java.lang.String uuid, long groupId) throws PortalException;
189    
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public com.liferay.portal.kernel.lock.Lock getFileEntryLock(
192                    long fileEntryId);
193    
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public int getFoldersFileEntriesCount(long groupId,
196                    java.util.List<java.lang.Long> folderIds, int status);
197    
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
200                    long groupId, long userId, long repositoryId, long rootFolderId,
201                    java.lang.String[] mimeTypes, int status, int start, int end,
202                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
203                    throws PortalException;
204    
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
207                    long groupId, long userId, long rootFolderId,
208                    java.lang.String[] mimeTypes, int status, int start, int end,
209                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
210                    throws PortalException;
211    
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
214                    long groupId, long userId, long rootFolderId, int start, int end,
215                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
216                    throws PortalException;
217    
218            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219            public int getGroupFileEntriesCount(long groupId, long userId,
220                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
221                    int status) throws PortalException;
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public int getGroupFileEntriesCount(long groupId, long userId,
225                    long rootFolderId) throws PortalException;
226    
227            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228            public int getGroupFileEntriesCount(long groupId, long userId,
229                    long rootFolderId, java.lang.String[] mimeTypes, int status)
230                    throws PortalException;
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public boolean hasFileEntryLock(long fileEntryId) throws PortalException;
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public boolean isFileEntryCheckedOut(long fileEntryId)
237                    throws PortalException;
238    
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public boolean isKeepFileVersionLabel(long fileEntryId,
241                    com.liferay.portal.service.ServiceContext serviceContext)
242                    throws PortalException;
243    
244            public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
245                    long fileEntryId, long newFolderId,
246                    com.liferay.portal.service.ServiceContext serviceContext)
247                    throws PortalException;
248    
249            public com.liferay.portal.kernel.lock.Lock refreshFileEntryLock(
250                    java.lang.String lockUuid, long companyId, long expirationTime)
251                    throws PortalException;
252    
253            public void revertFileEntry(long fileEntryId, java.lang.String version,
254                    com.liferay.portal.service.ServiceContext serviceContext)
255                    throws PortalException;
256    
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public com.liferay.portal.kernel.search.Hits search(long groupId,
259                    long creatorUserId, long folderId, java.lang.String[] mimeTypes,
260                    int status, int start, int end) throws PortalException;
261    
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public com.liferay.portal.kernel.search.Hits search(long groupId,
264                    long creatorUserId, int status, int start, int end)
265                    throws PortalException;
266    
267            /**
268            * Sets the Spring bean ID for this bean.
269            *
270            * @param beanIdentifier the Spring bean ID for this bean
271            */
272            public void setBeanIdentifier(java.lang.String beanIdentifier);
273    
274            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
275                    long fileEntryId, java.lang.String sourceFileName,
276                    java.lang.String mimeType, java.lang.String title,
277                    java.lang.String description, java.lang.String changeLog,
278                    boolean majorVersion, long fileEntryTypeId,
279                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
280                    java.io.File file, java.io.InputStream is, long size,
281                    com.liferay.portal.service.ServiceContext serviceContext)
282                    throws PortalException;
283    
284            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
285                    long userId, long fileVersionId, int status,
286                    com.liferay.portal.service.ServiceContext serviceContext,
287                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
288                    throws PortalException;
289    
290            public boolean verifyFileEntryCheckOut(long fileEntryId,
291                    java.lang.String lockUuid) throws PortalException;
292    
293            public boolean verifyFileEntryLock(long fileEntryId,
294                    java.lang.String lockUuid) throws PortalException;
295    }