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.DLFileVersion;
020    
021    import com.liferay.exportimport.kernel.lar.PortletDataContext;
022    
023    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.Projection;
028    import com.liferay.portal.kernel.exception.PortalException;
029    import com.liferay.portal.kernel.exception.SystemException;
030    import com.liferay.portal.kernel.model.PersistedModel;
031    import com.liferay.portal.kernel.search.Indexable;
032    import com.liferay.portal.kernel.search.IndexableType;
033    import com.liferay.portal.kernel.service.BaseLocalService;
034    import com.liferay.portal.kernel.service.PersistedModelLocalService;
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.OrderByComparator;
039    
040    import java.io.Serializable;
041    
042    import java.util.List;
043    
044    /**
045     * Provides the local service interface for DLFileVersion. Methods of this
046     * service will not have security checks based on the propagated JAAS
047     * credentials because this service can only be accessed from within the same
048     * VM.
049     *
050     * @author Brian Wing Shun Chan
051     * @see DLFileVersionLocalServiceUtil
052     * @see com.liferay.portlet.documentlibrary.service.base.DLFileVersionLocalServiceBaseImpl
053     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl
054     * @generated
055     */
056    @ProviderType
057    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
058            PortalException.class, SystemException.class})
059    public interface DLFileVersionLocalService extends BaseLocalService,
060            PersistedModelLocalService {
061            /*
062             * NOTE FOR DEVELOPERS:
063             *
064             * Never modify or reference this interface directly. Always use {@link DLFileVersionLocalServiceUtil} to access the document library file version local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
065             */
066    
067            /**
068            * Adds the document library file version to the database. Also notifies the appropriate model listeners.
069            *
070            * @param dlFileVersion the document library file version
071            * @return the document library file version that was added
072            */
073            @Indexable(type = IndexableType.REINDEX)
074            public DLFileVersion addDLFileVersion(DLFileVersion dlFileVersion);
075    
076            /**
077            * Creates a new document library file version with the primary key. Does not add the document library file version to the database.
078            *
079            * @param fileVersionId the primary key for the new document library file version
080            * @return the new document library file version
081            */
082            public DLFileVersion createDLFileVersion(long fileVersionId);
083    
084            /**
085            * Deletes the document library file version from the database. Also notifies the appropriate model listeners.
086            *
087            * @param dlFileVersion the document library file version
088            * @return the document library file version that was removed
089            */
090            @Indexable(type = IndexableType.DELETE)
091            public DLFileVersion deleteDLFileVersion(DLFileVersion dlFileVersion);
092    
093            /**
094            * Deletes the document library file version with the primary key from the database. Also notifies the appropriate model listeners.
095            *
096            * @param fileVersionId the primary key of the document library file version
097            * @return the document library file version that was removed
098            * @throws PortalException if a document library file version with the primary key could not be found
099            */
100            @Indexable(type = IndexableType.DELETE)
101            public DLFileVersion deleteDLFileVersion(long fileVersionId)
102                    throws PortalException;
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public DLFileVersion fetchDLFileVersion(long fileVersionId);
106    
107            /**
108            * Returns the document library file version matching the UUID and group.
109            *
110            * @param uuid the document library file version's UUID
111            * @param groupId the primary key of the group
112            * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found
113            */
114            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115            public DLFileVersion fetchDLFileVersionByUuidAndGroupId(
116                    java.lang.String uuid, long groupId);
117    
118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119            public DLFileVersion fetchLatestFileVersion(long fileEntryId,
120                    boolean excludeWorkingCopy);
121    
122            /**
123            * Returns the document library file version with the primary key.
124            *
125            * @param fileVersionId the primary key of the document library file version
126            * @return the document library file version
127            * @throws PortalException if a document library file version with the primary key could not be found
128            */
129            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130            public DLFileVersion getDLFileVersion(long fileVersionId)
131                    throws PortalException;
132    
133            /**
134            * Returns the document library file version matching the UUID and group.
135            *
136            * @param uuid the document library file version's UUID
137            * @param groupId the primary key of the group
138            * @return the matching document library file version
139            * @throws PortalException if a matching document library file version could not be found
140            */
141            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142            public DLFileVersion getDLFileVersionByUuidAndGroupId(
143                    java.lang.String uuid, long groupId) throws PortalException;
144    
145            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146            public DLFileVersion getFileVersion(long fileEntryId,
147                    java.lang.String version) throws PortalException;
148    
149            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150            public DLFileVersion getFileVersion(long fileVersionId)
151                    throws PortalException;
152    
153            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154            public DLFileVersion getFileVersionByUuidAndGroupId(java.lang.String uuid,
155                    long groupId);
156    
157            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158            public DLFileVersion getLatestFileVersion(long fileEntryId,
159                    boolean excludeWorkingCopy) throws PortalException;
160    
161            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162            public DLFileVersion getLatestFileVersion(long userId, long fileEntryId)
163                    throws PortalException;
164    
165            /**
166            * Updates the document library file version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
167            *
168            * @param dlFileVersion the document library file version
169            * @return the document library file version that was updated
170            */
171            @Indexable(type = IndexableType.REINDEX)
172            public DLFileVersion updateDLFileVersion(DLFileVersion dlFileVersion);
173    
174            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175            public ActionableDynamicQuery getActionableDynamicQuery();
176    
177            public DynamicQuery dynamicQuery();
178    
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
181                    PortletDataContext portletDataContext);
182    
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
185    
186            /**
187            * @throws PortalException
188            */
189            @Override
190            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
191                    throws PortalException;
192    
193            @Override
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
196                    throws PortalException;
197    
198            /**
199            * Returns the number of document library file versions.
200            *
201            * @return the number of document library file versions
202            */
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public int getDLFileVersionsCount();
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public int getFileVersionsCount(long fileEntryId, int status);
208    
209            /**
210            * Returns the OSGi service identifier.
211            *
212            * @return the OSGi service identifier
213            */
214            public java.lang.String getOSGiServiceIdentifier();
215    
216            /**
217            * Performs a dynamic query on the database and returns the matching rows.
218            *
219            * @param dynamicQuery the dynamic query
220            * @return the matching rows
221            */
222            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
223    
224            /**
225            * Performs a dynamic query on the database and returns a range of the matching rows.
226            *
227            * <p>
228            * 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.DLFileVersionModelImpl}. 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.
229            * </p>
230            *
231            * @param dynamicQuery the dynamic query
232            * @param start the lower bound of the range of model instances
233            * @param end the upper bound of the range of model instances (not inclusive)
234            * @return the range of matching rows
235            */
236            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
237                    int end);
238    
239            /**
240            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
241            *
242            * <p>
243            * 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.DLFileVersionModelImpl}. 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.
244            * </p>
245            *
246            * @param dynamicQuery the dynamic query
247            * @param start the lower bound of the range of model instances
248            * @param end the upper bound of the range of model instances (not inclusive)
249            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
250            * @return the ordered range of matching rows
251            */
252            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
253                    int end, OrderByComparator<T> orderByComparator);
254    
255            /**
256            * Returns a range of all the document library file versions.
257            *
258            * <p>
259            * 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.DLFileVersionModelImpl}. 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.
260            * </p>
261            *
262            * @param start the lower bound of the range of document library file versions
263            * @param end the upper bound of the range of document library file versions (not inclusive)
264            * @return the range of document library file versions
265            */
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public List<DLFileVersion> getDLFileVersions(int start, int end);
268    
269            /**
270            * Returns all the document library file versions matching the UUID and company.
271            *
272            * @param uuid the UUID of the document library file versions
273            * @param companyId the primary key of the company
274            * @return the matching document library file versions, or an empty list if no matches were found
275            */
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public List<DLFileVersion> getDLFileVersionsByUuidAndCompanyId(
278                    java.lang.String uuid, long companyId);
279    
280            /**
281            * Returns a range of document library file versions matching the UUID and company.
282            *
283            * @param uuid the UUID of the document library file versions
284            * @param companyId the primary key of the company
285            * @param start the lower bound of the range of document library file versions
286            * @param end the upper bound of the range of document library file versions (not inclusive)
287            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
288            * @return the range of matching document library file versions, or an empty list if no matches were found
289            */
290            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291            public List<DLFileVersion> getDLFileVersionsByUuidAndCompanyId(
292                    java.lang.String uuid, long companyId, int start, int end,
293                    OrderByComparator<DLFileVersion> orderByComparator);
294    
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public List<DLFileVersion> getFileVersions(long fileEntryId, int status);
297    
298            /**
299            * Returns the number of rows matching the dynamic query.
300            *
301            * @param dynamicQuery the dynamic query
302            * @return the number of rows matching the dynamic query
303            */
304            public long dynamicQueryCount(DynamicQuery dynamicQuery);
305    
306            /**
307            * Returns the number of rows matching the dynamic query.
308            *
309            * @param dynamicQuery the dynamic query
310            * @param projection the projection to apply to the query
311            * @return the number of rows matching the dynamic query
312            */
313            public long dynamicQueryCount(DynamicQuery dynamicQuery,
314                    Projection projection);
315    
316            public void rebuildTree(long companyId) throws PortalException;
317    
318            public void setTreePaths(long folderId, java.lang.String treePath)
319                    throws PortalException;
320    }