001    /**
002     * Copyright (c) 2000-2010 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.polls.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * The utility for the polls question remote service. This utility wraps {@link com.liferay.portlet.polls.service.impl.PollsQuestionServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.polls.service.impl.PollsQuestionServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * 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.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see PollsQuestionService
032     * @see com.liferay.portlet.polls.service.base.PollsQuestionServiceBaseImpl
033     * @see com.liferay.portlet.polls.service.impl.PollsQuestionServiceImpl
034     * @generated
035     */
036    public class PollsQuestionServiceUtil {
037            public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
038                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
039                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
040                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
041                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
042                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
043                    com.liferay.portal.service.ServiceContext serviceContext)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    return getService()
047                                       .addQuestion(titleMap, descriptionMap, expirationDateMonth,
048                            expirationDateDay, expirationDateYear, expirationDateHour,
049                            expirationDateMinute, neverExpire, choices, serviceContext);
050            }
051    
052            public static void deleteQuestion(long questionId)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    getService().deleteQuestion(questionId);
056            }
057    
058            public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
059                    long questionId)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().getQuestion(questionId);
063            }
064    
065            public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
066                    long questionId,
067                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
068                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
069                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
070                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
071                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService()
076                                       .updateQuestion(questionId, titleMap, descriptionMap,
077                            expirationDateMonth, expirationDateDay, expirationDateYear,
078                            expirationDateHour, expirationDateMinute, neverExpire, choices,
079                            serviceContext);
080            }
081    
082            public static PollsQuestionService getService() {
083                    if (_service == null) {
084                            _service = (PollsQuestionService)PortalBeanLocatorUtil.locate(PollsQuestionService.class.getName());
085                    }
086    
087                    return _service;
088            }
089    
090            public void setService(PollsQuestionService service) {
091                    _service = service;
092            }
093    
094            private static PollsQuestionService _service;
095    }