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.document.library.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.document.library.kernel.model.DLFileEntry;
020    import com.liferay.document.library.kernel.model.DLFileVersion;
021    
022    import com.liferay.dynamic.data.mapping.kernel.DDMFormValues;
023    
024    import com.liferay.exportimport.kernel.lar.PortletDataContext;
025    
026    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
029    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.dao.orm.QueryDefinition;
032    import com.liferay.portal.kernel.exception.PortalException;
033    import com.liferay.portal.kernel.exception.SystemException;
034    import com.liferay.portal.kernel.increment.BufferedIncrement;
035    import com.liferay.portal.kernel.lock.Lock;
036    import com.liferay.portal.kernel.model.PersistedModel;
037    import com.liferay.portal.kernel.model.SystemEventConstants;
038    import com.liferay.portal.kernel.search.Hits;
039    import com.liferay.portal.kernel.search.Indexable;
040    import com.liferay.portal.kernel.search.IndexableType;
041    import com.liferay.portal.kernel.service.BaseLocalService;
042    import com.liferay.portal.kernel.service.PersistedModelLocalService;
043    import com.liferay.portal.kernel.service.ServiceContext;
044    import com.liferay.portal.kernel.systemevent.SystemEvent;
045    import com.liferay.portal.kernel.transaction.Isolation;
046    import com.liferay.portal.kernel.transaction.Propagation;
047    import com.liferay.portal.kernel.transaction.Transactional;
048    import com.liferay.portal.kernel.util.DateRange;
049    import com.liferay.portal.kernel.util.OrderByComparator;
050    
051    import java.io.File;
052    import java.io.InputStream;
053    import java.io.Serializable;
054    
055    import java.util.List;
056    import java.util.Map;
057    
058    /**
059     * Provides the local service interface for DLFileEntry. Methods of this
060     * service will not have security checks based on the propagated JAAS
061     * credentials because this service can only be accessed from within the same
062     * VM.
063     *
064     * @author Brian Wing Shun Chan
065     * @see DLFileEntryLocalServiceUtil
066     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryLocalServiceBaseImpl
067     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl
068     * @generated
069     */
070    @ProviderType
071    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
072            PortalException.class, SystemException.class})
073    public interface DLFileEntryLocalService extends BaseLocalService,
074            PersistedModelLocalService {
075            /*
076             * NOTE FOR DEVELOPERS:
077             *
078             * Never modify or reference this interface directly. Always use {@link DLFileEntryLocalServiceUtil} to access the document library file entry local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
079             */
080            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081            public boolean hasExtraSettings();
082    
083            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
084            public boolean hasFileEntryLock(long userId, long fileEntryId)
085                    throws PortalException;
086    
087            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
088            public boolean isFileEntryCheckedOut(long fileEntryId)
089                    throws PortalException;
090    
091            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
092            public boolean isKeepFileVersionLabel(long fileEntryId,
093                    boolean majorVersion, ServiceContext serviceContext)
094                    throws PortalException;
095    
096            /**
097            * As of 7.0.0, replaced by {@link #isKeepFileVersionLabel(long, boolean,
098            * ServiceContext)}
099            */
100            @java.lang.Deprecated
101            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102            public boolean isKeepFileVersionLabel(long fileEntryId,
103                    ServiceContext serviceContext) throws PortalException;
104    
105            public boolean verifyFileEntryCheckOut(long fileEntryId,
106                    java.lang.String lockUuid) throws PortalException;
107    
108            public boolean verifyFileEntryLock(long fileEntryId,
109                    java.lang.String lockUuid) throws PortalException;
110    
111            /**
112            * Adds the document library file entry to the database. Also notifies the appropriate model listeners.
113            *
114            * @param dlFileEntry the document library file entry
115            * @return the document library file entry that was added
116            */
117            @Indexable(type = IndexableType.REINDEX)
118            public DLFileEntry addDLFileEntry(DLFileEntry dlFileEntry);
119    
120            public DLFileEntry addFileEntry(long userId, long groupId,
121                    long repositoryId, long folderId, java.lang.String sourceFileName,
122                    java.lang.String mimeType, java.lang.String title,
123                    java.lang.String description, java.lang.String changeLog,
124                    long fileEntryTypeId,
125                    Map<java.lang.String, DDMFormValues> ddmFormValuesMap, File file,
126                    InputStream is, long size, ServiceContext serviceContext)
127                    throws PortalException;
128    
129            public DLFileEntry checkOutFileEntry(long userId, long fileEntryId,
130                    ServiceContext serviceContext) throws PortalException;
131    
132            public DLFileEntry checkOutFileEntry(long userId, long fileEntryId,
133                    java.lang.String owner, long expirationTime,
134                    ServiceContext serviceContext) throws PortalException;
135    
136            public DLFileEntry copyFileEntry(long userId, long groupId,
137                    long repositoryId, long fileEntryId, long destFolderId,
138                    ServiceContext serviceContext) throws PortalException;
139    
140            /**
141            * Creates a new document library file entry with the primary key. Does not add the document library file entry to the database.
142            *
143            * @param fileEntryId the primary key for the new document library file entry
144            * @return the new document library file entry
145            */
146            public DLFileEntry createDLFileEntry(long fileEntryId);
147    
148            /**
149            * Deletes the document library file entry from the database. Also notifies the appropriate model listeners.
150            *
151            * @param dlFileEntry the document library file entry
152            * @return the document library file entry that was removed
153            */
154            @Indexable(type = IndexableType.DELETE)
155            public DLFileEntry deleteDLFileEntry(DLFileEntry dlFileEntry);
156    
157            /**
158            * Deletes the document library file entry with the primary key from the database. Also notifies the appropriate model listeners.
159            *
160            * @param fileEntryId the primary key of the document library file entry
161            * @return the document library file entry that was removed
162            * @throws PortalException if a document library file entry with the primary key could not be found
163            */
164            @Indexable(type = IndexableType.DELETE)
165            public DLFileEntry deleteDLFileEntry(long fileEntryId)
166                    throws PortalException;
167    
168            @Indexable(type = IndexableType.DELETE)
169            @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
170            public DLFileEntry deleteFileEntry(DLFileEntry dlFileEntry)
171                    throws PortalException;
172    
173            @Indexable(type = IndexableType.DELETE)
174            public DLFileEntry deleteFileEntry(long fileEntryId)
175                    throws PortalException;
176    
177            @Indexable(type = IndexableType.DELETE)
178            public DLFileEntry deleteFileEntry(long userId, long fileEntryId)
179                    throws PortalException;
180    
181            @Indexable(type = IndexableType.REINDEX)
182            public DLFileEntry deleteFileVersion(long userId, long fileEntryId,
183                    java.lang.String version) throws PortalException;
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public DLFileEntry fetchDLFileEntry(long fileEntryId);
187    
188            /**
189            * Returns the document library file entry matching the UUID and group.
190            *
191            * @param uuid the document library file entry's UUID
192            * @param groupId the primary key of the group
193            * @return the matching document library file entry, or <code>null</code> if a matching document library file entry could not be found
194            */
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public DLFileEntry fetchDLFileEntryByUuidAndGroupId(java.lang.String uuid,
197                    long groupId);
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public DLFileEntry fetchFileEntry(long groupId, long folderId,
201                    java.lang.String title);
202    
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public DLFileEntry fetchFileEntryByAnyImageId(long imageId);
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public DLFileEntry fetchFileEntryByFileName(long groupId, long folderId,
208                    java.lang.String fileName);
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public DLFileEntry fetchFileEntryByName(long groupId, long folderId,
212                    java.lang.String name);
213    
214            /**
215            * Returns the document library file entry with the primary key.
216            *
217            * @param fileEntryId the primary key of the document library file entry
218            * @return the document library file entry
219            * @throws PortalException if a document library file entry with the primary key could not be found
220            */
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public DLFileEntry getDLFileEntry(long fileEntryId)
223                    throws PortalException;
224    
225            /**
226            * Returns the document library file entry matching the UUID and group.
227            *
228            * @param uuid the document library file entry's UUID
229            * @param groupId the primary key of the group
230            * @return the matching document library file entry
231            * @throws PortalException if a matching document library file entry could not be found
232            */
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public DLFileEntry getDLFileEntryByUuidAndGroupId(java.lang.String uuid,
235                    long groupId) throws PortalException;
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public DLFileEntry getFileEntry(long fileEntryId) throws PortalException;
239    
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public DLFileEntry getFileEntry(long groupId, long folderId,
242                    java.lang.String title) throws PortalException;
243    
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public DLFileEntry getFileEntryByName(long groupId, long folderId,
246                    java.lang.String name) throws PortalException;
247    
248            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249            public DLFileEntry getFileEntryByUuidAndGroupId(java.lang.String uuid,
250                    long groupId) throws PortalException;
251    
252            @Indexable(type = IndexableType.REINDEX)
253            public DLFileEntry moveFileEntry(long userId, long fileEntryId,
254                    long newFolderId, ServiceContext serviceContext)
255                    throws PortalException;
256    
257            /**
258            * Updates the document library file entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
259            *
260            * @param dlFileEntry the document library file entry
261            * @return the document library file entry that was updated
262            */
263            @Indexable(type = IndexableType.REINDEX)
264            public DLFileEntry updateDLFileEntry(DLFileEntry dlFileEntry);
265    
266            public DLFileEntry updateFileEntry(long userId, long fileEntryId,
267                    java.lang.String sourceFileName, java.lang.String mimeType,
268                    java.lang.String title, java.lang.String description,
269                    java.lang.String changeLog, boolean majorVersion, long fileEntryTypeId,
270                    Map<java.lang.String, DDMFormValues> ddmFormValuesMap, File file,
271                    InputStream is, long size, ServiceContext serviceContext)
272                    throws PortalException;
273    
274            public DLFileEntry updateFileEntryType(long userId, long fileEntryId,
275                    long fileEntryTypeId, ServiceContext serviceContext)
276                    throws PortalException;
277    
278            public DLFileEntry updateStatus(long userId, long fileVersionId,
279                    int status, ServiceContext serviceContext,
280                    Map<java.lang.String, Serializable> workflowContext)
281                    throws PortalException;
282    
283            public DLFileVersion cancelCheckOut(long userId, long fileEntryId)
284                    throws PortalException;
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public ActionableDynamicQuery getActionableDynamicQuery();
288    
289            public DynamicQuery dynamicQuery();
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
293                    PortletDataContext portletDataContext);
294    
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
297    
298            public Lock lockFileEntry(long userId, long fileEntryId)
299                    throws PortalException;
300    
301            /**
302            * @throws PortalException
303            */
304            @Override
305            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
306                    throws PortalException;
307    
308            @Override
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
311                    throws PortalException;
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public Hits search(long groupId, long userId, long creatorUserId,
315                    int status, int start, int end) throws PortalException;
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public Hits search(long groupId, long userId, long creatorUserId,
319                    long folderId, java.lang.String[] mimeTypes, int status, int start,
320                    int end) throws PortalException;
321    
322            /**
323            * Returns the number of document library file entries.
324            *
325            * @return the number of document library file entries
326            */
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public int getDLFileEntriesCount();
329    
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public int getExtraSettingsFileEntriesCount();
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public int getFileEntriesCount();
335    
336            /**
337            * @deprecated As of 7.0.0, with no direct replacement
338            */
339            @java.lang.Deprecated
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public int getFileEntriesCount(long groupId, DateRange dateRange,
342                    long repositoryId, QueryDefinition<DLFileEntry> queryDefinition);
343    
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public int getFileEntriesCount(long groupId, long folderId);
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public int getFileEntriesCount(long groupId, long folderId, int status);
349    
350            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351            public int getFileEntriesCount(long groupId, long userId,
352                    List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
353                    QueryDefinition<DLFileEntry> queryDefinition)
354                    throws java.lang.Exception;
355    
356            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357            public int getFileEntriesCount(long groupId, long userId,
358                    List<java.lang.Long> repositoryIds, List<java.lang.Long> folderIds,
359                    java.lang.String[] mimeTypes,
360                    QueryDefinition<DLFileEntry> queryDefinition)
361                    throws java.lang.Exception;
362    
363            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364            public int getGroupFileEntriesCount(long groupId);
365    
366            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367            public int getGroupFileEntriesCount(long groupId, long userId);
368    
369            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370            public int getRepositoryFileEntriesCount(long repositoryId);
371    
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public File getFile(long fileEntryId, java.lang.String version,
374                    boolean incrementCounter) throws PortalException;
375    
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public File getFile(long fileEntryId, java.lang.String version,
378                    boolean incrementCounter, int increment) throws PortalException;
379    
380            /**
381            * @deprecated As of 7.0.0, replaced by {@link #getFile(long, String,
382            boolean)}
383            */
384            @java.lang.Deprecated
385            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
386            public File getFile(long userId, long fileEntryId,
387                    java.lang.String version, boolean incrementCounter)
388                    throws PortalException;
389    
390            /**
391            * @deprecated As of 7.0.0, replaced by {@link #getFile(long, String,
392            boolean, int)}
393            */
394            @java.lang.Deprecated
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public File getFile(long userId, long fileEntryId,
397                    java.lang.String version, boolean incrementCounter, int increment)
398                    throws PortalException;
399    
400            public InputStream getFileAsStream(long fileEntryId,
401                    java.lang.String version) throws PortalException;
402    
403            public InputStream getFileAsStream(long fileEntryId,
404                    java.lang.String version, boolean incrementCounter)
405                    throws PortalException;
406    
407            public InputStream getFileAsStream(long fileEntryId,
408                    java.lang.String version, boolean incrementCounter, int increment)
409                    throws PortalException;
410    
411            /**
412            * @deprecated As of 7.0.0, replaced by {@link #getFileAsStream(long,
413            String)}
414            */
415            @java.lang.Deprecated
416            public InputStream getFileAsStream(long userId, long fileEntryId,
417                    java.lang.String version) throws PortalException;
418    
419            /**
420            * @deprecated As of 7.0.0, replaced by {@link #getFileAsStream(long,
421            String, boolean)}
422            */
423            @java.lang.Deprecated
424            public InputStream getFileAsStream(long userId, long fileEntryId,
425                    java.lang.String version, boolean incrementCounter)
426                    throws PortalException;
427    
428            /**
429            * @deprecated As of 7.0.0, replaced by {@link #getFileAsStream(long,
430            String, boolean, int)}
431            */
432            @java.lang.Deprecated
433            public InputStream getFileAsStream(long userId, long fileEntryId,
434                    java.lang.String version, boolean incrementCounter, int increment)
435                    throws PortalException;
436    
437            /**
438            * Returns the OSGi service identifier.
439            *
440            * @return the OSGi service identifier
441            */
442            public java.lang.String getOSGiServiceIdentifier();
443    
444            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
445            public java.lang.String getUniqueTitle(long groupId, long folderId,
446                    long fileEntryId, java.lang.String title, java.lang.String extension)
447                    throws PortalException;
448    
449            /**
450            * Performs a dynamic query on the database and returns the matching rows.
451            *
452            * @param dynamicQuery the dynamic query
453            * @return the matching rows
454            */
455            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
456    
457            /**
458            * Performs a dynamic query on the database and returns a range of the matching rows.
459            *
460            * <p>
461            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
462            * </p>
463            *
464            * @param dynamicQuery the dynamic query
465            * @param start the lower bound of the range of model instances
466            * @param end the upper bound of the range of model instances (not inclusive)
467            * @return the range of matching rows
468            */
469            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
470                    int end);
471    
472            /**
473            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
474            *
475            * <p>
476            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
477            * </p>
478            *
479            * @param dynamicQuery the dynamic query
480            * @param start the lower bound of the range of model instances
481            * @param end the upper bound of the range of model instances (not inclusive)
482            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
483            * @return the ordered range of matching rows
484            */
485            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
486                    int end, OrderByComparator<T> orderByComparator);
487    
488            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
489            public List<DLFileEntry> getDDMStructureFileEntries(long groupId,
490                    long[] ddmStructureIds);
491    
492            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
493            public List<DLFileEntry> getDDMStructureFileEntries(long[] ddmStructureIds);
494    
495            /**
496            * Returns a range of all the document library file entries.
497            *
498            * <p>
499            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
500            * </p>
501            *
502            * @param start the lower bound of the range of document library file entries
503            * @param end the upper bound of the range of document library file entries (not inclusive)
504            * @return the range of document library file entries
505            */
506            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
507            public List<DLFileEntry> getDLFileEntries(int start, int end);
508    
509            /**
510            * Returns all the document library file entries matching the UUID and company.
511            *
512            * @param uuid the UUID of the document library file entries
513            * @param companyId the primary key of the company
514            * @return the matching document library file entries, or an empty list if no matches were found
515            */
516            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
517            public List<DLFileEntry> getDLFileEntriesByUuidAndCompanyId(
518                    java.lang.String uuid, long companyId);
519    
520            /**
521            * Returns a range of document library file entries matching the UUID and company.
522            *
523            * @param uuid the UUID of the document library file entries
524            * @param companyId the primary key of the company
525            * @param start the lower bound of the range of document library file entries
526            * @param end the upper bound of the range of document library file entries (not inclusive)
527            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
528            * @return the range of matching document library file entries, or an empty list if no matches were found
529            */
530            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
531            public List<DLFileEntry> getDLFileEntriesByUuidAndCompanyId(
532                    java.lang.String uuid, long companyId, int start, int end,
533                    OrderByComparator<DLFileEntry> orderByComparator);
534    
535            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
536            public List<DLFileEntry> getExtraSettingsFileEntries(int start, int end);
537    
538            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
539            public List<DLFileEntry> getFileEntries(int start, int end);
540    
541            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
542            public List<DLFileEntry> getFileEntries(long folderId, java.lang.String name);
543    
544            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
545            public List<DLFileEntry> getFileEntries(long groupId, long folderId);
546    
547            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
548            public List<DLFileEntry> getFileEntries(long groupId, long folderId,
549                    int start, int end, OrderByComparator<DLFileEntry> obc);
550    
551            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
552            public List<DLFileEntry> getFileEntries(long groupId, long folderId,
553                    int status, int start, int end, OrderByComparator<DLFileEntry> obc);
554    
555            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
556            public List<DLFileEntry> getFileEntries(long groupId, long userId,
557                    List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
558                    QueryDefinition<DLFileEntry> queryDefinition)
559                    throws java.lang.Exception;
560    
561            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
562            public List<DLFileEntry> getFileEntries(long groupId, long userId,
563                    List<java.lang.Long> repositoryIds, List<java.lang.Long> folderIds,
564                    java.lang.String[] mimeTypes,
565                    QueryDefinition<DLFileEntry> queryDefinition)
566                    throws java.lang.Exception;
567    
568            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
569            public List<DLFileEntry> getGroupFileEntries(long groupId, int start,
570                    int end);
571    
572            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
573            public List<DLFileEntry> getGroupFileEntries(long groupId, int start,
574                    int end, OrderByComparator<DLFileEntry> obc);
575    
576            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
577            public List<DLFileEntry> getGroupFileEntries(long groupId, long userId,
578                    int start, int end);
579    
580            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
581            public List<DLFileEntry> getGroupFileEntries(long groupId, long userId,
582                    int start, int end, OrderByComparator<DLFileEntry> obc);
583    
584            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
585            public List<DLFileEntry> getGroupFileEntries(long groupId, long userId,
586                    long repositoryId, long rootFolderId, int start, int end,
587                    OrderByComparator<DLFileEntry> obc);
588    
589            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
590            public List<DLFileEntry> getGroupFileEntries(long groupId, long userId,
591                    long rootFolderId, int start, int end,
592                    OrderByComparator<DLFileEntry> obc);
593    
594            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
595            public List<DLFileEntry> getMisversionedFileEntries();
596    
597            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
598            public List<DLFileEntry> getNoAssetFileEntries();
599    
600            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
601            public List<DLFileEntry> getOrphanedFileEntries();
602    
603            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
604            public List<DLFileEntry> getRepositoryFileEntries(long repositoryId,
605                    int start, int end);
606    
607            /**
608            * Returns the number of rows matching the dynamic query.
609            *
610            * @param dynamicQuery the dynamic query
611            * @return the number of rows matching the dynamic query
612            */
613            public long dynamicQueryCount(DynamicQuery dynamicQuery);
614    
615            /**
616            * Returns the number of rows matching the dynamic query.
617            *
618            * @param dynamicQuery the dynamic query
619            * @param projection the projection to apply to the query
620            * @return the number of rows matching the dynamic query
621            */
622            public long dynamicQueryCount(DynamicQuery dynamicQuery,
623                    Projection projection);
624    
625            public void checkInFileEntry(long userId, long fileEntryId,
626                    boolean majorVersion, java.lang.String changeLog,
627                    ServiceContext serviceContext) throws PortalException;
628    
629            public void checkInFileEntry(long userId, long fileEntryId,
630                    java.lang.String lockUuid, ServiceContext serviceContext)
631                    throws PortalException;
632    
633            public void convertExtraSettings(java.lang.String[] keys)
634                    throws PortalException;
635    
636            public void copyFileEntryMetadata(long companyId, long fileEntryTypeId,
637                    long fileEntryId, long fromFileVersionId, long toFileVersionId,
638                    ServiceContext serviceContext) throws PortalException;
639    
640            public void deleteFileEntries(long groupId, long folderId)
641                    throws PortalException;
642    
643            public void deleteFileEntries(long groupId, long folderId,
644                    boolean includeTrashedEntries) throws PortalException;
645    
646            public void deleteRepositoryFileEntries(long repositoryId, long folderId)
647                    throws PortalException;
648    
649            public void deleteRepositoryFileEntries(long repositoryId, long folderId,
650                    boolean includeTrashedEntries) throws PortalException;
651    
652            @BufferedIncrement(configuration = "DLFileEntry", incrementClass = com.liferay.portal.kernel.increment.NumberIncrement.class)
653            public void incrementViewCounter(DLFileEntry dlFileEntry, int increment);
654    
655            public void rebuildTree(long companyId) throws PortalException;
656    
657            public void revertFileEntry(long userId, long fileEntryId,
658                    java.lang.String version, ServiceContext serviceContext)
659                    throws PortalException;
660    
661            public void setTreePaths(long folderId, java.lang.String treePath,
662                    boolean reindex) throws PortalException;
663    
664            public void unlockFileEntry(long fileEntryId);
665    
666            public void updateSmallImage(long smallImageId, long largeImageId)
667                    throws PortalException;
668    
669            public void validateFile(long groupId, long folderId, long fileEntryId,
670                    java.lang.String fileName, java.lang.String title)
671                    throws PortalException;
672    }