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.journal.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 journal feed remote service. This utility wraps {@link com.liferay.portlet.journal.service.impl.JournalFeedServiceImpl} 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 JournalFeedService
030     * @see com.liferay.portlet.journal.service.base.JournalFeedServiceBaseImpl
031     * @see com.liferay.portlet.journal.service.impl.JournalFeedServiceImpl
032     * @generated
033     */
034    public class JournalFeedServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalFeedServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.journal.model.JournalFeed addFeed(
041                    long groupId, java.lang.String feedId, boolean autoFeedId,
042                    java.lang.String name, java.lang.String description,
043                    java.lang.String type, java.lang.String structureId,
044                    java.lang.String templateId, java.lang.String rendererTemplateId,
045                    int delta, java.lang.String orderByCol, java.lang.String orderByType,
046                    java.lang.String targetLayoutFriendlyUrl,
047                    java.lang.String targetPortletId, java.lang.String contentField,
048                    java.lang.String feedType, double feedVersion,
049                    com.liferay.portal.service.ServiceContext serviceContext)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException {
052                    return getService()
053                                       .addFeed(groupId, feedId, autoFeedId, name, description,
054                            type, structureId, templateId, rendererTemplateId, delta,
055                            orderByCol, orderByType, targetLayoutFriendlyUrl, targetPortletId,
056                            contentField, feedType, feedVersion, serviceContext);
057            }
058    
059            public static void deleteFeed(long groupId, long feedId)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    getService().deleteFeed(groupId, feedId);
063            }
064    
065            public static void deleteFeed(long groupId, java.lang.String feedId)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    getService().deleteFeed(groupId, feedId);
069            }
070    
071            public static com.liferay.portlet.journal.model.JournalFeed getFeed(
072                    long groupId, long feedId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService().getFeed(groupId, feedId);
076            }
077    
078            public static com.liferay.portlet.journal.model.JournalFeed getFeed(
079                    long groupId, java.lang.String feedId)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    return getService().getFeed(groupId, feedId);
083            }
084    
085            public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
086                    long groupId, java.lang.String feedId, java.lang.String name,
087                    java.lang.String description, java.lang.String type,
088                    java.lang.String structureId, java.lang.String templateId,
089                    java.lang.String rendererTemplateId, int delta,
090                    java.lang.String orderByCol, java.lang.String orderByType,
091                    java.lang.String targetLayoutFriendlyUrl,
092                    java.lang.String targetPortletId, java.lang.String contentField,
093                    java.lang.String feedType, double feedVersion,
094                    com.liferay.portal.service.ServiceContext serviceContext)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService()
098                                       .updateFeed(groupId, feedId, name, description, type,
099                            structureId, templateId, rendererTemplateId, delta, orderByCol,
100                            orderByType, targetLayoutFriendlyUrl, targetPortletId,
101                            contentField, feedType, feedVersion, serviceContext);
102            }
103    
104            public static JournalFeedService getService() {
105                    if (_service == null) {
106                            _service = (JournalFeedService)PortalBeanLocatorUtil.locate(JournalFeedService.class.getName());
107    
108                            ReferenceRegistry.registerReference(JournalFeedServiceUtil.class,
109                                    "_service");
110                            MethodCache.remove(JournalFeedService.class);
111                    }
112    
113                    return _service;
114            }
115    
116            public void setService(JournalFeedService service) {
117                    MethodCache.remove(JournalFeedService.class);
118    
119                    _service = service;
120    
121                    ReferenceRegistry.registerReference(JournalFeedServiceUtil.class,
122                            "_service");
123                    MethodCache.remove(JournalFeedService.class);
124            }
125    
126            private static JournalFeedService _service;
127    }