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