001    /**
002     * Copyright (c) 2000-present 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.announcements.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for AnnouncementsEntry. This utility wraps
024     * {@link com.liferay.portlet.announcements.service.impl.AnnouncementsEntryServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see AnnouncementsEntryService
032     * @see com.liferay.portlet.announcements.service.base.AnnouncementsEntryServiceBaseImpl
033     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsEntryServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class AnnouncementsEntryServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * 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.
042             */
043            public static com.liferay.announcements.kernel.model.AnnouncementsEntry addEntry(
044                    long plid, long classNameId, long classPK, java.lang.String title,
045                    java.lang.String content, java.lang.String url, java.lang.String type,
046                    int displayDateMonth, int displayDateDay, int displayDateYear,
047                    int displayDateHour, int displayDateMinute, boolean displayImmediately,
048                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
049                    int expirationDateHour, int expirationDateMinute, int priority,
050                    boolean alert)
051                    throws com.liferay.portal.kernel.exception.PortalException {
052                    return getService()
053                                       .addEntry(plid, classNameId, classPK, title, content, url,
054                            type, displayDateMonth, displayDateDay, displayDateYear,
055                            displayDateHour, displayDateMinute, displayImmediately,
056                            expirationDateMonth, expirationDateDay, expirationDateYear,
057                            expirationDateHour, expirationDateMinute, priority, alert);
058            }
059    
060            public static void deleteEntry(long entryId)
061                    throws com.liferay.portal.kernel.exception.PortalException {
062                    getService().deleteEntry(entryId);
063            }
064    
065            public static com.liferay.announcements.kernel.model.AnnouncementsEntry getEntry(
066                    long entryId)
067                    throws com.liferay.portal.kernel.exception.PortalException {
068                    return getService().getEntry(entryId);
069            }
070    
071            /**
072            * Returns the OSGi service identifier.
073            *
074            * @return the OSGi service identifier
075            */
076            public static java.lang.String getOSGiServiceIdentifier() {
077                    return getService().getOSGiServiceIdentifier();
078            }
079    
080            public static com.liferay.announcements.kernel.model.AnnouncementsEntry updateEntry(
081                    long entryId, java.lang.String title, java.lang.String content,
082                    java.lang.String url, java.lang.String type, int displayDateMonth,
083                    int displayDateDay, int displayDateYear, int displayDateHour,
084                    int displayDateMinute, boolean displayImmediately,
085                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
086                    int expirationDateHour, int expirationDateMinute, int priority)
087                    throws com.liferay.portal.kernel.exception.PortalException {
088                    return getService()
089                                       .updateEntry(entryId, title, content, url, type,
090                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
091                            displayDateMinute, displayImmediately, expirationDateMonth,
092                            expirationDateDay, expirationDateYear, expirationDateHour,
093                            expirationDateMinute, priority);
094            }
095    
096            public static AnnouncementsEntryService getService() {
097                    if (_service == null) {
098                            _service = (AnnouncementsEntryService)PortalBeanLocatorUtil.locate(AnnouncementsEntryService.class.getName());
099    
100                            ReferenceRegistry.registerReference(AnnouncementsEntryServiceUtil.class,
101                                    "_service");
102                    }
103    
104                    return _service;
105            }
106    
107            private static AnnouncementsEntryService _service;
108    }