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.dynamic.data.mapping.kernel.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            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws PortalException;
066    
067            public void checkInFileEntry(long fileEntryId, boolean major,
068                    java.lang.String changeLog,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws PortalException;
071    
072            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
073                    long fileEntryId, java.lang.String owner, long expirationTime,
074                    com.liferay.portal.service.ServiceContext serviceContext)
075                    throws PortalException;
076    
077            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
078                    long fileEntryId,
079                    com.liferay.portal.service.ServiceContext serviceContext)
080                    throws PortalException;
081    
082            public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
083                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
084                    com.liferay.portal.service.ServiceContext serviceContext)
085                    throws PortalException;
086    
087            public void deleteFileEntry(long fileEntryId) throws PortalException;
088    
089            public void deleteFileEntry(long groupId, long folderId,
090                    java.lang.String title) throws PortalException;
091    
092            public void deleteFileVersion(long fileEntryId, java.lang.String version)
093                    throws PortalException;
094    
095            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
096            public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
097                    long imageId) throws PortalException;
098    
099            public java.io.InputStream getFileAsStream(long fileEntryId,
100                    java.lang.String version) throws PortalException;
101    
102            public java.io.InputStream getFileAsStream(long fileEntryId,
103                    java.lang.String version, boolean incrementCounter)
104                    throws PortalException;
105    
106            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
108                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
109                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
110                    throws PortalException;
111    
112            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
114                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
115                    int end,
116                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
117                    throws PortalException;
118    
119            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
121                    long groupId, long folderId, int start, int end,
122                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
123                    throws PortalException;
124    
125            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
127                    long groupId, long folderId, int status, int start, int end,
128                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
129                    throws PortalException;
130    
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public int getFileEntriesCount(long groupId, long folderId);
133    
134            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135            public int getFileEntriesCount(long groupId, long folderId,
136                    long fileEntryTypeId);
137    
138            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139            public int getFileEntriesCount(long groupId, long folderId,
140                    java.lang.String[] mimeTypes);
141    
142            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143            public int getFileEntriesCount(long groupId, long folderId, int status);
144    
145            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
147                    long fileEntryId) throws PortalException;
148    
149            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
151                    long groupId, long folderId, java.lang.String title)
152                    throws PortalException;
153    
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
156                    java.lang.String uuid, long groupId) throws PortalException;
157    
158            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159            public com.liferay.portal.kernel.lock.Lock getFileEntryLock(
160                    long fileEntryId);
161    
162            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163            public int getFoldersFileEntriesCount(long groupId,
164                    java.util.List<java.lang.Long> folderIds, int status);
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
168                    long groupId, long userId, long repositoryId, long rootFolderId,
169                    java.lang.String[] mimeTypes, int status, int start, int end,
170                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
171                    throws PortalException;
172    
173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
175                    long groupId, long userId, long rootFolderId,
176                    java.lang.String[] mimeTypes, int status, int start, int end,
177                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
178                    throws PortalException;
179    
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
182                    long groupId, long userId, long rootFolderId, int start, int end,
183                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntry> obc)
184                    throws PortalException;
185    
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public int getGroupFileEntriesCount(long groupId, long userId,
188                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
189                    int status) throws PortalException;
190    
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public int getGroupFileEntriesCount(long groupId, long userId,
193                    long rootFolderId) throws PortalException;
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public int getGroupFileEntriesCount(long groupId, long userId,
197                    long rootFolderId, java.lang.String[] mimeTypes, int status)
198                    throws PortalException;
199    
200            /**
201            * Returns the OSGi service identifier.
202            *
203            * @return the OSGi service identifier
204            */
205            public java.lang.String getOSGiServiceIdentifier();
206    
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public boolean hasFileEntryLock(long fileEntryId) throws PortalException;
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public boolean isFileEntryCheckedOut(long fileEntryId)
212                    throws PortalException;
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public boolean isKeepFileVersionLabel(long fileEntryId,
216                    com.liferay.portal.service.ServiceContext serviceContext)
217                    throws PortalException;
218    
219            public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
220                    long fileEntryId, long newFolderId,
221                    com.liferay.portal.service.ServiceContext serviceContext)
222                    throws PortalException;
223    
224            public com.liferay.portal.kernel.lock.Lock refreshFileEntryLock(
225                    java.lang.String lockUuid, long companyId, long expirationTime)
226                    throws PortalException;
227    
228            public void revertFileEntry(long fileEntryId, java.lang.String version,
229                    com.liferay.portal.service.ServiceContext serviceContext)
230                    throws PortalException;
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public com.liferay.portal.kernel.search.Hits search(long groupId,
234                    long creatorUserId, long folderId, java.lang.String[] mimeTypes,
235                    int status, int start, int end) throws PortalException;
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public com.liferay.portal.kernel.search.Hits search(long groupId,
239                    long creatorUserId, int status, int start, int end)
240                    throws PortalException;
241    
242            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
243                    long fileEntryId, java.lang.String sourceFileName,
244                    java.lang.String mimeType, java.lang.String title,
245                    java.lang.String description, java.lang.String changeLog,
246                    boolean majorVersion, long fileEntryTypeId,
247                    java.util.Map<java.lang.String, com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap,
248                    java.io.File file, java.io.InputStream is, long size,
249                    com.liferay.portal.service.ServiceContext serviceContext)
250                    throws PortalException;
251    
252            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateStatus(
253                    long userId, long fileVersionId, int status,
254                    com.liferay.portal.service.ServiceContext serviceContext,
255                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
256                    throws PortalException;
257    
258            public boolean verifyFileEntryCheckOut(long fileEntryId,
259                    java.lang.String lockUuid) throws PortalException;
260    
261            public boolean verifyFileEntryLock(long fileEntryId,
262                    java.lang.String lockUuid) throws PortalException;
263    }