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 com.liferay.announcements.kernel.model.AnnouncementsEntry getEntry(
061                    long entryId)
062                    throws com.liferay.portal.kernel.exception.PortalException {
063                    return getService().getEntry(entryId);
064            }
065    
066            public static com.liferay.announcements.kernel.model.AnnouncementsEntry updateEntry(
067                    long entryId, java.lang.String title, java.lang.String content,
068                    java.lang.String url, java.lang.String type, int displayDateMonth,
069                    int displayDateDay, int displayDateYear, int displayDateHour,
070                    int displayDateMinute, boolean displayImmediately,
071                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
072                    int expirationDateHour, int expirationDateMinute, int priority)
073                    throws com.liferay.portal.kernel.exception.PortalException {
074                    return getService()
075                                       .updateEntry(entryId, title, content, url, type,
076                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
077                            displayDateMinute, displayImmediately, expirationDateMonth,
078                            expirationDateDay, expirationDateYear, expirationDateHour,
079                            expirationDateMinute, priority);
080            }
081    
082            /**
083            * Returns the OSGi service identifier.
084            *
085            * @return the OSGi service identifier
086            */
087            public static java.lang.String getOSGiServiceIdentifier() {
088                    return getService().getOSGiServiceIdentifier();
089            }
090    
091            public static void deleteEntry(long entryId)
092                    throws com.liferay.portal.kernel.exception.PortalException {
093                    getService().deleteEntry(entryId);
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    }