1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.IntegerWrapper;
28 import com.liferay.portal.kernel.util.LongWrapper;
29 import com.liferay.portal.kernel.util.MethodWrapper;
30 import com.liferay.portal.security.auth.HttpPrincipal;
31 import com.liferay.portal.service.OrgLaborServiceUtil;
32 import com.liferay.portal.service.http.TunnelUtil;
33
34
71 public class OrgLaborServiceHttp {
72 public static com.liferay.portal.model.OrgLabor addOrgLabor(
73 HttpPrincipal httpPrincipal, long organizationId, int typeId,
74 int sunOpen, int sunClose, int monOpen, int monClose, int tueOpen,
75 int tueClose, int wedOpen, int wedClose, int thuOpen, int thuClose,
76 int friOpen, int friClose, int satOpen, int satClose)
77 throws com.liferay.portal.SystemException,
78 com.liferay.portal.PortalException {
79 try {
80 Object paramObj0 = new LongWrapper(organizationId);
81 Object paramObj1 = new IntegerWrapper(typeId);
82 Object paramObj2 = new IntegerWrapper(sunOpen);
83 Object paramObj3 = new IntegerWrapper(sunClose);
84 Object paramObj4 = new IntegerWrapper(monOpen);
85 Object paramObj5 = new IntegerWrapper(monClose);
86 Object paramObj6 = new IntegerWrapper(tueOpen);
87 Object paramObj7 = new IntegerWrapper(tueClose);
88 Object paramObj8 = new IntegerWrapper(wedOpen);
89 Object paramObj9 = new IntegerWrapper(wedClose);
90 Object paramObj10 = new IntegerWrapper(thuOpen);
91 Object paramObj11 = new IntegerWrapper(thuClose);
92 Object paramObj12 = new IntegerWrapper(friOpen);
93 Object paramObj13 = new IntegerWrapper(friClose);
94 Object paramObj14 = new IntegerWrapper(satOpen);
95 Object paramObj15 = new IntegerWrapper(satClose);
96 MethodWrapper methodWrapper = new MethodWrapper(OrgLaborServiceUtil.class.getName(),
97 "addOrgLabor",
98 new Object[] {
99 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
100 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
101 paramObj10, paramObj11, paramObj12, paramObj13,
102 paramObj14, paramObj15
103 });
104 Object returnObj = null;
105
106 try {
107 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
108 }
109 catch (Exception e) {
110 if (e instanceof com.liferay.portal.SystemException) {
111 throw (com.liferay.portal.SystemException)e;
112 }
113
114 if (e instanceof com.liferay.portal.PortalException) {
115 throw (com.liferay.portal.PortalException)e;
116 }
117
118 throw new com.liferay.portal.SystemException(e);
119 }
120
121 return (com.liferay.portal.model.OrgLabor)returnObj;
122 }
123 catch (com.liferay.portal.SystemException se) {
124 _log.error(se, se);
125 throw se;
126 }
127 }
128
129 public static void deleteOrgLabor(HttpPrincipal httpPrincipal,
130 long orgLaborId)
131 throws com.liferay.portal.SystemException,
132 com.liferay.portal.PortalException {
133 try {
134 Object paramObj0 = new LongWrapper(orgLaborId);
135 MethodWrapper methodWrapper = new MethodWrapper(OrgLaborServiceUtil.class.getName(),
136 "deleteOrgLabor", new Object[] { paramObj0 });
137
138 try {
139 TunnelUtil.invoke(httpPrincipal, methodWrapper);
140 }
141 catch (Exception e) {
142 if (e instanceof com.liferay.portal.SystemException) {
143 throw (com.liferay.portal.SystemException)e;
144 }
145
146 if (e instanceof com.liferay.portal.PortalException) {
147 throw (com.liferay.portal.PortalException)e;
148 }
149
150 throw new com.liferay.portal.SystemException(e);
151 }
152 }
153 catch (com.liferay.portal.SystemException se) {
154 _log.error(se, se);
155 throw se;
156 }
157 }
158
159 public static com.liferay.portal.model.OrgLabor getOrgLabor(
160 HttpPrincipal httpPrincipal, long orgLaborId)
161 throws com.liferay.portal.SystemException,
162 com.liferay.portal.PortalException {
163 try {
164 Object paramObj0 = new LongWrapper(orgLaborId);
165 MethodWrapper methodWrapper = new MethodWrapper(OrgLaborServiceUtil.class.getName(),
166 "getOrgLabor", new Object[] { paramObj0 });
167 Object returnObj = null;
168
169 try {
170 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
171 }
172 catch (Exception e) {
173 if (e instanceof com.liferay.portal.SystemException) {
174 throw (com.liferay.portal.SystemException)e;
175 }
176
177 if (e instanceof com.liferay.portal.PortalException) {
178 throw (com.liferay.portal.PortalException)e;
179 }
180
181 throw new com.liferay.portal.SystemException(e);
182 }
183
184 return (com.liferay.portal.model.OrgLabor)returnObj;
185 }
186 catch (com.liferay.portal.SystemException se) {
187 _log.error(se, se);
188 throw se;
189 }
190 }
191
192 public static java.util.List getOrgLabors(HttpPrincipal httpPrincipal,
193 long organizationId)
194 throws com.liferay.portal.SystemException,
195 com.liferay.portal.PortalException {
196 try {
197 Object paramObj0 = new LongWrapper(organizationId);
198 MethodWrapper methodWrapper = new MethodWrapper(OrgLaborServiceUtil.class.getName(),
199 "getOrgLabors", new Object[] { paramObj0 });
200 Object returnObj = null;
201
202 try {
203 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
204 }
205 catch (Exception e) {
206 if (e instanceof com.liferay.portal.SystemException) {
207 throw (com.liferay.portal.SystemException)e;
208 }
209
210 if (e instanceof com.liferay.portal.PortalException) {
211 throw (com.liferay.portal.PortalException)e;
212 }
213
214 throw new com.liferay.portal.SystemException(e);
215 }
216
217 return (java.util.List)returnObj;
218 }
219 catch (com.liferay.portal.SystemException se) {
220 _log.error(se, se);
221 throw se;
222 }
223 }
224
225 public static com.liferay.portal.model.OrgLabor updateOrgLabor(
226 HttpPrincipal httpPrincipal, long orgLaborId, int sunOpen,
227 int sunClose, int monOpen, int monClose, int tueOpen, int tueClose,
228 int wedOpen, int wedClose, int thuOpen, int thuClose, int friOpen,
229 int friClose, int satOpen, int satClose)
230 throws com.liferay.portal.SystemException,
231 com.liferay.portal.PortalException {
232 try {
233 Object paramObj0 = new LongWrapper(orgLaborId);
234 Object paramObj1 = new IntegerWrapper(sunOpen);
235 Object paramObj2 = new IntegerWrapper(sunClose);
236 Object paramObj3 = new IntegerWrapper(monOpen);
237 Object paramObj4 = new IntegerWrapper(monClose);
238 Object paramObj5 = new IntegerWrapper(tueOpen);
239 Object paramObj6 = new IntegerWrapper(tueClose);
240 Object paramObj7 = new IntegerWrapper(wedOpen);
241 Object paramObj8 = new IntegerWrapper(wedClose);
242 Object paramObj9 = new IntegerWrapper(thuOpen);
243 Object paramObj10 = new IntegerWrapper(thuClose);
244 Object paramObj11 = new IntegerWrapper(friOpen);
245 Object paramObj12 = new IntegerWrapper(friClose);
246 Object paramObj13 = new IntegerWrapper(satOpen);
247 Object paramObj14 = new IntegerWrapper(satClose);
248 MethodWrapper methodWrapper = new MethodWrapper(OrgLaborServiceUtil.class.getName(),
249 "updateOrgLabor",
250 new Object[] {
251 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
252 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
253 paramObj10, paramObj11, paramObj12, paramObj13,
254 paramObj14
255 });
256 Object returnObj = null;
257
258 try {
259 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
260 }
261 catch (Exception e) {
262 if (e instanceof com.liferay.portal.SystemException) {
263 throw (com.liferay.portal.SystemException)e;
264 }
265
266 if (e instanceof com.liferay.portal.PortalException) {
267 throw (com.liferay.portal.PortalException)e;
268 }
269
270 throw new com.liferay.portal.SystemException(e);
271 }
272
273 return (com.liferay.portal.model.OrgLabor)returnObj;
274 }
275 catch (com.liferay.portal.SystemException se) {
276 _log.error(se, se);
277 throw se;
278 }
279 }
280
281 private static Log _log = LogFactoryUtil.getLog(OrgLaborServiceHttp.class);
282 }