001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.announcements.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the announcements entry remote service. This utility wraps {@link com.liferay.portlet.announcements.service.impl.AnnouncementsEntryServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
022     *
023     * <p>
024     * 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.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see AnnouncementsEntryService
029     * @see com.liferay.portlet.announcements.service.base.AnnouncementsEntryServiceBaseImpl
030     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsEntryServiceImpl
031     * @generated
032     */
033    public class AnnouncementsEntryServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.announcements.service.impl.AnnouncementsEntryServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            public static com.liferay.portlet.announcements.model.AnnouncementsEntry addEntry(
059                    long plid, long classNameId, long classPK, java.lang.String title,
060                    java.lang.String content, java.lang.String url, java.lang.String type,
061                    int displayDateMonth, int displayDateDay, int displayDateYear,
062                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
063                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
064                    int expirationDateMinute, int priority, boolean alert)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService()
068                                       .addEntry(plid, classNameId, classPK, title, content, url,
069                            type, displayDateMonth, displayDateDay, displayDateYear,
070                            displayDateHour, displayDateMinute, expirationDateMonth,
071                            expirationDateDay, expirationDateYear, expirationDateHour,
072                            expirationDateMinute, priority, alert);
073            }
074    
075            public static void deleteEntry(long entryId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    getService().deleteEntry(entryId);
079            }
080    
081            public static com.liferay.portlet.announcements.model.AnnouncementsEntry updateEntry(
082                    long entryId, java.lang.String title, java.lang.String content,
083                    java.lang.String url, java.lang.String type, int displayDateMonth,
084                    int displayDateDay, int displayDateYear, int displayDateHour,
085                    int displayDateMinute, int expirationDateMonth, int expirationDateDay,
086                    int expirationDateYear, int expirationDateHour,
087                    int expirationDateMinute, int priority)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService()
091                                       .updateEntry(entryId, title, content, url, type,
092                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
093                            displayDateMinute, expirationDateMonth, expirationDateDay,
094                            expirationDateYear, expirationDateHour, expirationDateMinute,
095                            priority);
096            }
097    
098            public static AnnouncementsEntryService getService() {
099                    if (_service == null) {
100                            _service = (AnnouncementsEntryService)PortalBeanLocatorUtil.locate(AnnouncementsEntryService.class.getName());
101    
102                            ReferenceRegistry.registerReference(AnnouncementsEntryServiceUtil.class,
103                                    "_service");
104                    }
105    
106                    return _service;
107            }
108    
109            /**
110             * @deprecated
111             */
112            public void setService(AnnouncementsEntryService service) {
113            }
114    
115            private static AnnouncementsEntryService _service;
116    }