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.journal.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 JournalFolder. 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 JournalFolderLocalServiceUtil
037     * @see com.liferay.portlet.journal.service.base.JournalFolderLocalServiceBaseImpl
038     * @see com.liferay.portlet.journal.service.impl.JournalFolderLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface JournalFolderLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link JournalFolderLocalServiceUtil} to access the journal folder local service. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalFolderLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public com.liferay.portlet.journal.model.JournalFolder addFolder(
052                    long userId, long groupId, long parentFolderId, java.lang.String name,
053                    java.lang.String description,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws PortalException;
056    
057            /**
058            * Adds the journal folder to the database. Also notifies the appropriate model listeners.
059            *
060            * @param journalFolder the journal folder
061            * @return the journal folder that was added
062            */
063            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
064            public com.liferay.portlet.journal.model.JournalFolder addJournalFolder(
065                    com.liferay.portlet.journal.model.JournalFolder journalFolder);
066    
067            /**
068            * Creates a new journal folder with the primary key. Does not add the journal folder to the database.
069            *
070            * @param folderId the primary key for the new journal folder
071            * @return the new journal folder
072            */
073            public com.liferay.portlet.journal.model.JournalFolder createJournalFolder(
074                    long folderId);
075    
076            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
077            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
078            public com.liferay.portlet.journal.model.JournalFolder deleteFolder(
079                    com.liferay.portlet.journal.model.JournalFolder folder)
080                    throws PortalException;
081    
082            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
083            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
084            public com.liferay.portlet.journal.model.JournalFolder deleteFolder(
085                    com.liferay.portlet.journal.model.JournalFolder folder,
086                    boolean includeTrashedEntries) throws PortalException;
087    
088            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
089            public com.liferay.portlet.journal.model.JournalFolder deleteFolder(
090                    long folderId) throws PortalException;
091    
092            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
093            public com.liferay.portlet.journal.model.JournalFolder deleteFolder(
094                    long folderId, boolean includeTrashedEntries) throws PortalException;
095    
096            public void deleteFolders(long groupId) throws PortalException;
097    
098            /**
099            * Deletes the journal folder with the primary key from the database. Also notifies the appropriate model listeners.
100            *
101            * @param folderId the primary key of the journal folder
102            * @return the journal folder that was removed
103            * @throws PortalException if a journal folder with the primary key could not be found
104            */
105            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
106            public com.liferay.portlet.journal.model.JournalFolder deleteJournalFolder(
107                    long folderId) throws PortalException;
108    
109            /**
110            * Deletes the journal folder from the database. Also notifies the appropriate model listeners.
111            *
112            * @param journalFolder the journal folder
113            * @return the journal folder that was removed
114            */
115            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
116            public com.liferay.portlet.journal.model.JournalFolder deleteJournalFolder(
117                    com.liferay.portlet.journal.model.JournalFolder journalFolder);
118    
119            /**
120            * @throws PortalException
121            */
122            @Override
123            public com.liferay.portal.model.PersistedModel deletePersistedModel(
124                    com.liferay.portal.model.PersistedModel persistedModel)
125                    throws PortalException;
126    
127            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
128    
129            /**
130            * Performs a dynamic query on the database and returns the matching rows.
131            *
132            * @param dynamicQuery the dynamic query
133            * @return the matching rows
134            */
135            public <T> java.util.List<T> dynamicQuery(
136                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
137    
138            /**
139            * Performs a dynamic query on the database and returns a range of the matching rows.
140            *
141            * <p>
142            * 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.journal.model.impl.JournalFolderModelImpl}. 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.
143            * </p>
144            *
145            * @param dynamicQuery the dynamic query
146            * @param start the lower bound of the range of model instances
147            * @param end the upper bound of the range of model instances (not inclusive)
148            * @return the range of matching rows
149            */
150            public <T> java.util.List<T> dynamicQuery(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
152                    int end);
153    
154            /**
155            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
156            *
157            * <p>
158            * 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.journal.model.impl.JournalFolderModelImpl}. 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.
159            * </p>
160            *
161            * @param dynamicQuery the dynamic query
162            * @param start the lower bound of the range of model instances
163            * @param end the upper bound of the range of model instances (not inclusive)
164            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
165            * @return the ordered range of matching rows
166            */
167            public <T> java.util.List<T> dynamicQuery(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
169                    int end,
170                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
171    
172            /**
173            * Returns the number of rows matching the dynamic query.
174            *
175            * @param dynamicQuery the dynamic query
176            * @return the number of rows matching the dynamic query
177            */
178            public long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
180    
181            /**
182            * Returns the number of rows matching the dynamic query.
183            *
184            * @param dynamicQuery the dynamic query
185            * @param projection the projection to apply to the query
186            * @return the number of rows matching the dynamic query
187            */
188            public long dynamicQueryCount(
189                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
190                    com.liferay.portal.kernel.dao.orm.Projection projection);
191    
192            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193            public com.liferay.portlet.journal.model.JournalFolder fetchFolder(
194                    long folderId);
195    
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public com.liferay.portlet.journal.model.JournalFolder fetchFolder(
198                    long groupId, java.lang.String name);
199    
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public com.liferay.portlet.journal.model.JournalFolder fetchFolder(
202                    long groupId, long parentFolderId, java.lang.String name);
203    
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public com.liferay.portlet.journal.model.JournalFolder fetchJournalFolder(
206                    long folderId);
207    
208            /**
209            * Returns the journal folder matching the UUID and group.
210            *
211            * @param uuid the journal folder's UUID
212            * @param groupId the primary key of the group
213            * @return the matching journal folder, or <code>null</code> if a matching journal folder could not be found
214            */
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portlet.journal.model.JournalFolder fetchJournalFolderByUuidAndGroupId(
217                    java.lang.String uuid, long groupId);
218    
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
221    
222            /**
223            * Returns the Spring bean ID for this bean.
224            *
225            * @return the Spring bean ID for this bean
226            */
227            public java.lang.String getBeanIdentifier();
228    
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getCompanyFolders(
231                    long companyId, int start, int end);
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public int getCompanyFoldersCount(long companyId);
235    
236            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDDMStructures(
238                    long[] groupIds, long folderId, int restrictionType)
239                    throws PortalException;
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
243                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public com.liferay.portlet.journal.model.JournalFolder getFolder(
247                    long folderId) throws PortalException;
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
251                    long groupId);
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
255                    long groupId, long parentFolderId);
256    
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
259                    long groupId, long parentFolderId, int start, int end);
260    
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
263                    long groupId, long parentFolderId, int status);
264    
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getFolders(
267                    long groupId, long parentFolderId, int status, int start, int end);
268    
269            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270            public java.util.List<java.lang.Object> getFoldersAndArticles(
271                    long groupId, long folderId);
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<java.lang.Object> getFoldersAndArticles(
275                    long groupId, long folderId, int start, int end,
276                    com.liferay.portal.kernel.util.OrderByComparator<?> obc);
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public java.util.List<java.lang.Object> getFoldersAndArticles(
280                    long groupId, long folderId, int status);
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public int getFoldersAndArticlesCount(long groupId, long folderId);
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public int getFoldersAndArticlesCount(long groupId, long folderId,
287                    int status);
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public int getFoldersAndArticlesCount(long groupId,
291                    java.util.List<java.lang.Long> folderIds, int status);
292    
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public int getFoldersCount(long groupId, long parentFolderId);
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public int getFoldersCount(long groupId, long parentFolderId, int status);
298    
299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300            public long getInheritedWorkflowFolderId(long folderId)
301                    throws com.liferay.portlet.journal.NoSuchFolderException;
302    
303            /**
304            * Returns the journal folder with the primary key.
305            *
306            * @param folderId the primary key of the journal folder
307            * @return the journal folder
308            * @throws PortalException if a journal folder with the primary key could not be found
309            */
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public com.liferay.portlet.journal.model.JournalFolder getJournalFolder(
312                    long folderId) throws PortalException;
313    
314            /**
315            * Returns the journal folder matching the UUID and group.
316            *
317            * @param uuid the journal folder's UUID
318            * @param groupId the primary key of the group
319            * @return the matching journal folder
320            * @throws PortalException if a matching journal folder could not be found
321            */
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public com.liferay.portlet.journal.model.JournalFolder getJournalFolderByUuidAndGroupId(
324                    java.lang.String uuid, long groupId) throws PortalException;
325    
326            /**
327            * Returns a range of all the journal folders.
328            *
329            * <p>
330            * 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.journal.model.impl.JournalFolderModelImpl}. 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.
331            * </p>
332            *
333            * @param start the lower bound of the range of journal folders
334            * @param end the upper bound of the range of journal folders (not inclusive)
335            * @return the range of journal folders
336            */
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getJournalFolders(
339                    int start, int end);
340    
341            /**
342            * Returns all the journal folders matching the UUID and company.
343            *
344            * @param uuid the UUID of the journal folders
345            * @param companyId the primary key of the company
346            * @return the matching journal folders, or an empty list if no matches were found
347            */
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getJournalFoldersByUuidAndCompanyId(
350                    java.lang.String uuid, long companyId);
351    
352            /**
353            * Returns a range of journal folders matching the UUID and company.
354            *
355            * @param uuid the UUID of the journal folders
356            * @param companyId the primary key of the company
357            * @param start the lower bound of the range of journal folders
358            * @param end the upper bound of the range of journal folders (not inclusive)
359            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
360            * @return the range of matching journal folders, or an empty list if no matches were found
361            */
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getJournalFoldersByUuidAndCompanyId(
364                    java.lang.String uuid, long companyId, int start, int end,
365                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFolder> orderByComparator);
366    
367            /**
368            * Returns the number of journal folders.
369            *
370            * @return the number of journal folders
371            */
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public int getJournalFoldersCount();
374    
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public java.util.List<com.liferay.portlet.journal.model.JournalFolder> getNoAssetFolders();
377    
378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379            public long getOverridedDDMStructuresFolderId(long folderId)
380                    throws com.liferay.portlet.journal.NoSuchFolderException;
381    
382            @Override
383            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
384            public com.liferay.portal.model.PersistedModel getPersistedModel(
385                    java.io.Serializable primaryKeyObj) throws PortalException;
386    
387            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
388            public void getSubfolderIds(java.util.List<java.lang.Long> folderIds,
389                    long groupId, long folderId);
390    
391            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
392            public com.liferay.portlet.journal.model.JournalFolder moveFolder(
393                    long folderId, long parentFolderId,
394                    com.liferay.portal.service.ServiceContext serviceContext)
395                    throws PortalException;
396    
397            public com.liferay.portlet.journal.model.JournalFolder moveFolderFromTrash(
398                    long userId, long folderId, long parentFolderId,
399                    com.liferay.portal.service.ServiceContext serviceContext)
400                    throws PortalException;
401    
402            public com.liferay.portlet.journal.model.JournalFolder moveFolderToTrash(
403                    long userId, long folderId) throws PortalException;
404    
405            public void rebuildTree(long companyId) throws PortalException;
406    
407            public void rebuildTree(long companyId, long parentFolderId,
408                    java.lang.String parentTreePath, boolean reindex)
409                    throws PortalException;
410    
411            public void restoreFolderFromTrash(long userId, long folderId)
412                    throws PortalException;
413    
414            /**
415            * Sets the Spring bean ID for this bean.
416            *
417            * @param beanIdentifier the Spring bean ID for this bean
418            */
419            public void setBeanIdentifier(java.lang.String beanIdentifier);
420    
421            public void subscribe(long userId, long groupId, long folderId)
422                    throws PortalException;
423    
424            public void unsubscribe(long userId, long groupId, long folderId)
425                    throws PortalException;
426    
427            public void updateAsset(long userId,
428                    com.liferay.portlet.journal.model.JournalFolder folder,
429                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
430                    long[] assetLinkEntryIds) throws PortalException;
431    
432            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
433            public com.liferay.portlet.journal.model.JournalFolder updateFolder(
434                    long userId, long groupId, long folderId, long parentFolderId,
435                    java.lang.String name, java.lang.String description,
436                    long[] ddmStructureIds, int restrictionType,
437                    boolean mergeWithParentFolder,
438                    com.liferay.portal.service.ServiceContext serviceContext)
439                    throws PortalException;
440    
441            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
442            public com.liferay.portlet.journal.model.JournalFolder updateFolder(
443                    long userId, long groupId, long folderId, long parentFolderId,
444                    java.lang.String name, java.lang.String description,
445                    boolean mergeWithParentFolder,
446                    com.liferay.portal.service.ServiceContext serviceContext)
447                    throws PortalException;
448    
449            public void updateFolderDDMStructures(
450                    com.liferay.portlet.journal.model.JournalFolder folder,
451                    long[] ddmStructureIdsArray) throws PortalException;
452    
453            /**
454            * Updates the journal folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
455            *
456            * @param journalFolder the journal folder
457            * @return the journal folder that was updated
458            */
459            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
460            public com.liferay.portlet.journal.model.JournalFolder updateJournalFolder(
461                    com.liferay.portlet.journal.model.JournalFolder journalFolder);
462    
463            public com.liferay.portlet.journal.model.JournalFolder updateStatus(
464                    long userId, com.liferay.portlet.journal.model.JournalFolder folder,
465                    int status) throws PortalException;
466    
467            public void validateFolderDDMStructures(long folderId, long parentFolderId)
468                    throws PortalException;
469    }