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            public java.io.InputStream getFileAsStream(long fileEntryId,
125                    java.lang.String version) throws PortalException;
126    
127            public java.io.InputStream getFileAsStream(long fileEntryId,
128                    java.lang.String version, boolean incrementCounter)
129                    throws PortalException;
130    
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
133                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
134                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
135                    throws PortalException;
136    
137            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
139                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
140                    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, int start, int end,
147                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
148                    throws PortalException;
149    
150            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
151            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
152                    long groupId, long folderId, int status, int start, int end,
153                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
154                    throws PortalException;
155    
156            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157            public int getFileEntriesCount(long groupId, long folderId);
158    
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public int getFileEntriesCount(long groupId, long folderId,
161                    long fileEntryTypeId);
162    
163            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164            public int getFileEntriesCount(long groupId, long folderId,
165                    java.lang.String[] mimeTypes);
166    
167            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168            public int getFileEntriesCount(long groupId, long folderId, int status);
169    
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
172                    long fileEntryId) throws PortalException;
173    
174            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
176                    long groupId, long folderId, java.lang.String title)
177                    throws PortalException;
178    
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
181                    java.lang.String uuid, long groupId) throws PortalException;
182    
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public com.liferay.portal.kernel.lock.Lock getFileEntryLock(
185                    long fileEntryId);
186    
187            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188            public int getFoldersFileEntriesCount(long groupId,
189                    java.util.List<java.lang.Long> folderIds, int status);
190    
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
193                    long groupId, long userId, long repositoryId, long rootFolderId,
194                    java.lang.String[] mimeTypes, int status, int start, int end,
195                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
196                    throws PortalException;
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 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, int start, int end,
208                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
209                    throws PortalException;
210    
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public int getGroupFileEntriesCount(long groupId, long userId,
213                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
214                    int status) throws PortalException;
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public int getGroupFileEntriesCount(long groupId, long userId,
218                    long rootFolderId) throws PortalException;
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public int getGroupFileEntriesCount(long groupId, long userId,
222                    long rootFolderId, java.lang.String[] mimeTypes, int status)
223                    throws PortalException;
224    
225            /**
226            * Returns the OSGi service identifier.
227            *
228            * @return the OSGi service identifier
229            */
230            public java.lang.String getOSGiServiceIdentifier();
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            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
268                    long fileEntryId, java.lang.String sourceFileName,
269                    java.lang.String mimeType, java.lang.String title,
270                    java.lang.String description, java.lang.String changeLog,
271                    boolean majorVersion, long fileEntryTypeId,
272                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
273                    java.io.File file, java.io.InputStream is, long size,
274                    com.liferay.portal.service.ServiceContext serviceContext)
275                    throws PortalException;
276    
277            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
278                    long userId, long fileVersionId, int status,
279                    com.liferay.portal.service.ServiceContext serviceContext,
280                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
281                    throws PortalException;
282    
283            public boolean verifyFileEntryCheckOut(long fileEntryId,
284                    java.lang.String lockUuid) throws PortalException;
285    
286            public boolean verifyFileEntryLock(long fileEntryId,
287                    java.lang.String lockUuid) throws PortalException;
288    }