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