1
22
23 package com.liferay.portlet.polls.service;
24
25
26
47 public class PollsQuestionServiceUtil {
48 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
49 long plid, java.lang.String title, java.lang.String description,
50 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
51 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
52 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
53 boolean addCommunityPermissions, boolean addGuestPermissions)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException, java.rmi.RemoteException {
56 return getService()
57 .addQuestion(plid, title, description, expirationDateMonth,
58 expirationDateDay, expirationDateYear, expirationDateHour,
59 expirationDateMinute, neverExpire, choices,
60 addCommunityPermissions, addGuestPermissions);
61 }
62
63 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
64 long plid, java.lang.String title, java.lang.String description,
65 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
66 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
67 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
68 java.lang.String[] communityPermissions,
69 java.lang.String[] guestPermissions)
70 throws com.liferay.portal.PortalException,
71 com.liferay.portal.SystemException, java.rmi.RemoteException {
72 return getService()
73 .addQuestion(plid, title, description, expirationDateMonth,
74 expirationDateDay, expirationDateYear, expirationDateHour,
75 expirationDateMinute, neverExpire, choices, communityPermissions,
76 guestPermissions);
77 }
78
79 public static void deleteQuestion(long questionId)
80 throws com.liferay.portal.PortalException,
81 com.liferay.portal.SystemException, java.rmi.RemoteException {
82 getService().deleteQuestion(questionId);
83 }
84
85 public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
86 long questionId)
87 throws com.liferay.portal.PortalException,
88 com.liferay.portal.SystemException, java.rmi.RemoteException {
89 return getService().getQuestion(questionId);
90 }
91
92 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
93 long questionId, java.lang.String title, java.lang.String description,
94 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
95 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
96 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException, java.rmi.RemoteException {
99 return getService()
100 .updateQuestion(questionId, title, description,
101 expirationDateMonth, expirationDateDay, expirationDateYear,
102 expirationDateHour, expirationDateMinute, neverExpire, choices);
103 }
104
105 public static PollsQuestionService getService() {
106 if (_service == null) {
107 throw new RuntimeException("PollsQuestionService is not set");
108 }
109
110 return _service;
111 }
112
113 public void setService(PollsQuestionService service) {
114 _service = service;
115 }
116
117 private static PollsQuestionService _service;
118 }