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