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.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for BookmarksFolder. This utility wraps
024     * {@link com.liferay.portlet.bookmarks.service.impl.BookmarksFolderLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see BookmarksFolderLocalService
032     * @see com.liferay.portlet.bookmarks.service.base.BookmarksFolderLocalServiceBaseImpl
033     * @see com.liferay.portlet.bookmarks.service.impl.BookmarksFolderLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class BookmarksFolderLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.bookmarks.service.impl.BookmarksFolderLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the bookmarks folder to the database. Also notifies the appropriate model listeners.
046            *
047            * @param bookmarksFolder the bookmarks folder
048            * @return the bookmarks folder that was added
049            */
050            public static com.liferay.portlet.bookmarks.model.BookmarksFolder addBookmarksFolder(
051                    com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder) {
052                    return getService().addBookmarksFolder(bookmarksFolder);
053            }
054    
055            public static com.liferay.portlet.bookmarks.model.BookmarksFolder addFolder(
056                    long userId, long parentFolderId, java.lang.String name,
057                    java.lang.String description,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    return getService()
061                                       .addFolder(userId, parentFolderId, name, description,
062                            serviceContext);
063            }
064    
065            /**
066            * Creates a new bookmarks folder with the primary key. Does not add the bookmarks folder to the database.
067            *
068            * @param folderId the primary key for the new bookmarks folder
069            * @return the new bookmarks folder
070            */
071            public static com.liferay.portlet.bookmarks.model.BookmarksFolder createBookmarksFolder(
072                    long folderId) {
073                    return getService().createBookmarksFolder(folderId);
074            }
075    
076            /**
077            * Deletes the bookmarks folder from the database. Also notifies the appropriate model listeners.
078            *
079            * @param bookmarksFolder the bookmarks folder
080            * @return the bookmarks folder that was removed
081            */
082            public static com.liferay.portlet.bookmarks.model.BookmarksFolder deleteBookmarksFolder(
083                    com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder) {
084                    return getService().deleteBookmarksFolder(bookmarksFolder);
085            }
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            public static com.liferay.portlet.bookmarks.model.BookmarksFolder deleteBookmarksFolder(
095                    long folderId)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    return getService().deleteBookmarksFolder(folderId);
098            }
099    
100            public static com.liferay.portlet.bookmarks.model.BookmarksFolder deleteFolder(
101                    com.liferay.portlet.bookmarks.model.BookmarksFolder folder)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    return getService().deleteFolder(folder);
104            }
105    
106            public static com.liferay.portlet.bookmarks.model.BookmarksFolder deleteFolder(
107                    com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
108                    boolean includeTrashedEntries)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    return getService().deleteFolder(folder, includeTrashedEntries);
111            }
112    
113            public static com.liferay.portlet.bookmarks.model.BookmarksFolder deleteFolder(
114                    long folderId)
115                    throws com.liferay.portal.kernel.exception.PortalException {
116                    return getService().deleteFolder(folderId);
117            }
118    
119            public static com.liferay.portlet.bookmarks.model.BookmarksFolder deleteFolder(
120                    long folderId, boolean includeTrashedEntries)
121                    throws com.liferay.portal.kernel.exception.PortalException {
122                    return getService().deleteFolder(folderId, includeTrashedEntries);
123            }
124    
125            public static void deleteFolders(long groupId)
126                    throws com.liferay.portal.kernel.exception.PortalException {
127                    getService().deleteFolders(groupId);
128            }
129    
130            /**
131            * @throws PortalException
132            */
133            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
134                    com.liferay.portal.model.PersistedModel persistedModel)
135                    throws com.liferay.portal.kernel.exception.PortalException {
136                    return getService().deletePersistedModel(persistedModel);
137            }
138    
139            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
140                    return getService().dynamicQuery();
141            }
142    
143            /**
144            * Performs a dynamic query on the database and returns the matching rows.
145            *
146            * @param dynamicQuery the dynamic query
147            * @return the matching rows
148            */
149            public static <T> java.util.List<T> dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
151                    return getService().dynamicQuery(dynamicQuery);
152            }
153    
154            /**
155            * Performs a dynamic query on the database and returns a 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.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.
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            * @return the range of matching rows
165            */
166            public static <T> java.util.List<T> dynamicQuery(
167                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
168                    int end) {
169                    return getService().dynamicQuery(dynamicQuery, start, end);
170            }
171    
172            /**
173            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param dynamicQuery the dynamic query
180            * @param start the lower bound of the range of model instances
181            * @param end the upper bound of the range of model instances (not inclusive)
182            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
183            * @return the ordered range of matching rows
184            */
185            public static <T> java.util.List<T> dynamicQuery(
186                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
187                    int end,
188                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
189                    return getService()
190                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
191            }
192    
193            /**
194            * Returns the number of rows that match the dynamic query.
195            *
196            * @param dynamicQuery the dynamic query
197            * @return the number of rows that match the dynamic query
198            */
199            public static long dynamicQueryCount(
200                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
201                    return getService().dynamicQueryCount(dynamicQuery);
202            }
203    
204            /**
205            * Returns the number of rows that match the dynamic query.
206            *
207            * @param dynamicQuery the dynamic query
208            * @param projection the projection to apply to the query
209            * @return the number of rows that match the dynamic query
210            */
211            public static long dynamicQueryCount(
212                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
213                    com.liferay.portal.kernel.dao.orm.Projection projection) {
214                    return getService().dynamicQueryCount(dynamicQuery, projection);
215            }
216    
217            public static com.liferay.portlet.bookmarks.model.BookmarksFolder fetchBookmarksFolder(
218                    long folderId) {
219                    return getService().fetchBookmarksFolder(folderId);
220            }
221    
222            /**
223            * Returns the bookmarks folder matching the UUID and group.
224            *
225            * @param uuid the bookmarks folder's UUID
226            * @param groupId the primary key of the group
227            * @return the matching bookmarks folder, or <code>null</code> if a matching bookmarks folder could not be found
228            */
229            public static com.liferay.portlet.bookmarks.model.BookmarksFolder fetchBookmarksFolderByUuidAndGroupId(
230                    java.lang.String uuid, long groupId) {
231                    return getService().fetchBookmarksFolderByUuidAndGroupId(uuid, groupId);
232            }
233    
234            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
235                    return getService().getActionableDynamicQuery();
236            }
237    
238            /**
239            * Returns the Spring bean ID for this bean.
240            *
241            * @return the Spring bean ID for this bean
242            */
243            public static java.lang.String getBeanIdentifier() {
244                    return getService().getBeanIdentifier();
245            }
246    
247            /**
248            * Returns the bookmarks folder with the primary key.
249            *
250            * @param folderId the primary key of the bookmarks folder
251            * @return the bookmarks folder
252            * @throws PortalException if a bookmarks folder with the primary key could not be found
253            */
254            public static com.liferay.portlet.bookmarks.model.BookmarksFolder getBookmarksFolder(
255                    long folderId)
256                    throws com.liferay.portal.kernel.exception.PortalException {
257                    return getService().getBookmarksFolder(folderId);
258            }
259    
260            /**
261            * Returns the bookmarks folder matching the UUID and group.
262            *
263            * @param uuid the bookmarks folder's UUID
264            * @param groupId the primary key of the group
265            * @return the matching bookmarks folder
266            * @throws PortalException if a matching bookmarks folder could not be found
267            */
268            public static com.liferay.portlet.bookmarks.model.BookmarksFolder getBookmarksFolderByUuidAndGroupId(
269                    java.lang.String uuid, long groupId)
270                    throws com.liferay.portal.kernel.exception.PortalException {
271                    return getService().getBookmarksFolderByUuidAndGroupId(uuid, groupId);
272            }
273    
274            /**
275            * Returns a range of all the bookmarks folders.
276            *
277            * <p>
278            * 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.
279            * </p>
280            *
281            * @param start the lower bound of the range of bookmarks folders
282            * @param end the upper bound of the range of bookmarks folders (not inclusive)
283            * @return the range of bookmarks folders
284            */
285            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getBookmarksFolders(
286                    int start, int end) {
287                    return getService().getBookmarksFolders(start, end);
288            }
289    
290            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getBookmarksFoldersByUuidAndCompanyId(
291                    java.lang.String uuid, long companyId) {
292                    return getService()
293                                       .getBookmarksFoldersByUuidAndCompanyId(uuid, companyId);
294            }
295    
296            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getBookmarksFoldersByUuidAndCompanyId(
297                    java.lang.String uuid, long companyId, int start, int end,
298                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.bookmarks.model.BookmarksFolder> orderByComparator) {
299                    return getService()
300                                       .getBookmarksFoldersByUuidAndCompanyId(uuid, companyId,
301                            start, end, orderByComparator);
302            }
303    
304            /**
305            * Returns the number of bookmarks folders.
306            *
307            * @return the number of bookmarks folders
308            */
309            public static int getBookmarksFoldersCount() {
310                    return getService().getBookmarksFoldersCount();
311            }
312    
313            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getCompanyFolders(
314                    long companyId, int start, int end) {
315                    return getService().getCompanyFolders(companyId, start, end);
316            }
317    
318            public static int getCompanyFoldersCount(long companyId) {
319                    return getService().getCompanyFoldersCount(companyId);
320            }
321    
322            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
323                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
324                    return getService().getExportActionableDynamicQuery(portletDataContext);
325            }
326    
327            public static com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder(
328                    long folderId)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return getService().getFolder(folderId);
331            }
332    
333            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
334                    long groupId) {
335                    return getService().getFolders(groupId);
336            }
337    
338            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
339                    long groupId, long parentFolderId) {
340                    return getService().getFolders(groupId, parentFolderId);
341            }
342    
343            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
344                    long groupId, long parentFolderId, int start, int end) {
345                    return getService().getFolders(groupId, parentFolderId, start, end);
346            }
347    
348            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
349                    long groupId, long parentFolderId, int status, int start, int end) {
350                    return getService()
351                                       .getFolders(groupId, parentFolderId, status, start, end);
352            }
353    
354            public static java.util.List<java.lang.Object> getFoldersAndEntries(
355                    long groupId, long folderId) {
356                    return getService().getFoldersAndEntries(groupId, folderId);
357            }
358    
359            public static java.util.List<java.lang.Object> getFoldersAndEntries(
360                    long groupId, long folderId, int status) {
361                    return getService().getFoldersAndEntries(groupId, folderId, status);
362            }
363    
364            public static java.util.List<java.lang.Object> getFoldersAndEntries(
365                    long groupId, long folderId, int status, int start, int end) {
366                    return getService()
367                                       .getFoldersAndEntries(groupId, folderId, status, start, end);
368            }
369    
370            public static int getFoldersAndEntriesCount(long groupId, long folderId,
371                    int status) {
372                    return getService().getFoldersAndEntriesCount(groupId, folderId, status);
373            }
374    
375            public static int getFoldersCount(long groupId, long parentFolderId) {
376                    return getService().getFoldersCount(groupId, parentFolderId);
377            }
378    
379            public static int getFoldersCount(long groupId, long parentFolderId,
380                    int status) {
381                    return getService().getFoldersCount(groupId, parentFolderId, status);
382            }
383    
384            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getNoAssetFolders() {
385                    return getService().getNoAssetFolders();
386            }
387    
388            public static com.liferay.portal.model.PersistedModel getPersistedModel(
389                    java.io.Serializable primaryKeyObj)
390                    throws com.liferay.portal.kernel.exception.PortalException {
391                    return getService().getPersistedModel(primaryKeyObj);
392            }
393    
394            public static void getSubfolderIds(
395                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId) {
396                    getService().getSubfolderIds(folderIds, groupId, folderId);
397            }
398    
399            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolder(
400                    long folderId, long parentFolderId)
401                    throws com.liferay.portal.kernel.exception.PortalException {
402                    return getService().moveFolder(folderId, parentFolderId);
403            }
404    
405            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolderFromTrash(
406                    long userId, long folderId, long parentFolderId)
407                    throws com.liferay.portal.kernel.exception.PortalException {
408                    return getService().moveFolderFromTrash(userId, folderId, parentFolderId);
409            }
410    
411            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolderToTrash(
412                    long userId, long folderId)
413                    throws com.liferay.portal.kernel.exception.PortalException {
414                    return getService().moveFolderToTrash(userId, folderId);
415            }
416    
417            public static void rebuildTree(long companyId)
418                    throws com.liferay.portal.kernel.exception.PortalException {
419                    getService().rebuildTree(companyId);
420            }
421    
422            public static void rebuildTree(long companyId, long parentFolderId,
423                    java.lang.String parentTreePath, boolean reindex)
424                    throws com.liferay.portal.kernel.exception.PortalException {
425                    getService()
426                            .rebuildTree(companyId, parentFolderId, parentTreePath, reindex);
427            }
428    
429            public static void restoreFolderFromTrash(long userId, long folderId)
430                    throws com.liferay.portal.kernel.exception.PortalException {
431                    getService().restoreFolderFromTrash(userId, folderId);
432            }
433    
434            /**
435            * Sets the Spring bean ID for this bean.
436            *
437            * @param beanIdentifier the Spring bean ID for this bean
438            */
439            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
440                    getService().setBeanIdentifier(beanIdentifier);
441            }
442    
443            public static void subscribeFolder(long userId, long groupId, long folderId)
444                    throws com.liferay.portal.kernel.exception.PortalException {
445                    getService().subscribeFolder(userId, groupId, folderId);
446            }
447    
448            public static void unsubscribeFolder(long userId, long groupId,
449                    long folderId)
450                    throws com.liferay.portal.kernel.exception.PortalException {
451                    getService().unsubscribeFolder(userId, groupId, folderId);
452            }
453    
454            public static void updateAsset(long userId,
455                    com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
456                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
457                    long[] assetLinkEntryIds)
458                    throws com.liferay.portal.kernel.exception.PortalException {
459                    getService()
460                            .updateAsset(userId, folder, assetCategoryIds, assetTagNames,
461                            assetLinkEntryIds);
462            }
463    
464            /**
465            * Updates the bookmarks folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
466            *
467            * @param bookmarksFolder the bookmarks folder
468            * @return the bookmarks folder that was updated
469            */
470            public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateBookmarksFolder(
471                    com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder) {
472                    return getService().updateBookmarksFolder(bookmarksFolder);
473            }
474    
475            public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateFolder(
476                    long userId, long folderId, long parentFolderId, java.lang.String name,
477                    java.lang.String description, boolean mergeWithParentFolder,
478                    com.liferay.portal.service.ServiceContext serviceContext)
479                    throws com.liferay.portal.kernel.exception.PortalException {
480                    return getService()
481                                       .updateFolder(userId, folderId, parentFolderId, name,
482                            description, mergeWithParentFolder, serviceContext);
483            }
484    
485            public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateStatus(
486                    long userId,
487                    com.liferay.portlet.bookmarks.model.BookmarksFolder folder, int status)
488                    throws com.liferay.portal.kernel.exception.PortalException {
489                    return getService().updateStatus(userId, folder, status);
490            }
491    
492            public static BookmarksFolderLocalService getService() {
493                    if (_service == null) {
494                            _service = (BookmarksFolderLocalService)PortalBeanLocatorUtil.locate(BookmarksFolderLocalService.class.getName());
495    
496                            ReferenceRegistry.registerReference(BookmarksFolderLocalServiceUtil.class,
497                                    "_service");
498                    }
499    
500                    return _service;
501            }
502    
503            /**
504             * @deprecated As of 6.2.0
505             */
506            @Deprecated
507            public void setService(BookmarksFolderLocalService service) {
508            }
509    
510            private static BookmarksFolderLocalService _service;
511    }