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