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 document library file entry type with the primary key.
248            *
249            * @param fileEntryTypeId the primary key of the document library file entry type
250            * @return the document library file entry type
251            * @throws PortalException if a document library file entry type with the primary key could not be found
252            */
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getDLFileEntryType(
255                    long fileEntryTypeId) throws PortalException;
256    
257            /**
258            * Returns the document library file entry type matching the UUID and group.
259            *
260            * @param uuid the document library file entry type's UUID
261            * @param groupId the primary key of the group
262            * @return the matching document library file entry type
263            * @throws PortalException if a matching document library file entry type could not be found
264            */
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getDLFileEntryTypeByUuidAndGroupId(
267                    java.lang.String uuid, long groupId) throws PortalException;
268    
269            /**
270            * Returns a range of all the document library file entry types.
271            *
272            * <p>
273            * 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.
274            * </p>
275            *
276            * @param start the lower bound of the range of document library file entry types
277            * @param end the upper bound of the range of document library file entry types (not inclusive)
278            * @return the range of document library file entry types
279            */
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFileEntryTypes(
282                    int start, int end);
283    
284            /**
285            * Returns all the document library file entry types matching the UUID and company.
286            *
287            * @param uuid the UUID of the document library file entry types
288            * @param companyId the primary key of the company
289            * @return the matching document library file entry types, or an empty list if no matches were found
290            */
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFileEntryTypesByUuidAndCompanyId(
293                    java.lang.String uuid, long companyId);
294    
295            /**
296            * Returns a range of document library file entry types matching the UUID and company.
297            *
298            * @param uuid the UUID of the document library file entry types
299            * @param companyId the primary key of the company
300            * @param start the lower bound of the range of document library file entry types
301            * @param end the upper bound of the range of document library file entry types (not inclusive)
302            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
303            * @return the range of matching document library file entry types, or an empty list if no matches were found
304            */
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFileEntryTypesByUuidAndCompanyId(
307                    java.lang.String uuid, long companyId, int start, int end,
308                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntryType> orderByComparator);
309    
310            /**
311            * Returns the number of document library file entry types.
312            *
313            * @return the number of document library file entry types
314            */
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public int getDLFileEntryTypesCount();
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFolderDLFileEntryTypes(
320                    long folderId);
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFolderDLFileEntryTypes(
324                    long folderId, int start, int end);
325    
326            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getDLFolderDLFileEntryTypes(
328                    long folderId, int start, int end,
329                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntryType> orderByComparator);
330    
331            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332            public int getDLFolderDLFileEntryTypesCount(long folderId);
333    
334            /**
335            * Returns the folderIds of the document library folders associated with the document library file entry type.
336            *
337            * @param fileEntryTypeId the fileEntryTypeId of the document library file entry type
338            * @return long[] the folderIds of document library folders associated with the document library file entry type
339            */
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public long[] getDLFolderPrimaryKeys(long fileEntryTypeId);
342    
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public long getDefaultFileEntryTypeId(long folderId)
345                    throws PortalException;
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
349                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
350    
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType(
353                    long fileEntryTypeId) throws PortalException;
354    
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType(
357                    long groupId, java.lang.String fileEntryTypeKey)
358                    throws PortalException;
359    
360            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getFileEntryTypes(
362                    long ddmStructureId) throws PortalException;
363    
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getFileEntryTypes(
366                    long[] groupIds);
367    
368            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getFolderFileEntryTypes(
370                    long[] groupIds, long folderId, boolean inherited)
371                    throws PortalException;
372    
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
375    
376            /**
377            * Returns the OSGi service identifier.
378            *
379            * @return the OSGi service identifier
380            */
381            public java.lang.String getOSGiServiceIdentifier();
382    
383            @Override
384            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
385            public com.liferay.portal.model.PersistedModel getPersistedModel(
386                    java.io.Serializable primaryKeyObj) throws PortalException;
387    
388            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
389            public boolean hasDLFolderDLFileEntryType(long folderId,
390                    long fileEntryTypeId);
391    
392            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393            public boolean hasDLFolderDLFileEntryTypes(long folderId);
394    
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> search(
397                    long companyId, long[] groupIds, java.lang.String keywords,
398                    boolean includeBasicFileEntryType, int start, int end,
399                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntryType> orderByComparator);
400    
401            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402            public int searchCount(long companyId, long[] groupIds,
403                    java.lang.String keywords, boolean includeBasicFileEntryType);
404    
405            public void setDLFolderDLFileEntryTypes(long folderId,
406                    long[] fileEntryTypeIds);
407    
408            public void unsetFolderFileEntryTypes(long folderId);
409    
410            public void updateDDMStructureLinks(long fileEntryTypeId,
411                    java.util.Set<java.lang.Long> ddmStructureIds)
412                    throws PortalException;
413    
414            /**
415            * 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.
416            *
417            * @param dlFileEntryType the document library file entry type
418            * @return the document library file entry type that was updated
419            */
420            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
421            public com.liferay.portlet.documentlibrary.model.DLFileEntryType updateDLFileEntryType(
422                    com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType);
423    
424            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntryFileEntryType(
425                    com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
426                    com.liferay.portal.service.ServiceContext serviceContext)
427                    throws PortalException;
428    
429            public void updateFileEntryType(long userId, long fileEntryTypeId,
430                    java.lang.String name, java.lang.String description,
431                    long[] ddmStructureIds,
432                    com.liferay.portal.service.ServiceContext serviceContext)
433                    throws PortalException;
434    
435            public void updateFileEntryType(long userId, long fileEntryTypeId,
436                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
437                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
438                    long[] ddmStructureIds,
439                    com.liferay.portal.service.ServiceContext serviceContext)
440                    throws PortalException;
441    
442            public void updateFolderFileEntryTypes(
443                    com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
444                    java.util.List<java.lang.Long> fileEntryTypeIds,
445                    long defaultFileEntryTypeId,
446                    com.liferay.portal.service.ServiceContext serviceContext);
447    }