1
14
15 package com.liferay.portal.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.OrgLaborServiceUtil;
23
24
61 public class OrgLaborServiceHttp {
62 public static com.liferay.portal.model.OrgLabor addOrgLabor(
63 HttpPrincipal httpPrincipal, long organizationId, int typeId,
64 int sunOpen, int sunClose, int monOpen, int monClose, int tueOpen,
65 int tueClose, int wedOpen, int wedClose, int thuOpen, int thuClose,
66 int friOpen, int friClose, int satOpen, int satClose)
67 throws com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException {
69 try {
70 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class.getName(),
71 "addOrgLabor", _addOrgLaborParameterTypes0);
72
73 MethodHandler methodHandler = new MethodHandler(methodKey,
74 organizationId, typeId, sunOpen, sunClose, monOpen,
75 monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
76 thuClose, friOpen, friClose, satOpen, satClose);
77
78 Object returnObj = null;
79
80 try {
81 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
82 }
83 catch (Exception e) {
84 if (e instanceof com.liferay.portal.PortalException) {
85 throw (com.liferay.portal.PortalException)e;
86 }
87
88 if (e instanceof com.liferay.portal.SystemException) {
89 throw (com.liferay.portal.SystemException)e;
90 }
91
92 throw new com.liferay.portal.SystemException(e);
93 }
94
95 return (com.liferay.portal.model.OrgLabor)returnObj;
96 }
97 catch (com.liferay.portal.SystemException se) {
98 _log.error(se, se);
99
100 throw se;
101 }
102 }
103
104 public static void deleteOrgLabor(HttpPrincipal httpPrincipal,
105 long orgLaborId)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 try {
109 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class.getName(),
110 "deleteOrgLabor", _deleteOrgLaborParameterTypes1);
111
112 MethodHandler methodHandler = new MethodHandler(methodKey,
113 orgLaborId);
114
115 try {
116 TunnelUtil.invoke(httpPrincipal, methodHandler);
117 }
118 catch (Exception e) {
119 if (e instanceof com.liferay.portal.PortalException) {
120 throw (com.liferay.portal.PortalException)e;
121 }
122
123 if (e instanceof com.liferay.portal.SystemException) {
124 throw (com.liferay.portal.SystemException)e;
125 }
126
127 throw new com.liferay.portal.SystemException(e);
128 }
129 }
130 catch (com.liferay.portal.SystemException se) {
131 _log.error(se, se);
132
133 throw se;
134 }
135 }
136
137 public static com.liferay.portal.model.OrgLabor getOrgLabor(
138 HttpPrincipal httpPrincipal, long orgLaborId)
139 throws com.liferay.portal.PortalException,
140 com.liferay.portal.SystemException {
141 try {
142 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class.getName(),
143 "getOrgLabor", _getOrgLaborParameterTypes2);
144
145 MethodHandler methodHandler = new MethodHandler(methodKey,
146 orgLaborId);
147
148 Object returnObj = null;
149
150 try {
151 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
152 }
153 catch (Exception e) {
154 if (e instanceof com.liferay.portal.PortalException) {
155 throw (com.liferay.portal.PortalException)e;
156 }
157
158 if (e instanceof com.liferay.portal.SystemException) {
159 throw (com.liferay.portal.SystemException)e;
160 }
161
162 throw new com.liferay.portal.SystemException(e);
163 }
164
165 return (com.liferay.portal.model.OrgLabor)returnObj;
166 }
167 catch (com.liferay.portal.SystemException se) {
168 _log.error(se, se);
169
170 throw se;
171 }
172 }
173
174 public static java.util.List<com.liferay.portal.model.OrgLabor> getOrgLabors(
175 HttpPrincipal httpPrincipal, long organizationId)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException {
178 try {
179 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class.getName(),
180 "getOrgLabors", _getOrgLaborsParameterTypes3);
181
182 MethodHandler methodHandler = new MethodHandler(methodKey,
183 organizationId);
184
185 Object returnObj = null;
186
187 try {
188 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
189 }
190 catch (Exception e) {
191 if (e instanceof com.liferay.portal.PortalException) {
192 throw (com.liferay.portal.PortalException)e;
193 }
194
195 if (e instanceof com.liferay.portal.SystemException) {
196 throw (com.liferay.portal.SystemException)e;
197 }
198
199 throw new com.liferay.portal.SystemException(e);
200 }
201
202 return (java.util.List<com.liferay.portal.model.OrgLabor>)returnObj;
203 }
204 catch (com.liferay.portal.SystemException se) {
205 _log.error(se, se);
206
207 throw se;
208 }
209 }
210
211 public static com.liferay.portal.model.OrgLabor updateOrgLabor(
212 HttpPrincipal httpPrincipal, long orgLaborId, int typeId, int sunOpen,
213 int sunClose, int monOpen, int monClose, int tueOpen, int tueClose,
214 int wedOpen, int wedClose, int thuOpen, int thuClose, int friOpen,
215 int friClose, int satOpen, int satClose)
216 throws com.liferay.portal.PortalException,
217 com.liferay.portal.SystemException {
218 try {
219 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class.getName(),
220 "updateOrgLabor", _updateOrgLaborParameterTypes4);
221
222 MethodHandler methodHandler = new MethodHandler(methodKey,
223 orgLaborId, typeId, sunOpen, sunClose, monOpen, monClose,
224 tueOpen, tueClose, wedOpen, wedClose, thuOpen, thuClose,
225 friOpen, friClose, satOpen, satClose);
226
227 Object returnObj = null;
228
229 try {
230 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
231 }
232 catch (Exception e) {
233 if (e instanceof com.liferay.portal.PortalException) {
234 throw (com.liferay.portal.PortalException)e;
235 }
236
237 if (e instanceof com.liferay.portal.SystemException) {
238 throw (com.liferay.portal.SystemException)e;
239 }
240
241 throw new com.liferay.portal.SystemException(e);
242 }
243
244 return (com.liferay.portal.model.OrgLabor)returnObj;
245 }
246 catch (com.liferay.portal.SystemException se) {
247 _log.error(se, se);
248
249 throw se;
250 }
251 }
252
253 private static Log _log = LogFactoryUtil.getLog(OrgLaborServiceHttp.class);
254 private static final Class<?>[] _addOrgLaborParameterTypes0 = new Class[] {
255 long.class, int.class, int.class, int.class, int.class, int.class,
256 int.class, int.class, int.class, int.class, int.class, int.class,
257 int.class, int.class, int.class, int.class
258 };
259 private static final Class<?>[] _deleteOrgLaborParameterTypes1 = new Class[] {
260 long.class
261 };
262 private static final Class<?>[] _getOrgLaborParameterTypes2 = new Class[] {
263 long.class
264 };
265 private static final Class<?>[] _getOrgLaborsParameterTypes3 = new Class[] {
266 long.class
267 };
268 private static final Class<?>[] _updateOrgLaborParameterTypes4 = new Class[] {
269 long.class, int.class, int.class, int.class, int.class, int.class,
270 int.class, int.class, int.class, int.class, int.class, int.class,
271 int.class, int.class, int.class, int.class
272 };
273 }