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)
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);
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 throws com.liferay.portal.kernel.exception.PortalException,
344 com.liferay.portal.kernel.exception.SystemException {
345 try {
346 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
347 "updateCompany", _updateCompanyParameterTypes8);
348
349 MethodHandler methodHandler = new MethodHandler(methodKey,
350 companyId, virtualHost, mx, maxUsers);
351
352 Object returnObj = null;
353
354 try {
355 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
356 }
357 catch (Exception e) {
358 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
359 throw (com.liferay.portal.kernel.exception.PortalException)e;
360 }
361
362 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
363 throw (com.liferay.portal.kernel.exception.SystemException)e;
364 }
365
366 throw new com.liferay.portal.kernel.exception.SystemException(e);
367 }
368
369 return (com.liferay.portal.model.Company)returnObj;
370 }
371 catch (com.liferay.portal.kernel.exception.SystemException se) {
372 _log.error(se, se);
373
374 throw se;
375 }
376 }
377
378 public static com.liferay.portal.model.Company updateCompany(
379 HttpPrincipal httpPrincipal, long companyId,
380 java.lang.String virtualHost, java.lang.String mx,
381 java.lang.String homeURL, java.lang.String name,
382 java.lang.String legalName, java.lang.String legalId,
383 java.lang.String legalType, java.lang.String sicCode,
384 java.lang.String tickerSymbol, java.lang.String industry,
385 java.lang.String type, java.lang.String size)
386 throws com.liferay.portal.kernel.exception.PortalException,
387 com.liferay.portal.kernel.exception.SystemException {
388 try {
389 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
390 "updateCompany", _updateCompanyParameterTypes9);
391
392 MethodHandler methodHandler = new MethodHandler(methodKey,
393 companyId, virtualHost, mx, homeURL, name, legalName,
394 legalId, legalType, sicCode, tickerSymbol, industry, type,
395 size);
396
397 Object returnObj = null;
398
399 try {
400 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
401 }
402 catch (Exception e) {
403 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
404 throw (com.liferay.portal.kernel.exception.PortalException)e;
405 }
406
407 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
408 throw (com.liferay.portal.kernel.exception.SystemException)e;
409 }
410
411 throw new com.liferay.portal.kernel.exception.SystemException(e);
412 }
413
414 return (com.liferay.portal.model.Company)returnObj;
415 }
416 catch (com.liferay.portal.kernel.exception.SystemException se) {
417 _log.error(se, se);
418
419 throw se;
420 }
421 }
422
423 public static com.liferay.portal.model.Company updateCompany(
424 HttpPrincipal httpPrincipal, long companyId,
425 java.lang.String virtualHost, java.lang.String mx,
426 java.lang.String homeURL, java.lang.String name,
427 java.lang.String legalName, java.lang.String legalId,
428 java.lang.String legalType, java.lang.String sicCode,
429 java.lang.String tickerSymbol, java.lang.String industry,
430 java.lang.String type, java.lang.String size,
431 java.lang.String languageId, java.lang.String timeZoneId,
432 java.util.List<com.liferay.portal.model.Address> addresses,
433 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
434 java.util.List<com.liferay.portal.model.Phone> phones,
435 java.util.List<com.liferay.portal.model.Website> websites,
436 com.liferay.portal.kernel.util.UnicodeProperties properties)
437 throws com.liferay.portal.kernel.exception.PortalException,
438 com.liferay.portal.kernel.exception.SystemException {
439 try {
440 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
441 "updateCompany", _updateCompanyParameterTypes10);
442
443 MethodHandler methodHandler = new MethodHandler(methodKey,
444 companyId, virtualHost, mx, homeURL, name, legalName,
445 legalId, legalType, sicCode, tickerSymbol, industry, type,
446 size, languageId, timeZoneId, addresses, emailAddresses,
447 phones, websites, properties);
448
449 Object returnObj = null;
450
451 try {
452 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
453 }
454 catch (Exception e) {
455 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
456 throw (com.liferay.portal.kernel.exception.PortalException)e;
457 }
458
459 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
460 throw (com.liferay.portal.kernel.exception.SystemException)e;
461 }
462
463 throw new com.liferay.portal.kernel.exception.SystemException(e);
464 }
465
466 return (com.liferay.portal.model.Company)returnObj;
467 }
468 catch (com.liferay.portal.kernel.exception.SystemException se) {
469 _log.error(se, se);
470
471 throw se;
472 }
473 }
474
475 public static void updateDisplay(HttpPrincipal httpPrincipal,
476 long companyId, java.lang.String languageId, java.lang.String timeZoneId)
477 throws com.liferay.portal.kernel.exception.PortalException,
478 com.liferay.portal.kernel.exception.SystemException {
479 try {
480 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
481 "updateDisplay", _updateDisplayParameterTypes11);
482
483 MethodHandler methodHandler = new MethodHandler(methodKey,
484 companyId, languageId, timeZoneId);
485
486 try {
487 TunnelUtil.invoke(httpPrincipal, methodHandler);
488 }
489 catch (Exception e) {
490 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
491 throw (com.liferay.portal.kernel.exception.PortalException)e;
492 }
493
494 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
495 throw (com.liferay.portal.kernel.exception.SystemException)e;
496 }
497
498 throw new com.liferay.portal.kernel.exception.SystemException(e);
499 }
500 }
501 catch (com.liferay.portal.kernel.exception.SystemException se) {
502 _log.error(se, se);
503
504 throw se;
505 }
506 }
507
508 public static void updateLogo(HttpPrincipal httpPrincipal, long companyId,
509 java.io.File file)
510 throws com.liferay.portal.kernel.exception.PortalException,
511 com.liferay.portal.kernel.exception.SystemException {
512 try {
513 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
514 "updateLogo", _updateLogoParameterTypes12);
515
516 MethodHandler methodHandler = new MethodHandler(methodKey,
517 companyId, file);
518
519 try {
520 TunnelUtil.invoke(httpPrincipal, methodHandler);
521 }
522 catch (Exception e) {
523 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
524 throw (com.liferay.portal.kernel.exception.PortalException)e;
525 }
526
527 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
528 throw (com.liferay.portal.kernel.exception.SystemException)e;
529 }
530
531 throw new com.liferay.portal.kernel.exception.SystemException(e);
532 }
533 }
534 catch (com.liferay.portal.kernel.exception.SystemException se) {
535 _log.error(se, se);
536
537 throw se;
538 }
539 }
540
541 public static void updatePreferences(HttpPrincipal httpPrincipal,
542 long companyId,
543 com.liferay.portal.kernel.util.UnicodeProperties properties)
544 throws com.liferay.portal.kernel.exception.PortalException,
545 com.liferay.portal.kernel.exception.SystemException {
546 try {
547 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
548 "updatePreferences", _updatePreferencesParameterTypes13);
549
550 MethodHandler methodHandler = new MethodHandler(methodKey,
551 companyId, properties);
552
553 try {
554 TunnelUtil.invoke(httpPrincipal, methodHandler);
555 }
556 catch (Exception e) {
557 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
558 throw (com.liferay.portal.kernel.exception.PortalException)e;
559 }
560
561 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
562 throw (com.liferay.portal.kernel.exception.SystemException)e;
563 }
564
565 throw new com.liferay.portal.kernel.exception.SystemException(e);
566 }
567 }
568 catch (com.liferay.portal.kernel.exception.SystemException se) {
569 _log.error(se, se);
570
571 throw se;
572 }
573 }
574
575 public static void updateSecurity(HttpPrincipal httpPrincipal,
576 long companyId, java.lang.String authType, boolean autoLogin,
577 boolean sendPassword, boolean strangers, boolean strangersWithMx,
578 boolean strangersVerify, boolean communityLogo)
579 throws com.liferay.portal.kernel.exception.PortalException,
580 com.liferay.portal.kernel.exception.SystemException {
581 try {
582 MethodKey methodKey = new MethodKey(CompanyServiceUtil.class.getName(),
583 "updateSecurity", _updateSecurityParameterTypes14);
584
585 MethodHandler methodHandler = new MethodHandler(methodKey,
586 companyId, authType, autoLogin, sendPassword, strangers,
587 strangersWithMx, strangersVerify, communityLogo);
588
589 try {
590 TunnelUtil.invoke(httpPrincipal, methodHandler);
591 }
592 catch (Exception e) {
593 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
594 throw (com.liferay.portal.kernel.exception.PortalException)e;
595 }
596
597 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
598 throw (com.liferay.portal.kernel.exception.SystemException)e;
599 }
600
601 throw new com.liferay.portal.kernel.exception.SystemException(e);
602 }
603 }
604 catch (com.liferay.portal.kernel.exception.SystemException se) {
605 _log.error(se, se);
606
607 throw se;
608 }
609 }
610
611 private static Log _log = LogFactoryUtil.getLog(CompanyServiceHttp.class);
612 private static final Class<?>[] _addCompanyParameterTypes0 = new Class[] {
613 java.lang.String.class, java.lang.String.class,
614 java.lang.String.class, java.lang.String.class, boolean.class,
615 int.class
616 };
617 private static final Class<?>[] _deleteLogoParameterTypes1 = new Class[] {
618 long.class
619 };
620 private static final Class<?>[] _getCompanyByIdParameterTypes2 = new Class[] {
621 long.class
622 };
623 private static final Class<?>[] _getCompanyByLogoIdParameterTypes3 = new Class[] {
624 long.class
625 };
626 private static final Class<?>[] _getCompanyByMxParameterTypes4 = new Class[] {
627 java.lang.String.class
628 };
629 private static final Class<?>[] _getCompanyByVirtualHostParameterTypes5 = new Class[] {
630 java.lang.String.class
631 };
632 private static final Class<?>[] _getCompanyByWebIdParameterTypes6 = new Class[] {
633 java.lang.String.class
634 };
635 private static final Class<?>[] _removePreferencesParameterTypes7 = new Class[] {
636 long.class, java.lang.String[].class
637 };
638 private static final Class<?>[] _updateCompanyParameterTypes8 = new Class[] {
639 long.class, java.lang.String.class, java.lang.String.class,
640 int.class
641 };
642 private static final Class<?>[] _updateCompanyParameterTypes9 = new Class[] {
643 long.class, java.lang.String.class, java.lang.String.class,
644 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 };
650 private static final Class<?>[] _updateCompanyParameterTypes10 = new Class[] {
651 long.class, java.lang.String.class, java.lang.String.class,
652 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, java.util.List.class,
658 java.util.List.class, java.util.List.class, java.util.List.class,
659 com.liferay.portal.kernel.util.UnicodeProperties.class
660 };
661 private static final Class<?>[] _updateDisplayParameterTypes11 = new Class[] {
662 long.class, java.lang.String.class, java.lang.String.class
663 };
664 private static final Class<?>[] _updateLogoParameterTypes12 = new Class[] {
665 long.class, java.io.File.class
666 };
667 private static final Class<?>[] _updatePreferencesParameterTypes13 = new Class[] {
668 long.class, com.liferay.portal.kernel.util.UnicodeProperties.class
669 };
670 private static final Class<?>[] _updateSecurityParameterTypes14 = new Class[] {
671 long.class, java.lang.String.class, boolean.class, boolean.class,
672 boolean.class, boolean.class, boolean.class, boolean.class
673 };
674 }