001    /**
002     * Copyright (c) 2000-2013 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    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * 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.
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 PollsQuestionService
029     * @see com.liferay.portlet.polls.service.base.PollsQuestionServiceBaseImpl
030     * @see com.liferay.portlet.polls.service.impl.PollsQuestionServiceImpl
031     * @generated
032     */
033    public class PollsQuestionServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * 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.
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.polls.model.PollsQuestion addQuestion(
059                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
060                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
061                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
062                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
063                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService()
068                                       .addQuestion(titleMap, descriptionMap, expirationDateMonth,
069                            expirationDateDay, expirationDateYear, expirationDateHour,
070                            expirationDateMinute, neverExpire, choices, serviceContext);
071            }
072    
073            public static void deleteQuestion(long questionId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    getService().deleteQuestion(questionId);
077            }
078    
079            public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
080                    long questionId)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    return getService().getQuestion(questionId);
084            }
085    
086            public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
087                    long questionId,
088                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
089                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
090                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
091                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
092                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
093                    com.liferay.portal.service.ServiceContext serviceContext)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException {
096                    return getService()
097                                       .updateQuestion(questionId, titleMap, descriptionMap,
098                            expirationDateMonth, expirationDateDay, expirationDateYear,
099                            expirationDateHour, expirationDateMinute, neverExpire, choices,
100                            serviceContext);
101            }
102    
103            public static PollsQuestionService getService() {
104                    if (_service == null) {
105                            _service = (PollsQuestionService)PortalBeanLocatorUtil.locate(PollsQuestionService.class.getName());
106    
107                            ReferenceRegistry.registerReference(PollsQuestionServiceUtil.class,
108                                    "_service");
109                    }
110    
111                    return _service;
112            }
113    
114            /**
115             * @deprecated
116             */
117            public void setService(PollsQuestionService service) {
118            }
119    
120            private static PollsQuestionService _service;
121    }