001
014
015 package com.liferay.portlet.polls.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
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 }