1
14
15 package com.liferay.portlet.polls.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19
20 import com.liferay.portlet.polls.service.PollsQuestionServiceUtil;
21
22 import java.rmi.RemoteException;
23
24
74 public class PollsQuestionServiceSoap {
75 public static com.liferay.portlet.polls.model.PollsQuestionSoap addQuestion(
76 java.lang.String title, java.lang.String description,
77 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
78 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
79 com.liferay.portlet.polls.model.PollsChoiceSoap[] choices,
80 com.liferay.portal.service.ServiceContext serviceContext)
81 throws RemoteException {
82 try {
83 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.addQuestion(title,
84 description, expirationDateMonth, expirationDateDay,
85 expirationDateYear, expirationDateHour,
86 expirationDateMinute, neverExpire,
87 com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl.toModels(
88 choices), serviceContext);
89
90 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
91 }
92 catch (Exception e) {
93 _log.error(e, e);
94
95 throw new RemoteException(e.getMessage());
96 }
97 }
98
99 public static void deleteQuestion(long questionId)
100 throws RemoteException {
101 try {
102 PollsQuestionServiceUtil.deleteQuestion(questionId);
103 }
104 catch (Exception e) {
105 _log.error(e, e);
106
107 throw new RemoteException(e.getMessage());
108 }
109 }
110
111 public static com.liferay.portlet.polls.model.PollsQuestionSoap getQuestion(
112 long questionId) throws RemoteException {
113 try {
114 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.getQuestion(questionId);
115
116 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
117 }
118 catch (Exception e) {
119 _log.error(e, e);
120
121 throw new RemoteException(e.getMessage());
122 }
123 }
124
125 public static com.liferay.portlet.polls.model.PollsQuestionSoap updateQuestion(
126 long questionId, java.lang.String title, java.lang.String description,
127 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
128 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
129 com.liferay.portlet.polls.model.PollsChoiceSoap[] choices,
130 com.liferay.portal.service.ServiceContext serviceContext)
131 throws RemoteException {
132 try {
133 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.updateQuestion(questionId,
134 title, description, expirationDateMonth, expirationDateDay,
135 expirationDateYear, expirationDateHour,
136 expirationDateMinute, neverExpire,
137 com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl.toModels(
138 choices), serviceContext);
139
140 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
141 }
142 catch (Exception e) {
143 _log.error(e, e);
144
145 throw new RemoteException(e.getMessage());
146 }
147 }
148
149 private static Log _log = LogFactoryUtil.getLog(PollsQuestionServiceSoap.class);
150 }