001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for DLFileEntryType. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see DLFileEntryTypeLocalServiceUtil
037     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryTypeLocalServiceBaseImpl
038     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface DLFileEntryTypeLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link DLFileEntryTypeLocalServiceUtil} to access the document library file entry type local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public void addDDMStructureLinks(long fileEntryTypeId,
052                    java.util.Set<java.lang.Long> ddmStructureIds);
053    
054            /**
055            * Adds the document library file entry type to the database. Also notifies the appropriate model listeners.
056            *
057            * @param dlFileEntryType the document library file entry type
058            * @return the document library file entry type that was added
059            */
060            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
061            public com.liferay.portlet.documentlibrary.model.DLFileEntryType addDLFileEntryType(
062                    com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType);
063    
064            public void addDLFolderDLFileEntryType(long folderId,
065                    com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType);
066    
067            public void addDLFolderDLFileEntryType(long folderId, long fileEntryTypeId);
068    
069            public void addDLFolderDLFileEntryTypes(long folderId,
070                    java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> DLFileEntryTypes);
071    
072            public void addDLFolderDLFileEntryTypes(long folderId,
073                    long[] fileEntryTypeIds);
074    
075            public com.liferay.portlet.documentlibrary.model.DLFileEntryType addFileEntryType(
076                    long userId, long groupId, java.lang.String fileEntryTypeKey,
077                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
078                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
079                    long[] ddmStructureIds,
080                    com.liferay.portal.service.ServiceContext serviceContext)
081                    throws PortalException;
082    
083            public com.liferay.portlet.documentlibrary.model.DLFileEntryType addFileEntryType(
084                    long userId, long groupId, java.lang.String name,
085                    java.lang.String description, long[] ddmStructureIds,
086                    com.liferay.portal.service.ServiceContext serviceContext)
087                    throws PortalException;
088    
089            public void cascadeFileEntryTypes(long userId,
090                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
091                    throws PortalException;
092    
093            public void clearDLFolderDLFileEntryTypes(long folderId);
094    
095            /**
096            * Creates a new document library file entry type with the primary key. Does not add the document library file entry type to the database.
097            *
098            * @param fileEntryTypeId the primary key for the new document library file entry type
099            * @return the new document library file entry type
100            */
101            public com.liferay.portlet.documentlibrary.model.DLFileEntryType createDLFileEntryType(
102                    long fileEntryTypeId);
103    
104            /**
105            * Deletes the document library file entry type from the database. Also notifies the appropriate model listeners.
106            *
107            * @param dlFileEntryType the document library file entry type
108            * @return the document library file entry type that was removed
109            */
110            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
111            public com.liferay.portlet.documentlibrary.model.DLFileEntryType deleteDLFileEntryType(
112                    com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType);
113    
114            /**
115            * Deletes the document library file entry type with the primary key from the database. Also notifies the appropriate model listeners.
116            *
117            * @param fileEntryTypeId the primary key of the document library file entry type
118            * @return the document library file entry type that was removed
119            * @throws PortalException if a document library file entry type with the primary key could not be found
120            */
121            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
122            public com.liferay.portlet.documentlibrary.model.DLFileEntryType deleteDLFileEntryType(
123                    long fileEntryTypeId) throws PortalException;
124    
125            public void deleteDLFolderDLFileEntryType(long folderId,
126                    com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType);
127    
128            public void deleteDLFolderDLFileEntryType(long folderId,
129                    long fileEntryTypeId);
130    
131            public void deleteDLFolderDLFileEntryTypes(long folderId,
132                    java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> DLFileEntryTypes);
133    
134            public void deleteDLFolderDLFileEntryTypes(long folderId,
135                    long[] fileEntryTypeIds);
136    
137            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
138            public void deleteFileEntryType(
139                    com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType)
140                    throws PortalException;
141    
142            public void deleteFileEntryType(long fileEntryTypeId)
143                    throws PortalException;
144    
145            public void deleteFileEntryTypes(long groupId) throws PortalException;
146    
147            /**
148            * @throws PortalException
149            */
150            @Override
151            public com.liferay.portal.model.PersistedModel deletePersistedModel(
152                    com.liferay.portal.model.PersistedModel persistedModel)
153                    throws PortalException;
154    
155            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
156    
157            /**
158            * Performs a dynamic query on the database and returns the matching rows.
159            *
160            * @param dynamicQuery the dynamic query
161            * @return the matching rows
162            */
163            public <T> java.util.List<T> dynamicQuery(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
165    
166            /**
167            * Performs a dynamic query on the database and returns a range of the matching rows.
168            *
169            * <p>
170            * 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.DLFileEntryTypeModelImpl}. 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.
171            * </p>
172            *
173            * @param dynamicQuery the dynamic query
174            * @param start the lower bound of the range of model instances
175            * @param end the upper bound of the range of model instances (not inclusive)
176            * @return the range of matching rows
177            */
178            public <T> java.util.List<T> dynamicQuery(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
180                    int end);
181    
182            /**
183            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
184            *
185            * <p>
186            * 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.DLFileEntryTypeModelImpl}. 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.
187            * </p>
188            *
189            * @param dynamicQuery the dynamic query
190            * @param start the lower bound of the range of model instances
191            * @param end the upper bound of the range of model instances (not inclusive)
192            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
193            * @return the ordered range of matching rows
194            */
195            public <T> java.util.List<T> dynamicQuery(
196                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
197                    int end,
198                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
199    
200            /**
201            * Returns the number of rows matching the dynamic query.
202            *
203            * @param dynamicQuery the dynamic query
204            * @return the number of rows matching the dynamic query
205            */
206            public long dynamicQueryCount(
207                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
208    
209            /**
210            * Returns the number of rows matching the dynamic query.
211            *
212            * @param dynamicQuery the dynamic query
213            * @param projection the projection to apply to the query
214            * @return the number of rows matching the dynamic query
215            */
216            public long dynamicQueryCount(
217                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
218                    com.liferay.portal.kernel.dao.orm.Projection projection);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portlet.documentlibrary.model.DLFileEntryType fetchDLFileEntryType(
222                    long fileEntryTypeId);
223    
224            /**
225            * Returns the document library file entry type matching the UUID and group.
226            *
227            * @param uuid the document library file entry type's UUID
228            * @param groupId the primary key of the group
229            * @return the matching document library file entry type, or <code>null</code> if a matching document library file entry type could not be found
230            */
231            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232            public com.liferay.portlet.documentlibrary.model.DLFileEntryType fetchDLFileEntryTypeByUuidAndGroupId(
233                    java.lang.String uuid, long groupId);
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portlet.documentlibrary.model.DLFileEntryType fetchFileEntryType(
237                    long fileEntryTypeId);
238    
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public com.liferay.portlet.documentlibrary.model.DLFileEntryType fetchFileEntryType(
241                    long groupId, java.lang.String fileEntryTypeKey);
242    
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
245    
246            /**
247            * Returns the Spring bean ID for this bean.
248            *
249            * @return the Spring bean ID for this bean
250            */
251            public java.lang.String getBeanIdentifier();
252    
253            /**
254            * Returns the document library file entry type with the primary key.
255            *
256            * @param fileEntryTypeId the primary key of the document library file entry type
257            * @return the document library file entry type
258            * @throws PortalException if a document library file entry type with the primary key could not be found
259            */
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getDLFileEntryType(
262                    long fileEntryTypeId) throws PortalException;
263    
264            /**
265            * Returns the document library file entry type matching the UUID and group.
266            *
267            * @param uuid the document library file entry type's UUID
268            * @param groupId the primary key of the group
269            * @return the matching document library file entry type
270            * @throws PortalException if a matching document library file entry type could not be found
271            */
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getDLFileEntryTypeByUuidAndGroupId(
274                    java.lang.String uuid, long groupId) throws PortalException;
275    
276            /**
277            * Returns a range of all the document library file entry types.
278            *
279            * <p>
280            * 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.DLFileEntryTypeModelImpl}. 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.
281            * </p>
282            *
283            * @param start the lower bound of the range of document library file entry types
284            * @param end the upper bound of the range of document library file entry types (not inclusive)
285            * @return the range of document library file entry types
286            */
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFileEntryTypes(
289                    int start, int end);
290    
291            /**
292            * Returns all the document library file entry types matching the UUID and company.
293            *
294            * @param uuid the UUID of the document library file entry types
295            * @param companyId the primary key of the company
296            * @return the matching document library file entry types, or an empty list if no matches were found
297            */
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFileEntryTypesByUuidAndCompanyId(
300                    java.lang.String uuid, long companyId);
301    
302            /**
303            * Returns a range of document library file entry types matching the UUID and company.
304            *
305            * @param uuid the UUID of the document library file entry types
306            * @param companyId the primary key of the company
307            * @param start the lower bound of the range of document library file entry types
308            * @param end the upper bound of the range of document library file entry types (not inclusive)
309            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
310            * @return the range of matching document library file entry types, or an empty list if no matches were found
311            */
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFileEntryTypesByUuidAndCompanyId(
314                    java.lang.String uuid, long companyId, int start, int end,
315                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntryType> orderByComparator);
316    
317            /**
318            * Returns the number of document library file entry types.
319            *
320            * @return the number of document library file entry types
321            */
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public int getDLFileEntryTypesCount();
324    
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFolderDLFileEntryTypes(
327                    long folderId);
328    
329            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFolderDLFileEntryTypes(
331                    long folderId, int start, int end);
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFolderDLFileEntryTypes(
335                    long folderId, int start, int end,
336                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntryType> orderByComparator);
337    
338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339            public int getDLFolderDLFileEntryTypesCount(long folderId);
340    
341            /**
342            * Returns the folderIds of the document library folders associated with the document library file entry type.
343            *
344            * @param fileEntryTypeId the fileEntryTypeId of the document library file entry type
345            * @return long[] the folderIds of document library folders associated with the document library file entry type
346            */
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public long[] getDLFolderPrimaryKeys(long fileEntryTypeId);
349    
350            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351            public long getDefaultFileEntryTypeId(long folderId)
352                    throws PortalException;
353    
354            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
356                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType(
360                    long fileEntryTypeId) throws PortalException;
361    
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType(
364                    long groupId, java.lang.String fileEntryTypeKey)
365                    throws PortalException;
366    
367            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
368            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getFileEntryTypes(
369                    long ddmStructureId) throws PortalException;
370    
371            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
372            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getFileEntryTypes(
373                    long[] groupIds);
374    
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getFolderFileEntryTypes(
377                    long[] groupIds, long folderId, boolean inherited)
378                    throws PortalException;
379    
380            @Override
381            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
382            public com.liferay.portal.model.PersistedModel getPersistedModel(
383                    java.io.Serializable primaryKeyObj) throws PortalException;
384    
385            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
386            public boolean hasDLFolderDLFileEntryType(long folderId,
387                    long fileEntryTypeId);
388    
389            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390            public boolean hasDLFolderDLFileEntryTypes(long folderId);
391    
392            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> search(
394                    long companyId, long[] groupIds, java.lang.String keywords,
395                    boolean includeBasicFileEntryType, int start, int end,
396                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntryType> orderByComparator);
397    
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public int searchCount(long companyId, long[] groupIds,
400                    java.lang.String keywords, boolean includeBasicFileEntryType);
401    
402            /**
403            * Sets the Spring bean ID for this bean.
404            *
405            * @param beanIdentifier the Spring bean ID for this bean
406            */
407            public void setBeanIdentifier(java.lang.String beanIdentifier);
408    
409            public void setDLFolderDLFileEntryTypes(long folderId,
410                    long[] fileEntryTypeIds);
411    
412            public void unsetFolderFileEntryTypes(long folderId);
413    
414            public void updateDDMStructureLinks(long fileEntryTypeId,
415                    java.util.Set<java.lang.Long> ddmStructureIds)
416                    throws PortalException;
417    
418            /**
419            * Updates the document library file entry type in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
420            *
421            * @param dlFileEntryType the document library file entry type
422            * @return the document library file entry type that was updated
423            */
424            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
425            public com.liferay.portlet.documentlibrary.model.DLFileEntryType updateDLFileEntryType(
426                    com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType);
427    
428            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntryFileEntryType(
429                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
430                    com.liferay.portal.service.ServiceContext serviceContext)
431                    throws PortalException;
432    
433            public void updateFileEntryType(long userId, long fileEntryTypeId,
434                    java.lang.String name, java.lang.String description,
435                    long[] ddmStructureIds,
436                    com.liferay.portal.service.ServiceContext serviceContext)
437                    throws PortalException;
438    
439            public void updateFileEntryType(long userId, long fileEntryTypeId,
440                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
441                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
442                    long[] ddmStructureIds,
443                    com.liferay.portal.service.ServiceContext serviceContext)
444                    throws PortalException;
445    
446            public void updateFolderFileEntryTypes(
447                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
448                    java.util.List<java.lang.Long> fileEntryTypeIds,
449                    long defaultFileEntryTypeId,
450                    com.liferay.portal.service.ServiceContext serviceContext);
451    }