1
22
23 package com.liferay.portlet.polls.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27
28 import com.liferay.portlet.polls.service.PollsQuestionServiceUtil;
29
30 import java.rmi.RemoteException;
31
32
83 public class PollsQuestionServiceSoap {
84 public static com.liferay.portlet.polls.model.PollsQuestionSoap addQuestion(
85 long plid, java.lang.String title, java.lang.String description,
86 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
87 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
88 java.util.List choices, boolean addCommunityPermissions,
89 boolean addGuestPermissions) throws RemoteException {
90 try {
91 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.addQuestion(plid,
92 title, description, expirationDateMonth, expirationDateDay,
93 expirationDateYear, expirationDateHour,
94 expirationDateMinute, neverExpire, choices,
95 addCommunityPermissions, addGuestPermissions);
96
97 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
98 }
99 catch (Exception e) {
100 _log.error(e, e);
101
102 throw new RemoteException(e.getMessage());
103 }
104 }
105
106 public static com.liferay.portlet.polls.model.PollsQuestionSoap addQuestion(
107 long plid, java.lang.String title, java.lang.String description,
108 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
109 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
110 java.util.List choices, java.lang.String[] communityPermissions,
111 java.lang.String[] guestPermissions) throws RemoteException {
112 try {
113 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.addQuestion(plid,
114 title, description, expirationDateMonth, expirationDateDay,
115 expirationDateYear, expirationDateHour,
116 expirationDateMinute, neverExpire, choices,
117 communityPermissions, guestPermissions);
118
119 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
120 }
121 catch (Exception e) {
122 _log.error(e, e);
123
124 throw new RemoteException(e.getMessage());
125 }
126 }
127
128 public static void deleteQuestion(long questionId)
129 throws RemoteException {
130 try {
131 PollsQuestionServiceUtil.deleteQuestion(questionId);
132 }
133 catch (Exception e) {
134 _log.error(e, e);
135
136 throw new RemoteException(e.getMessage());
137 }
138 }
139
140 public static com.liferay.portlet.polls.model.PollsQuestionSoap getQuestion(
141 long questionId) throws RemoteException {
142 try {
143 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.getQuestion(questionId);
144
145 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static com.liferay.portlet.polls.model.PollsQuestionSoap updateQuestion(
155 long questionId, java.lang.String title, java.lang.String description,
156 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
157 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
158 java.util.List choices) throws RemoteException {
159 try {
160 com.liferay.portlet.polls.model.PollsQuestion returnValue = PollsQuestionServiceUtil.updateQuestion(questionId,
161 title, description, expirationDateMonth, expirationDateDay,
162 expirationDateYear, expirationDateHour,
163 expirationDateMinute, neverExpire, choices);
164
165 return com.liferay.portlet.polls.model.PollsQuestionSoap.toSoapModel(returnValue);
166 }
167 catch (Exception e) {
168 _log.error(e, e);
169
170 throw new RemoteException(e.getMessage());
171 }
172 }
173
174 private static Log _log = LogFactoryUtil.getLog(PollsQuestionServiceSoap.class);
175 }