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.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 getEntry(
082                    long entryId)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException {
085                    return getService().getEntry(entryId);
086            }
087    
088            public static com.liferay.portlet.announcements.model.AnnouncementsEntry updateEntry(
089                    long entryId, java.lang.String title, java.lang.String content,
090                    java.lang.String url, java.lang.String type, int displayDateMonth,
091                    int displayDateDay, int displayDateYear, int displayDateHour,
092                    int displayDateMinute, int expirationDateMonth, int expirationDateDay,
093                    int expirationDateYear, int expirationDateHour,
094                    int expirationDateMinute, int priority)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService()
098                                       .updateEntry(entryId, title, content, url, type,
099                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
100                            displayDateMinute, expirationDateMonth, expirationDateDay,
101                            expirationDateYear, expirationDateHour, expirationDateMinute,
102                            priority);
103            }
104    
105            public static AnnouncementsEntryService getService() {
106                    if (_service == null) {
107                            _service = (AnnouncementsEntryService)PortalBeanLocatorUtil.locate(AnnouncementsEntryService.class.getName());
108    
109                            ReferenceRegistry.registerReference(AnnouncementsEntryServiceUtil.class,
110                                    "_service");
111                    }
112    
113                    return _service;
114            }
115    
116            /**
117             * @deprecated
118             */
119            public void setService(AnnouncementsEntryService service) {
120            }
121    
122            private static AnnouncementsEntryService _service;
123    }