001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the bookmarks folder remote service. This utility wraps {@link com.liferay.portlet.bookmarks.service.impl.BookmarksFolderServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see BookmarksFolderService
030     * @see com.liferay.portlet.bookmarks.service.base.BookmarksFolderServiceBaseImpl
031     * @see com.liferay.portlet.bookmarks.service.impl.BookmarksFolderServiceImpl
032     * @generated
033     */
034    public class BookmarksFolderServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.bookmarks.service.impl.BookmarksFolderServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.bookmarks.model.BookmarksFolder addFolder(
041                    long parentFolderId, java.lang.String name,
042                    java.lang.String description,
043                    com.liferay.portal.service.ServiceContext serviceContext)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    return getService()
047                                       .addFolder(parentFolderId, name, description, serviceContext);
048            }
049    
050            public static void deleteFolder(long folderId)
051                    throws com.liferay.portal.kernel.exception.PortalException,
052                            com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteFolder(folderId);
054            }
055    
056            public static com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder(
057                    long folderId)
058                    throws com.liferay.portal.kernel.exception.PortalException,
059                            com.liferay.portal.kernel.exception.SystemException {
060                    return getService().getFolder(folderId);
061            }
062    
063            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
064                    long groupId)
065                    throws com.liferay.portal.kernel.exception.SystemException {
066                    return getService().getFolders(groupId);
067            }
068    
069            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
070                    long groupId, long parentFolderId)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    return getService().getFolders(groupId, parentFolderId);
073            }
074    
075            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
076                    long groupId, long parentFolderId, int start, int end)
077                    throws com.liferay.portal.kernel.exception.SystemException {
078                    return getService().getFolders(groupId, parentFolderId, start, end);
079            }
080    
081            public static int getFoldersCount(long groupId, long parentFolderId)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().getFoldersCount(groupId, parentFolderId);
084            }
085    
086            public static void getSubfolderIds(
087                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    getService().getSubfolderIds(folderIds, groupId, folderId);
090            }
091    
092            public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateFolder(
093                    long folderId, long parentFolderId, java.lang.String name,
094                    java.lang.String description, boolean mergeWithParentFolder,
095                    com.liferay.portal.service.ServiceContext serviceContext)
096                    throws com.liferay.portal.kernel.exception.PortalException,
097                            com.liferay.portal.kernel.exception.SystemException {
098                    return getService()
099                                       .updateFolder(folderId, parentFolderId, name, description,
100                            mergeWithParentFolder, serviceContext);
101            }
102    
103            public static BookmarksFolderService getService() {
104                    if (_service == null) {
105                            _service = (BookmarksFolderService)PortalBeanLocatorUtil.locate(BookmarksFolderService.class.getName());
106    
107                            ReferenceRegistry.registerReference(BookmarksFolderServiceUtil.class,
108                                    "_service");
109                            MethodCache.remove(BookmarksFolderService.class);
110                    }
111    
112                    return _service;
113            }
114    
115            public void setService(BookmarksFolderService service) {
116                    MethodCache.remove(BookmarksFolderService.class);
117    
118                    _service = service;
119    
120                    ReferenceRegistry.registerReference(BookmarksFolderServiceUtil.class,
121                            "_service");
122                    MethodCache.remove(BookmarksFolderService.class);
123            }
124    
125            private static BookmarksFolderService _service;
126    }