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 long plid, 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 boolean addCommunityPermissions, boolean addGuestPermissions)
81 throws RemoteException {
82 try {
83 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.addQuestion(plid,
84 title, description, expirationDateMonth, expirationDateDay,
85 expirationDateYear, expirationDateHour,
86 expirationDateMinute, neverExpire,
87 com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl.toModels(
88 choices), addCommunityPermissions, addGuestPermissions);
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 com.liferay.portlet.polls.model.PollsQuestionSoap addQuestion(
100 long plid, java.lang.String title, java.lang.String description,
101 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
102 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
103 com.liferay.portlet.polls.model.PollsChoiceSoap[] choices,
104 java.lang.String[] communityPermissions,
105 java.lang.String[] guestPermissions) throws RemoteException {
106 try {
107 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.addQuestion(plid,
108 title, description, expirationDateMonth, expirationDateDay,
109 expirationDateYear, expirationDateHour,
110 expirationDateMinute, neverExpire,
111 com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl.toModels(
112 choices), communityPermissions, guestPermissions);
113
114 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
115 }
116 catch (Exception e) {
117 _log.error(e, e);
118
119 throw new RemoteException(e.getMessage());
120 }
121 }
122
123 public static void deleteQuestion(long questionId)
124 throws RemoteException {
125 try {
126 PollsQuestionServiceUtil.deleteQuestion(questionId);
127 }
128 catch (Exception e) {
129 _log.error(e, e);
130
131 throw new RemoteException(e.getMessage());
132 }
133 }
134
135 public static com.liferay.portlet.polls.model.PollsQuestionSoap getQuestion(
136 long questionId) throws RemoteException {
137 try {
138 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.getQuestion(questionId);
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 public static com.liferay.portlet.polls.model.PollsQuestionSoap updateQuestion(
150 long questionId, java.lang.String title, java.lang.String description,
151 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
152 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
153 com.liferay.portlet.polls.model.PollsChoiceSoap[] choices)
154 throws RemoteException {
155 try {
156 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.updateQuestion(questionId,
157 title, description, expirationDateMonth, expirationDateDay,
158 expirationDateYear, expirationDateHour,
159 expirationDateMinute, neverExpire,
160 com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl.toModels(
161 choices));
162
163 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
164 }
165 catch (Exception e) {
166 _log.error(e, e);
167
168 throw new RemoteException(e.getMessage());
169 }
170 }
171
172 private static Log _log = LogFactoryUtil.getLog(PollsQuestionServiceSoap.class);
173 }