1
14
15 package com.liferay.portlet.tasks.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.tasks.service.TasksProposalServiceUtil;
25
26
63 public class TasksProposalServiceHttp {
64 public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
65 HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
66 java.lang.String classPK, java.lang.String name,
67 java.lang.String description, long reviewUserId,
68 boolean addCommunityPermissions, boolean addGuestPermissions)
69 throws com.liferay.portal.PortalException,
70 com.liferay.portal.SystemException {
71 try {
72 MethodKey methodKey = new MethodKey(TasksProposalServiceUtil.class.getName(),
73 "addProposal", _addProposalParameterTypes0);
74
75 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
76 className, classPK, name, description, reviewUserId,
77 addCommunityPermissions, addGuestPermissions);
78
79 Object returnObj = null;
80
81 try {
82 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
83 }
84 catch (Exception e) {
85 if (e instanceof com.liferay.portal.PortalException) {
86 throw (com.liferay.portal.PortalException)e;
87 }
88
89 if (e instanceof com.liferay.portal.SystemException) {
90 throw (com.liferay.portal.SystemException)e;
91 }
92
93 throw new com.liferay.portal.SystemException(e);
94 }
95
96 return (com.liferay.portlet.tasks.model.TasksProposal)returnObj;
97 }
98 catch (com.liferay.portal.SystemException se) {
99 _log.error(se, se);
100
101 throw se;
102 }
103 }
104
105 public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
106 HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
107 java.lang.String classPK, java.lang.String name,
108 java.lang.String description, long reviewUserId,
109 java.lang.String[] communityPermissions,
110 java.lang.String[] guestPermissions)
111 throws com.liferay.portal.PortalException,
112 com.liferay.portal.SystemException {
113 try {
114 MethodKey methodKey = new MethodKey(TasksProposalServiceUtil.class.getName(),
115 "addProposal", _addProposalParameterTypes1);
116
117 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
118 className, classPK, name, description, reviewUserId,
119 communityPermissions, guestPermissions);
120
121 Object returnObj = null;
122
123 try {
124 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
125 }
126 catch (Exception e) {
127 if (e instanceof com.liferay.portal.PortalException) {
128 throw (com.liferay.portal.PortalException)e;
129 }
130
131 if (e instanceof com.liferay.portal.SystemException) {
132 throw (com.liferay.portal.SystemException)e;
133 }
134
135 throw new com.liferay.portal.SystemException(e);
136 }
137
138 return (com.liferay.portlet.tasks.model.TasksProposal)returnObj;
139 }
140 catch (com.liferay.portal.SystemException se) {
141 _log.error(se, se);
142
143 throw se;
144 }
145 }
146
147 public static void deleteProposal(HttpPrincipal httpPrincipal,
148 long proposalId)
149 throws com.liferay.portal.PortalException,
150 com.liferay.portal.SystemException {
151 try {
152 MethodKey methodKey = new MethodKey(TasksProposalServiceUtil.class.getName(),
153 "deleteProposal", _deleteProposalParameterTypes2);
154
155 MethodHandler methodHandler = new MethodHandler(methodKey,
156 proposalId);
157
158 try {
159 TunnelUtil.invoke(httpPrincipal, methodHandler);
160 }
161 catch (Exception e) {
162 if (e instanceof com.liferay.portal.PortalException) {
163 throw (com.liferay.portal.PortalException)e;
164 }
165
166 if (e instanceof com.liferay.portal.SystemException) {
167 throw (com.liferay.portal.SystemException)e;
168 }
169
170 throw new com.liferay.portal.SystemException(e);
171 }
172 }
173 catch (com.liferay.portal.SystemException se) {
174 _log.error(se, se);
175
176 throw se;
177 }
178 }
179
180 public static com.liferay.portlet.tasks.model.TasksProposal updateProposal(
181 HttpPrincipal httpPrincipal, long proposalId,
182 java.lang.String description, int dueDateMonth, int dueDateDay,
183 int dueDateYear, int dueDateHour, int dueDateMinute)
184 throws com.liferay.portal.PortalException,
185 com.liferay.portal.SystemException {
186 try {
187 MethodKey methodKey = new MethodKey(TasksProposalServiceUtil.class.getName(),
188 "updateProposal", _updateProposalParameterTypes3);
189
190 MethodHandler methodHandler = new MethodHandler(methodKey,
191 proposalId, description, dueDateMonth, dueDateDay,
192 dueDateYear, dueDateHour, dueDateMinute);
193
194 Object returnObj = null;
195
196 try {
197 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
198 }
199 catch (Exception e) {
200 if (e instanceof com.liferay.portal.PortalException) {
201 throw (com.liferay.portal.PortalException)e;
202 }
203
204 if (e instanceof com.liferay.portal.SystemException) {
205 throw (com.liferay.portal.SystemException)e;
206 }
207
208 throw new com.liferay.portal.SystemException(e);
209 }
210
211 return (com.liferay.portlet.tasks.model.TasksProposal)returnObj;
212 }
213 catch (com.liferay.portal.SystemException se) {
214 _log.error(se, se);
215
216 throw se;
217 }
218 }
219
220 private static Log _log = LogFactoryUtil.getLog(TasksProposalServiceHttp.class);
221 private static final Class<?>[] _addProposalParameterTypes0 = new Class[] {
222 long.class, java.lang.String.class, java.lang.String.class,
223 java.lang.String.class, java.lang.String.class, long.class,
224 boolean.class, boolean.class
225 };
226 private static final Class<?>[] _addProposalParameterTypes1 = new Class[] {
227 long.class, java.lang.String.class, java.lang.String.class,
228 java.lang.String.class, java.lang.String.class, long.class,
229 java.lang.String[].class, java.lang.String[].class
230 };
231 private static final Class<?>[] _deleteProposalParameterTypes2 = new Class[] {
232 long.class
233 };
234 private static final Class<?>[] _updateProposalParameterTypes3 = new Class[] {
235 long.class, java.lang.String.class, int.class, int.class, int.class,
236 int.class, int.class
237 };
238 }