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 entry remote service. This utility wraps {@link com.liferay.portlet.bookmarks.service.impl.BookmarksEntryServiceImpl} 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 BookmarksEntryService
030     * @see com.liferay.portlet.bookmarks.service.base.BookmarksEntryServiceBaseImpl
031     * @see com.liferay.portlet.bookmarks.service.impl.BookmarksEntryServiceImpl
032     * @generated
033     */
034    public class BookmarksEntryServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.bookmarks.service.impl.BookmarksEntryServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
041                    long groupId, long folderId, java.lang.String name,
042                    java.lang.String url, 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                                       .addEntry(groupId, folderId, name, url, description,
048                            serviceContext);
049            }
050    
051            public static void deleteEntry(long entryId)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException {
054                    getService().deleteEntry(entryId);
055            }
056    
057            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
058                    long groupId, long folderId, int start, int end)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().getEntries(groupId, folderId, start, end);
061            }
062    
063            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
064                    long groupId, long folderId, int start, int end,
065                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
066                    throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService()
068                                       .getEntries(groupId, folderId, start, end, orderByComparator);
069            }
070    
071            public static int getEntriesCount(long groupId, long folderId)
072                    throws com.liferay.portal.kernel.exception.SystemException {
073                    return getService().getEntriesCount(groupId, folderId);
074            }
075    
076            public static com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
077                    long entryId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService().getEntry(entryId);
081            }
082    
083            public static int getFoldersEntriesCount(long groupId,
084                    java.util.List<java.lang.Long> folderIds)
085                    throws com.liferay.portal.kernel.exception.SystemException {
086                    return getService().getFoldersEntriesCount(groupId, folderIds);
087            }
088    
089            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
090                    long groupId, int start, int end)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getGroupEntries(groupId, start, end);
093            }
094    
095            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
096                    long groupId, long userId, int start, int end)
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getGroupEntries(groupId, userId, start, end);
099            }
100    
101            public static int getGroupEntriesCount(long groupId)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getGroupEntriesCount(groupId);
104            }
105    
106            public static int getGroupEntriesCount(long groupId, long userId)
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getGroupEntriesCount(groupId, userId);
109            }
110    
111            public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
112                    long entryId)
113                    throws com.liferay.portal.kernel.exception.PortalException,
114                            com.liferay.portal.kernel.exception.SystemException {
115                    return getService().openEntry(entryId);
116            }
117    
118            public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
119                    long entryId, long groupId, long folderId, java.lang.String name,
120                    java.lang.String url, java.lang.String description,
121                    com.liferay.portal.service.ServiceContext serviceContext)
122                    throws com.liferay.portal.kernel.exception.PortalException,
123                            com.liferay.portal.kernel.exception.SystemException {
124                    return getService()
125                                       .updateEntry(entryId, groupId, folderId, name, url,
126                            description, serviceContext);
127            }
128    
129            public static BookmarksEntryService getService() {
130                    if (_service == null) {
131                            _service = (BookmarksEntryService)PortalBeanLocatorUtil.locate(BookmarksEntryService.class.getName());
132    
133                            ReferenceRegistry.registerReference(BookmarksEntryServiceUtil.class,
134                                    "_service");
135                            MethodCache.remove(BookmarksEntryService.class);
136                    }
137    
138                    return _service;
139            }
140    
141            public void setService(BookmarksEntryService service) {
142                    MethodCache.remove(BookmarksEntryService.class);
143    
144                    _service = service;
145    
146                    ReferenceRegistry.registerReference(BookmarksEntryServiceUtil.class,
147                            "_service");
148                    MethodCache.remove(BookmarksEntryService.class);
149            }
150    
151            private static BookmarksEntryService _service;
152    }