001
014
015 package com.liferay.portal.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.OrgLaborServiceUtil;
023
024
052 public class OrgLaborServiceHttp {
053 public static com.liferay.portal.model.OrgLabor addOrgLabor(
054 HttpPrincipal httpPrincipal, long organizationId, int typeId,
055 int sunOpen, int sunClose, int monOpen, int monClose, int tueOpen,
056 int tueClose, int wedOpen, int wedClose, int thuOpen, int thuClose,
057 int friOpen, int friClose, int satOpen, int satClose)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException {
060 try {
061 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class,
062 "addOrgLabor", _addOrgLaborParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey,
065 organizationId, typeId, sunOpen, sunClose, monOpen,
066 monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
067 thuClose, friOpen, friClose, satOpen, satClose);
068
069 Object returnObj = null;
070
071 try {
072 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
073 }
074 catch (Exception e) {
075 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
076 throw (com.liferay.portal.kernel.exception.PortalException)e;
077 }
078
079 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
080 throw (com.liferay.portal.kernel.exception.SystemException)e;
081 }
082
083 throw new com.liferay.portal.kernel.exception.SystemException(e);
084 }
085
086 return (com.liferay.portal.model.OrgLabor)returnObj;
087 }
088 catch (com.liferay.portal.kernel.exception.SystemException se) {
089 _log.error(se, se);
090
091 throw se;
092 }
093 }
094
095 public static void deleteOrgLabor(HttpPrincipal httpPrincipal,
096 long orgLaborId)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 try {
100 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class,
101 "deleteOrgLabor", _deleteOrgLaborParameterTypes1);
102
103 MethodHandler methodHandler = new MethodHandler(methodKey,
104 orgLaborId);
105
106 try {
107 TunnelUtil.invoke(httpPrincipal, methodHandler);
108 }
109 catch (Exception e) {
110 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
111 throw (com.liferay.portal.kernel.exception.PortalException)e;
112 }
113
114 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
115 throw (com.liferay.portal.kernel.exception.SystemException)e;
116 }
117
118 throw new com.liferay.portal.kernel.exception.SystemException(e);
119 }
120 }
121 catch (com.liferay.portal.kernel.exception.SystemException se) {
122 _log.error(se, se);
123
124 throw se;
125 }
126 }
127
128 public static com.liferay.portal.model.OrgLabor getOrgLabor(
129 HttpPrincipal httpPrincipal, long orgLaborId)
130 throws com.liferay.portal.kernel.exception.PortalException,
131 com.liferay.portal.kernel.exception.SystemException {
132 try {
133 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class,
134 "getOrgLabor", _getOrgLaborParameterTypes2);
135
136 MethodHandler methodHandler = new MethodHandler(methodKey,
137 orgLaborId);
138
139 Object returnObj = null;
140
141 try {
142 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
143 }
144 catch (Exception e) {
145 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
146 throw (com.liferay.portal.kernel.exception.PortalException)e;
147 }
148
149 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
150 throw (com.liferay.portal.kernel.exception.SystemException)e;
151 }
152
153 throw new com.liferay.portal.kernel.exception.SystemException(e);
154 }
155
156 return (com.liferay.portal.model.OrgLabor)returnObj;
157 }
158 catch (com.liferay.portal.kernel.exception.SystemException se) {
159 _log.error(se, se);
160
161 throw se;
162 }
163 }
164
165 public static java.util.List<com.liferay.portal.model.OrgLabor> getOrgLabors(
166 HttpPrincipal httpPrincipal, long organizationId)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 try {
170 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class,
171 "getOrgLabors", _getOrgLaborsParameterTypes3);
172
173 MethodHandler methodHandler = new MethodHandler(methodKey,
174 organizationId);
175
176 Object returnObj = null;
177
178 try {
179 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
180 }
181 catch (Exception e) {
182 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
183 throw (com.liferay.portal.kernel.exception.PortalException)e;
184 }
185
186 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
187 throw (com.liferay.portal.kernel.exception.SystemException)e;
188 }
189
190 throw new com.liferay.portal.kernel.exception.SystemException(e);
191 }
192
193 return (java.util.List<com.liferay.portal.model.OrgLabor>)returnObj;
194 }
195 catch (com.liferay.portal.kernel.exception.SystemException se) {
196 _log.error(se, se);
197
198 throw se;
199 }
200 }
201
202 public static com.liferay.portal.model.OrgLabor updateOrgLabor(
203 HttpPrincipal httpPrincipal, long orgLaborId, int typeId, int sunOpen,
204 int sunClose, int monOpen, int monClose, int tueOpen, int tueClose,
205 int wedOpen, int wedClose, int thuOpen, int thuClose, int friOpen,
206 int friClose, int satOpen, int satClose)
207 throws com.liferay.portal.kernel.exception.PortalException,
208 com.liferay.portal.kernel.exception.SystemException {
209 try {
210 MethodKey methodKey = new MethodKey(OrgLaborServiceUtil.class,
211 "updateOrgLabor", _updateOrgLaborParameterTypes4);
212
213 MethodHandler methodHandler = new MethodHandler(methodKey,
214 orgLaborId, typeId, sunOpen, sunClose, monOpen, monClose,
215 tueOpen, tueClose, wedOpen, wedClose, thuOpen, thuClose,
216 friOpen, friClose, satOpen, satClose);
217
218 Object returnObj = null;
219
220 try {
221 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
222 }
223 catch (Exception e) {
224 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
225 throw (com.liferay.portal.kernel.exception.PortalException)e;
226 }
227
228 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
229 throw (com.liferay.portal.kernel.exception.SystemException)e;
230 }
231
232 throw new com.liferay.portal.kernel.exception.SystemException(e);
233 }
234
235 return (com.liferay.portal.model.OrgLabor)returnObj;
236 }
237 catch (com.liferay.portal.kernel.exception.SystemException se) {
238 _log.error(se, se);
239
240 throw se;
241 }
242 }
243
244 private static Log _log = LogFactoryUtil.getLog(OrgLaborServiceHttp.class);
245 private static final Class<?>[] _addOrgLaborParameterTypes0 = new Class[] {
246 long.class, int.class, int.class, int.class, int.class, int.class,
247 int.class, int.class, int.class, int.class, int.class, int.class,
248 int.class, int.class, int.class, int.class
249 };
250 private static final Class<?>[] _deleteOrgLaborParameterTypes1 = new Class[] {
251 long.class
252 };
253 private static final Class<?>[] _getOrgLaborParameterTypes2 = new Class[] {
254 long.class
255 };
256 private static final Class<?>[] _getOrgLaborsParameterTypes3 = new Class[] {
257 long.class
258 };
259 private static final Class<?>[] _updateOrgLaborParameterTypes4 = new Class[] {
260 long.class, int.class, int.class, int.class, int.class, int.class,
261 int.class, int.class, int.class, int.class, int.class, int.class,
262 int.class, int.class, int.class, int.class
263 };
264 }