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