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.CompanyServiceUtil;
023
024
054 public class CompanyServiceHttp {
055 public static com.liferay.portal.model.Company addCompany(
056 HttpPrincipal httpPrincipal, java.lang.String webId,
057 java.lang.String virtualHost, java.lang.String mx,
058 java.lang.String shardName, boolean system, int maxUsers, boolean active)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 try {
062 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
063 "addCompany", _addCompanyParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey, webId,
066 virtualHost, mx, shardName, system, maxUsers, active);
067
068 Object returnObj = null;
069
070 try {
071 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
072 }
073 catch (Exception e) {
074 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
075 throw (com.liferay.portal.kernel.exception.PortalException)e;
076 }
077
078 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
079 throw (com.liferay.portal.kernel.exception.SystemException)e;
080 }
081
082 throw new com.liferay.portal.kernel.exception.SystemException(e);
083 }
084
085 return (com.liferay.portal.model.Company)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 deleteLogo(HttpPrincipal httpPrincipal, long companyId)
095 throws com.liferay.portal.kernel.exception.PortalException,
096 com.liferay.portal.kernel.exception.SystemException {
097 try {
098 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
099 "deleteLogo", _deleteLogoParameterTypes1);
100
101 MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
102
103 try {
104 TunnelUtil.invoke(httpPrincipal, methodHandler);
105 }
106 catch (Exception e) {
107 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
108 throw (com.liferay.portal.kernel.exception.PortalException)e;
109 }
110
111 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
112 throw (com.liferay.portal.kernel.exception.SystemException)e;
113 }
114
115 throw new com.liferay.portal.kernel.exception.SystemException(e);
116 }
117 }
118 catch (com.liferay.portal.kernel.exception.SystemException se) {
119 _log.error(se, se);
120
121 throw se;
122 }
123 }
124
125 public static com.liferay.portal.model.Company getCompanyById(
126 HttpPrincipal httpPrincipal, long companyId)
127 throws com.liferay.portal.kernel.exception.PortalException,
128 com.liferay.portal.kernel.exception.SystemException {
129 try {
130 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
131 "getCompanyById", _getCompanyByIdParameterTypes2);
132
133 MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
134
135 Object returnObj = null;
136
137 try {
138 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
139 }
140 catch (Exception e) {
141 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
142 throw (com.liferay.portal.kernel.exception.PortalException)e;
143 }
144
145 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
146 throw (com.liferay.portal.kernel.exception.SystemException)e;
147 }
148
149 throw new com.liferay.portal.kernel.exception.SystemException(e);
150 }
151
152 return (com.liferay.portal.model.Company)returnObj;
153 }
154 catch (com.liferay.portal.kernel.exception.SystemException se) {
155 _log.error(se, se);
156
157 throw se;
158 }
159 }
160
161 public static com.liferay.portal.model.Company getCompanyByLogoId(
162 HttpPrincipal httpPrincipal, long logoId)
163 throws com.liferay.portal.kernel.exception.PortalException,
164 com.liferay.portal.kernel.exception.SystemException {
165 try {
166 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
167 "getCompanyByLogoId", _getCompanyByLogoIdParameterTypes3);
168
169 MethodHandler methodHandler = new MethodHandler(methodKey, logoId);
170
171 Object returnObj = null;
172
173 try {
174 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
175 }
176 catch (Exception e) {
177 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
178 throw (com.liferay.portal.kernel.exception.PortalException)e;
179 }
180
181 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
182 throw (com.liferay.portal.kernel.exception.SystemException)e;
183 }
184
185 throw new com.liferay.portal.kernel.exception.SystemException(e);
186 }
187
188 return (com.liferay.portal.model.Company)returnObj;
189 }
190 catch (com.liferay.portal.kernel.exception.SystemException se) {
191 _log.error(se, se);
192
193 throw se;
194 }
195 }
196
197 public static com.liferay.portal.model.Company getCompanyByMx(
198 HttpPrincipal httpPrincipal, java.lang.String mx)
199 throws com.liferay.portal.kernel.exception.PortalException,
200 com.liferay.portal.kernel.exception.SystemException {
201 try {
202 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
203 "getCompanyByMx", _getCompanyByMxParameterTypes4);
204
205 MethodHandler methodHandler = new MethodHandler(methodKey, mx);
206
207 Object returnObj = null;
208
209 try {
210 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
211 }
212 catch (Exception e) {
213 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
214 throw (com.liferay.portal.kernel.exception.PortalException)e;
215 }
216
217 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
218 throw (com.liferay.portal.kernel.exception.SystemException)e;
219 }
220
221 throw new com.liferay.portal.kernel.exception.SystemException(e);
222 }
223
224 return (com.liferay.portal.model.Company)returnObj;
225 }
226 catch (com.liferay.portal.kernel.exception.SystemException se) {
227 _log.error(se, se);
228
229 throw se;
230 }
231 }
232
233 public static com.liferay.portal.model.Company getCompanyByVirtualHost(
234 HttpPrincipal httpPrincipal, java.lang.String virtualHost)
235 throws com.liferay.portal.kernel.exception.PortalException,
236 com.liferay.portal.kernel.exception.SystemException {
237 try {
238 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
239 "getCompanyByVirtualHost",
240 _getCompanyByVirtualHostParameterTypes5);
241
242 MethodHandler methodHandler = new MethodHandler(methodKey,
243 virtualHost);
244
245 Object returnObj = null;
246
247 try {
248 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
249 }
250 catch (Exception e) {
251 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
252 throw (com.liferay.portal.kernel.exception.PortalException)e;
253 }
254
255 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
256 throw (com.liferay.portal.kernel.exception.SystemException)e;
257 }
258
259 throw new com.liferay.portal.kernel.exception.SystemException(e);
260 }
261
262 return (com.liferay.portal.model.Company)returnObj;
263 }
264 catch (com.liferay.portal.kernel.exception.SystemException se) {
265 _log.error(se, se);
266
267 throw se;
268 }
269 }
270
271 public static com.liferay.portal.model.Company getCompanyByWebId(
272 HttpPrincipal httpPrincipal, java.lang.String webId)
273 throws com.liferay.portal.kernel.exception.PortalException,
274 com.liferay.portal.kernel.exception.SystemException {
275 try {
276 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
277 "getCompanyByWebId", _getCompanyByWebIdParameterTypes6);
278
279 MethodHandler methodHandler = new MethodHandler(methodKey, webId);
280
281 Object returnObj = null;
282
283 try {
284 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
285 }
286 catch (Exception e) {
287 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
288 throw (com.liferay.portal.kernel.exception.PortalException)e;
289 }
290
291 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
292 throw (com.liferay.portal.kernel.exception.SystemException)e;
293 }
294
295 throw new com.liferay.portal.kernel.exception.SystemException(e);
296 }
297
298 return (com.liferay.portal.model.Company)returnObj;
299 }
300 catch (com.liferay.portal.kernel.exception.SystemException se) {
301 _log.error(se, se);
302
303 throw se;
304 }
305 }
306
307 public static void removePreferences(HttpPrincipal httpPrincipal,
308 long companyId, java.lang.String[] keys)
309 throws com.liferay.portal.kernel.exception.PortalException,
310 com.liferay.portal.kernel.exception.SystemException {
311 try {
312 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
313 "removePreferences", _removePreferencesParameterTypes7);
314
315 MethodHandler methodHandler = new MethodHandler(methodKey,
316 companyId, keys);
317
318 try {
319 TunnelUtil.invoke(httpPrincipal, methodHandler);
320 }
321 catch (Exception e) {
322 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
323 throw (com.liferay.portal.kernel.exception.PortalException)e;
324 }
325
326 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
327 throw (com.liferay.portal.kernel.exception.SystemException)e;
328 }
329
330 throw new com.liferay.portal.kernel.exception.SystemException(e);
331 }
332 }
333 catch (com.liferay.portal.kernel.exception.SystemException se) {
334 _log.error(se, se);
335
336 throw se;
337 }
338 }
339
340 public static com.liferay.portal.model.Company updateCompany(
341 HttpPrincipal httpPrincipal, long companyId,
342 java.lang.String virtualHost, java.lang.String mx, int maxUsers,
343 boolean active)
344 throws com.liferay.portal.kernel.exception.PortalException,
345 com.liferay.portal.kernel.exception.SystemException {
346 try {
347 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
348 "updateCompany", _updateCompanyParameterTypes8);
349
350 MethodHandler methodHandler = new MethodHandler(methodKey,
351 companyId, virtualHost, mx, maxUsers, active);
352
353 Object returnObj = null;
354
355 try {
356 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
357 }
358 catch (Exception e) {
359 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
360 throw (com.liferay.portal.kernel.exception.PortalException)e;
361 }
362
363 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
364 throw (com.liferay.portal.kernel.exception.SystemException)e;
365 }
366
367 throw new com.liferay.portal.kernel.exception.SystemException(e);
368 }
369
370 return (com.liferay.portal.model.Company)returnObj;
371 }
372 catch (com.liferay.portal.kernel.exception.SystemException se) {
373 _log.error(se, se);
374
375 throw se;
376 }
377 }
378
379 public static com.liferay.portal.model.Company updateCompany(
380 HttpPrincipal httpPrincipal, long companyId,
381 java.lang.String virtualHost, java.lang.String mx,
382 java.lang.String homeURL, java.lang.String name,
383 java.lang.String legalName, java.lang.String legalId,
384 java.lang.String legalType, java.lang.String sicCode,
385 java.lang.String tickerSymbol, java.lang.String industry,
386 java.lang.String type, java.lang.String size)
387 throws com.liferay.portal.kernel.exception.PortalException,
388 com.liferay.portal.kernel.exception.SystemException {
389 try {
390 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
391 "updateCompany", _updateCompanyParameterTypes9);
392
393 MethodHandler methodHandler = new MethodHandler(methodKey,
394 companyId, virtualHost, mx, homeURL, name, legalName,
395 legalId, legalType, sicCode, tickerSymbol, industry, type,
396 size);
397
398 Object returnObj = null;
399
400 try {
401 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
402 }
403 catch (Exception e) {
404 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
405 throw (com.liferay.portal.kernel.exception.PortalException)e;
406 }
407
408 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
409 throw (com.liferay.portal.kernel.exception.SystemException)e;
410 }
411
412 throw new com.liferay.portal.kernel.exception.SystemException(e);
413 }
414
415 return (com.liferay.portal.model.Company)returnObj;
416 }
417 catch (com.liferay.portal.kernel.exception.SystemException se) {
418 _log.error(se, se);
419
420 throw se;
421 }
422 }
423
424 public static com.liferay.portal.model.Company updateCompany(
425 HttpPrincipal httpPrincipal, long companyId,
426 java.lang.String virtualHost, java.lang.String mx,
427 java.lang.String homeURL, java.lang.String name,
428 java.lang.String legalName, java.lang.String legalId,
429 java.lang.String legalType, java.lang.String sicCode,
430 java.lang.String tickerSymbol, java.lang.String industry,
431 java.lang.String type, java.lang.String size,
432 java.lang.String languageId, java.lang.String timeZoneId,
433 java.util.List<com.liferay.portal.model.Address> addresses,
434 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
435 java.util.List<com.liferay.portal.model.Phone> phones,
436 java.util.List<com.liferay.portal.model.Website> websites,
437 com.liferay.portal.kernel.util.UnicodeProperties properties)
438 throws com.liferay.portal.kernel.exception.PortalException,
439 com.liferay.portal.kernel.exception.SystemException {
440 try {
441 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
442 "updateCompany", _updateCompanyParameterTypes10);
443
444 MethodHandler methodHandler = new MethodHandler(methodKey,
445 companyId, virtualHost, mx, homeURL, name, legalName,
446 legalId, legalType, sicCode, tickerSymbol, industry, type,
447 size, languageId, timeZoneId, addresses, emailAddresses,
448 phones, websites, properties);
449
450 Object returnObj = null;
451
452 try {
453 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
454 }
455 catch (Exception e) {
456 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
457 throw (com.liferay.portal.kernel.exception.PortalException)e;
458 }
459
460 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
461 throw (com.liferay.portal.kernel.exception.SystemException)e;
462 }
463
464 throw new com.liferay.portal.kernel.exception.SystemException(e);
465 }
466
467 return (com.liferay.portal.model.Company)returnObj;
468 }
469 catch (com.liferay.portal.kernel.exception.SystemException se) {
470 _log.error(se, se);
471
472 throw se;
473 }
474 }
475
476 public static void updateDisplay(HttpPrincipal httpPrincipal,
477 long companyId, java.lang.String languageId, java.lang.String timeZoneId)
478 throws com.liferay.portal.kernel.exception.PortalException,
479 com.liferay.portal.kernel.exception.SystemException {
480 try {
481 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
482 "updateDisplay", _updateDisplayParameterTypes11);
483
484 MethodHandler methodHandler = new MethodHandler(methodKey,
485 companyId, languageId, timeZoneId);
486
487 try {
488 TunnelUtil.invoke(httpPrincipal, methodHandler);
489 }
490 catch (Exception e) {
491 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
492 throw (com.liferay.portal.kernel.exception.PortalException)e;
493 }
494
495 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
496 throw (com.liferay.portal.kernel.exception.SystemException)e;
497 }
498
499 throw new com.liferay.portal.kernel.exception.SystemException(e);
500 }
501 }
502 catch (com.liferay.portal.kernel.exception.SystemException se) {
503 _log.error(se, se);
504
505 throw se;
506 }
507 }
508
509 public static void updateLogo(HttpPrincipal httpPrincipal, long companyId,
510 java.io.InputStream inputStream)
511 throws com.liferay.portal.kernel.exception.PortalException,
512 com.liferay.portal.kernel.exception.SystemException {
513 try {
514 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
515 "updateLogo", _updateLogoParameterTypes12);
516
517 MethodHandler methodHandler = new MethodHandler(methodKey,
518 companyId, inputStream);
519
520 try {
521 TunnelUtil.invoke(httpPrincipal, methodHandler);
522 }
523 catch (Exception e) {
524 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
525 throw (com.liferay.portal.kernel.exception.PortalException)e;
526 }
527
528 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
529 throw (com.liferay.portal.kernel.exception.SystemException)e;
530 }
531
532 throw new com.liferay.portal.kernel.exception.SystemException(e);
533 }
534 }
535 catch (com.liferay.portal.kernel.exception.SystemException se) {
536 _log.error(se, se);
537
538 throw se;
539 }
540 }
541
542 public static void updatePreferences(HttpPrincipal httpPrincipal,
543 long companyId,
544 com.liferay.portal.kernel.util.UnicodeProperties properties)
545 throws com.liferay.portal.kernel.exception.PortalException,
546 com.liferay.portal.kernel.exception.SystemException {
547 try {
548 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
549 "updatePreferences", _updatePreferencesParameterTypes13);
550
551 MethodHandler methodHandler = new MethodHandler(methodKey,
552 companyId, properties);
553
554 try {
555 TunnelUtil.invoke(httpPrincipal, methodHandler);
556 }
557 catch (Exception e) {
558 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
559 throw (com.liferay.portal.kernel.exception.PortalException)e;
560 }
561
562 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
563 throw (com.liferay.portal.kernel.exception.SystemException)e;
564 }
565
566 throw new com.liferay.portal.kernel.exception.SystemException(e);
567 }
568 }
569 catch (com.liferay.portal.kernel.exception.SystemException se) {
570 _log.error(se, se);
571
572 throw se;
573 }
574 }
575
576 public static void updateSecurity(HttpPrincipal httpPrincipal,
577 long companyId, java.lang.String authType, boolean autoLogin,
578 boolean sendPassword, boolean strangers, boolean strangersWithMx,
579 boolean strangersVerify, boolean siteLogo)
580 throws com.liferay.portal.kernel.exception.PortalException,
581 com.liferay.portal.kernel.exception.SystemException {
582 try {
583 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
584 "updateSecurity", _updateSecurityParameterTypes14);
585
586 MethodHandler methodHandler = new MethodHandler(methodKey,
587 companyId, authType, autoLogin, sendPassword, strangers,
588 strangersWithMx, strangersVerify, siteLogo);
589
590 try {
591 TunnelUtil.invoke(httpPrincipal, methodHandler);
592 }
593 catch (Exception e) {
594 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
595 throw (com.liferay.portal.kernel.exception.PortalException)e;
596 }
597
598 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
599 throw (com.liferay.portal.kernel.exception.SystemException)e;
600 }
601
602 throw new com.liferay.portal.kernel.exception.SystemException(e);
603 }
604 }
605 catch (com.liferay.portal.kernel.exception.SystemException se) {
606 _log.error(se, se);
607
608 throw se;
609 }
610 }
611
612 private static Log _log = LogFactoryUtil.getLog(CompanyServiceHttp.class);
613 private static final Class<?>[] _addCompanyParameterTypes0 = new Class[] {
614 java.lang.String.class, java.lang.String.class,
615 java.lang.String.class, java.lang.String.class, boolean.class,
616 int.class, boolean.class
617 };
618 private static final Class<?>[] _deleteLogoParameterTypes1 = new Class[] {
619 long.class
620 };
621 private static final Class<?>[] _getCompanyByIdParameterTypes2 = new Class[] {
622 long.class
623 };
624 private static final Class<?>[] _getCompanyByLogoIdParameterTypes3 = new Class[] {
625 long.class
626 };
627 private static final Class<?>[] _getCompanyByMxParameterTypes4 = new Class[] {
628 java.lang.String.class
629 };
630 private static final Class<?>[] _getCompanyByVirtualHostParameterTypes5 = new Class[] {
631 java.lang.String.class
632 };
633 private static final Class<?>[] _getCompanyByWebIdParameterTypes6 = new Class[] {
634 java.lang.String.class
635 };
636 private static final Class<?>[] _removePreferencesParameterTypes7 = new Class[] {
637 long.class, java.lang.String[].class
638 };
639 private static final Class<?>[] _updateCompanyParameterTypes8 = new Class[] {
640 long.class, java.lang.String.class, java.lang.String.class,
641 int.class, boolean.class
642 };
643 private static final Class<?>[] _updateCompanyParameterTypes9 = new Class[] {
644 long.class, java.lang.String.class, java.lang.String.class,
645 java.lang.String.class, java.lang.String.class,
646 java.lang.String.class, java.lang.String.class,
647 java.lang.String.class, java.lang.String.class,
648 java.lang.String.class, java.lang.String.class,
649 java.lang.String.class, java.lang.String.class
650 };
651 private static final Class<?>[] _updateCompanyParameterTypes10 = new Class[] {
652 long.class, java.lang.String.class, java.lang.String.class,
653 java.lang.String.class, java.lang.String.class,
654 java.lang.String.class, java.lang.String.class,
655 java.lang.String.class, java.lang.String.class,
656 java.lang.String.class, java.lang.String.class,
657 java.lang.String.class, java.lang.String.class,
658 java.lang.String.class, java.lang.String.class, java.util.List.class,
659 java.util.List.class, java.util.List.class, java.util.List.class,
660 com.liferay.portal.kernel.util.UnicodeProperties.class
661 };
662 private static final Class<?>[] _updateDisplayParameterTypes11 = new Class[] {
663 long.class, java.lang.String.class, java.lang.String.class
664 };
665 private static final Class<?>[] _updateLogoParameterTypes12 = new Class[] {
666 long.class, java.io.InputStream.class
667 };
668 private static final Class<?>[] _updatePreferencesParameterTypes13 = new Class[] {
669 long.class, com.liferay.portal.kernel.util.UnicodeProperties.class
670 };
671 private static final Class<?>[] _updateSecurityParameterTypes14 = new Class[] {
672 long.class, java.lang.String.class, boolean.class, boolean.class,
673 boolean.class, boolean.class, boolean.class, boolean.class
674 };
675 }