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