/portal-impl/src/com/liferay/portal/service/http/UserServiceHttp.java

https://github.com/danielreuther/liferay-portal · Java · 1678 lines · 1283 code · 356 blank · 39 comment · 37 complexity · 1d63f6ca13a9713127afcf2a006d0e1d MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 2.1 of the License, or (at your option)
  7. * any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  12. * details.
  13. */
  14. package com.liferay.portal.service.http;
  15. import com.liferay.portal.kernel.log.Log;
  16. import com.liferay.portal.kernel.log.LogFactoryUtil;
  17. import com.liferay.portal.kernel.security.auth.HttpPrincipal;
  18. import com.liferay.portal.kernel.service.UserServiceUtil;
  19. import com.liferay.portal.kernel.service.http.TunnelUtil;
  20. import com.liferay.portal.kernel.util.MethodHandler;
  21. import com.liferay.portal.kernel.util.MethodKey;
  22. /**
  23. * Provides the HTTP utility for the
  24. * <code>UserServiceUtil</code> service
  25. * utility. The
  26. * static methods of this class calls the same methods of the service utility.
  27. * However, the signatures are different because it requires an additional
  28. * <code>HttpPrincipal</code> parameter.
  29. *
  30. * <p>
  31. * The benefits of using the HTTP utility is that it is fast and allows for
  32. * tunneling without the cost of serializing to text. The drawback is that it
  33. * only works with Java.
  34. * </p>
  35. *
  36. * <p>
  37. * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
  38. * configure security.
  39. * </p>
  40. *
  41. * <p>
  42. * The HTTP utility is only generated for remote services.
  43. * </p>
  44. *
  45. * @author Brian Wing Shun Chan
  46. * @generated
  47. */
  48. public class UserServiceHttp {
  49. public static void addGroupUsers(
  50. HttpPrincipal httpPrincipal, long groupId, long[] userIds,
  51. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  52. throws com.liferay.portal.kernel.exception.PortalException {
  53. try {
  54. MethodKey methodKey = new MethodKey(
  55. UserServiceUtil.class, "addGroupUsers",
  56. _addGroupUsersParameterTypes0);
  57. MethodHandler methodHandler = new MethodHandler(
  58. methodKey, groupId, userIds, serviceContext);
  59. try {
  60. TunnelUtil.invoke(httpPrincipal, methodHandler);
  61. }
  62. catch (Exception exception) {
  63. if (exception instanceof
  64. com.liferay.portal.kernel.exception.PortalException) {
  65. throw (com.liferay.portal.kernel.exception.PortalException)
  66. exception;
  67. }
  68. throw new com.liferay.portal.kernel.exception.SystemException(
  69. exception);
  70. }
  71. }
  72. catch (com.liferay.portal.kernel.exception.SystemException
  73. systemException) {
  74. _log.error(systemException, systemException);
  75. throw systemException;
  76. }
  77. }
  78. public static void addOrganizationUsers(
  79. HttpPrincipal httpPrincipal, long organizationId, long[] userIds)
  80. throws com.liferay.portal.kernel.exception.PortalException {
  81. try {
  82. MethodKey methodKey = new MethodKey(
  83. UserServiceUtil.class, "addOrganizationUsers",
  84. _addOrganizationUsersParameterTypes1);
  85. MethodHandler methodHandler = new MethodHandler(
  86. methodKey, organizationId, userIds);
  87. try {
  88. TunnelUtil.invoke(httpPrincipal, methodHandler);
  89. }
  90. catch (Exception exception) {
  91. if (exception instanceof
  92. com.liferay.portal.kernel.exception.PortalException) {
  93. throw (com.liferay.portal.kernel.exception.PortalException)
  94. exception;
  95. }
  96. throw new com.liferay.portal.kernel.exception.SystemException(
  97. exception);
  98. }
  99. }
  100. catch (com.liferay.portal.kernel.exception.SystemException
  101. systemException) {
  102. _log.error(systemException, systemException);
  103. throw systemException;
  104. }
  105. }
  106. public static com.liferay.portal.kernel.model.User addOrUpdateUser(
  107. HttpPrincipal httpPrincipal, String externalReferenceCode,
  108. long creatorUserId, long companyId, boolean autoPassword,
  109. String password1, String password2, boolean autoScreenName,
  110. String screenName, String emailAddress, java.util.Locale locale,
  111. String firstName, String middleName, String lastName, long prefixId,
  112. long suffixId, boolean male, int birthdayMonth, int birthdayDay,
  113. int birthdayYear, String jobTitle,
  114. java.util.List<com.liferay.portal.kernel.model.Address> addresses,
  115. java.util.List<com.liferay.portal.kernel.model.EmailAddress>
  116. emailAddresses,
  117. java.util.List<com.liferay.portal.kernel.model.Phone> phones,
  118. java.util.List<com.liferay.portal.kernel.model.Website> websites,
  119. boolean sendEmail,
  120. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  121. throws com.liferay.portal.kernel.exception.PortalException {
  122. try {
  123. MethodKey methodKey = new MethodKey(
  124. UserServiceUtil.class, "addOrUpdateUser",
  125. _addOrUpdateUserParameterTypes2);
  126. MethodHandler methodHandler = new MethodHandler(
  127. methodKey, externalReferenceCode, creatorUserId, companyId,
  128. autoPassword, password1, password2, autoScreenName, screenName,
  129. emailAddress, locale, firstName, middleName, lastName, prefixId,
  130. suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
  131. jobTitle, addresses, emailAddresses, phones, websites,
  132. sendEmail, serviceContext);
  133. Object returnObj = null;
  134. try {
  135. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  136. }
  137. catch (Exception exception) {
  138. if (exception instanceof
  139. com.liferay.portal.kernel.exception.PortalException) {
  140. throw (com.liferay.portal.kernel.exception.PortalException)
  141. exception;
  142. }
  143. throw new com.liferay.portal.kernel.exception.SystemException(
  144. exception);
  145. }
  146. return (com.liferay.portal.kernel.model.User)returnObj;
  147. }
  148. catch (com.liferay.portal.kernel.exception.SystemException
  149. systemException) {
  150. _log.error(systemException, systemException);
  151. throw systemException;
  152. }
  153. }
  154. public static void addPasswordPolicyUsers(
  155. HttpPrincipal httpPrincipal, long passwordPolicyId, long[] userIds)
  156. throws com.liferay.portal.kernel.exception.PortalException {
  157. try {
  158. MethodKey methodKey = new MethodKey(
  159. UserServiceUtil.class, "addPasswordPolicyUsers",
  160. _addPasswordPolicyUsersParameterTypes3);
  161. MethodHandler methodHandler = new MethodHandler(
  162. methodKey, passwordPolicyId, userIds);
  163. try {
  164. TunnelUtil.invoke(httpPrincipal, methodHandler);
  165. }
  166. catch (Exception exception) {
  167. if (exception instanceof
  168. com.liferay.portal.kernel.exception.PortalException) {
  169. throw (com.liferay.portal.kernel.exception.PortalException)
  170. exception;
  171. }
  172. throw new com.liferay.portal.kernel.exception.SystemException(
  173. exception);
  174. }
  175. }
  176. catch (com.liferay.portal.kernel.exception.SystemException
  177. systemException) {
  178. _log.error(systemException, systemException);
  179. throw systemException;
  180. }
  181. }
  182. public static void addRoleUsers(
  183. HttpPrincipal httpPrincipal, long roleId, long[] userIds)
  184. throws com.liferay.portal.kernel.exception.PortalException {
  185. try {
  186. MethodKey methodKey = new MethodKey(
  187. UserServiceUtil.class, "addRoleUsers",
  188. _addRoleUsersParameterTypes4);
  189. MethodHandler methodHandler = new MethodHandler(
  190. methodKey, roleId, userIds);
  191. try {
  192. TunnelUtil.invoke(httpPrincipal, methodHandler);
  193. }
  194. catch (Exception exception) {
  195. if (exception instanceof
  196. com.liferay.portal.kernel.exception.PortalException) {
  197. throw (com.liferay.portal.kernel.exception.PortalException)
  198. exception;
  199. }
  200. throw new com.liferay.portal.kernel.exception.SystemException(
  201. exception);
  202. }
  203. }
  204. catch (com.liferay.portal.kernel.exception.SystemException
  205. systemException) {
  206. _log.error(systemException, systemException);
  207. throw systemException;
  208. }
  209. }
  210. public static void addTeamUsers(
  211. HttpPrincipal httpPrincipal, long teamId, long[] userIds)
  212. throws com.liferay.portal.kernel.exception.PortalException {
  213. try {
  214. MethodKey methodKey = new MethodKey(
  215. UserServiceUtil.class, "addTeamUsers",
  216. _addTeamUsersParameterTypes5);
  217. MethodHandler methodHandler = new MethodHandler(
  218. methodKey, teamId, userIds);
  219. try {
  220. TunnelUtil.invoke(httpPrincipal, methodHandler);
  221. }
  222. catch (Exception exception) {
  223. if (exception instanceof
  224. com.liferay.portal.kernel.exception.PortalException) {
  225. throw (com.liferay.portal.kernel.exception.PortalException)
  226. exception;
  227. }
  228. throw new com.liferay.portal.kernel.exception.SystemException(
  229. exception);
  230. }
  231. }
  232. catch (com.liferay.portal.kernel.exception.SystemException
  233. systemException) {
  234. _log.error(systemException, systemException);
  235. throw systemException;
  236. }
  237. }
  238. public static com.liferay.portal.kernel.model.User addUser(
  239. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  240. String password1, String password2, boolean autoScreenName,
  241. String screenName, String emailAddress, java.util.Locale locale,
  242. String firstName, String middleName, String lastName, long prefixId,
  243. long suffixId, boolean male, int birthdayMonth, int birthdayDay,
  244. int birthdayYear, String jobTitle, long[] groupIds,
  245. long[] organizationIds, long[] roleIds, long[] userGroupIds,
  246. boolean sendEmail,
  247. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  248. throws com.liferay.portal.kernel.exception.PortalException {
  249. try {
  250. MethodKey methodKey = new MethodKey(
  251. UserServiceUtil.class, "addUser", _addUserParameterTypes6);
  252. MethodHandler methodHandler = new MethodHandler(
  253. methodKey, companyId, autoPassword, password1, password2,
  254. autoScreenName, screenName, emailAddress, locale, firstName,
  255. middleName, lastName, prefixId, suffixId, male, birthdayMonth,
  256. birthdayDay, birthdayYear, jobTitle, groupIds, organizationIds,
  257. roleIds, userGroupIds, sendEmail, serviceContext);
  258. Object returnObj = null;
  259. try {
  260. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  261. }
  262. catch (Exception exception) {
  263. if (exception instanceof
  264. com.liferay.portal.kernel.exception.PortalException) {
  265. throw (com.liferay.portal.kernel.exception.PortalException)
  266. exception;
  267. }
  268. throw new com.liferay.portal.kernel.exception.SystemException(
  269. exception);
  270. }
  271. return (com.liferay.portal.kernel.model.User)returnObj;
  272. }
  273. catch (com.liferay.portal.kernel.exception.SystemException
  274. systemException) {
  275. _log.error(systemException, systemException);
  276. throw systemException;
  277. }
  278. }
  279. public static com.liferay.portal.kernel.model.User addUser(
  280. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  281. String password1, String password2, boolean autoScreenName,
  282. String screenName, String emailAddress, java.util.Locale locale,
  283. String firstName, String middleName, String lastName, long prefixId,
  284. long suffixId, boolean male, int birthdayMonth, int birthdayDay,
  285. int birthdayYear, String jobTitle, long[] groupIds,
  286. long[] organizationIds, long[] roleIds, long[] userGroupIds,
  287. java.util.List<com.liferay.portal.kernel.model.Address> addresses,
  288. java.util.List<com.liferay.portal.kernel.model.EmailAddress>
  289. emailAddresses,
  290. java.util.List<com.liferay.portal.kernel.model.Phone> phones,
  291. java.util.List<com.liferay.portal.kernel.model.Website> websites,
  292. java.util.List
  293. <com.liferay.announcements.kernel.model.AnnouncementsDelivery>
  294. announcementsDelivers,
  295. boolean sendEmail,
  296. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  297. throws com.liferay.portal.kernel.exception.PortalException {
  298. try {
  299. MethodKey methodKey = new MethodKey(
  300. UserServiceUtil.class, "addUser", _addUserParameterTypes7);
  301. MethodHandler methodHandler = new MethodHandler(
  302. methodKey, companyId, autoPassword, password1, password2,
  303. autoScreenName, screenName, emailAddress, locale, firstName,
  304. middleName, lastName, prefixId, suffixId, male, birthdayMonth,
  305. birthdayDay, birthdayYear, jobTitle, groupIds, organizationIds,
  306. roleIds, userGroupIds, addresses, emailAddresses, phones,
  307. websites, announcementsDelivers, sendEmail, serviceContext);
  308. Object returnObj = null;
  309. try {
  310. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  311. }
  312. catch (Exception exception) {
  313. if (exception instanceof
  314. com.liferay.portal.kernel.exception.PortalException) {
  315. throw (com.liferay.portal.kernel.exception.PortalException)
  316. exception;
  317. }
  318. throw new com.liferay.portal.kernel.exception.SystemException(
  319. exception);
  320. }
  321. return (com.liferay.portal.kernel.model.User)returnObj;
  322. }
  323. catch (com.liferay.portal.kernel.exception.SystemException
  324. systemException) {
  325. _log.error(systemException, systemException);
  326. throw systemException;
  327. }
  328. }
  329. public static com.liferay.portal.kernel.model.User addUser(
  330. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  331. String password1, String password2, boolean autoScreenName,
  332. String screenName, String emailAddress, long facebookId,
  333. String openId, java.util.Locale locale, String firstName,
  334. String middleName, String lastName, long prefixId, long suffixId,
  335. boolean male, int birthdayMonth, int birthdayDay, int birthdayYear,
  336. String jobTitle, long[] groupIds, long[] organizationIds,
  337. long[] roleIds, long[] userGroupIds, boolean sendEmail,
  338. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  339. throws com.liferay.portal.kernel.exception.PortalException {
  340. try {
  341. MethodKey methodKey = new MethodKey(
  342. UserServiceUtil.class, "addUser", _addUserParameterTypes8);
  343. MethodHandler methodHandler = new MethodHandler(
  344. methodKey, companyId, autoPassword, password1, password2,
  345. autoScreenName, screenName, emailAddress, facebookId, openId,
  346. locale, firstName, middleName, lastName, prefixId, suffixId,
  347. male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
  348. groupIds, organizationIds, roleIds, userGroupIds, sendEmail,
  349. serviceContext);
  350. Object returnObj = null;
  351. try {
  352. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  353. }
  354. catch (Exception exception) {
  355. if (exception instanceof
  356. com.liferay.portal.kernel.exception.PortalException) {
  357. throw (com.liferay.portal.kernel.exception.PortalException)
  358. exception;
  359. }
  360. throw new com.liferay.portal.kernel.exception.SystemException(
  361. exception);
  362. }
  363. return (com.liferay.portal.kernel.model.User)returnObj;
  364. }
  365. catch (com.liferay.portal.kernel.exception.SystemException
  366. systemException) {
  367. _log.error(systemException, systemException);
  368. throw systemException;
  369. }
  370. }
  371. public static com.liferay.portal.kernel.model.User addUser(
  372. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  373. String password1, String password2, boolean autoScreenName,
  374. String screenName, String emailAddress, long facebookId,
  375. String openId, java.util.Locale locale, String firstName,
  376. String middleName, String lastName, long prefixId, long suffixId,
  377. boolean male, int birthdayMonth, int birthdayDay, int birthdayYear,
  378. String jobTitle, long[] groupIds, long[] organizationIds,
  379. long[] roleIds, long[] userGroupIds,
  380. java.util.List<com.liferay.portal.kernel.model.Address> addresses,
  381. java.util.List<com.liferay.portal.kernel.model.EmailAddress>
  382. emailAddresses,
  383. java.util.List<com.liferay.portal.kernel.model.Phone> phones,
  384. java.util.List<com.liferay.portal.kernel.model.Website> websites,
  385. java.util.List
  386. <com.liferay.announcements.kernel.model.AnnouncementsDelivery>
  387. announcementsDelivers,
  388. boolean sendEmail,
  389. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  390. throws com.liferay.portal.kernel.exception.PortalException {
  391. try {
  392. MethodKey methodKey = new MethodKey(
  393. UserServiceUtil.class, "addUser", _addUserParameterTypes9);
  394. MethodHandler methodHandler = new MethodHandler(
  395. methodKey, companyId, autoPassword, password1, password2,
  396. autoScreenName, screenName, emailAddress, facebookId, openId,
  397. locale, firstName, middleName, lastName, prefixId, suffixId,
  398. male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
  399. groupIds, organizationIds, roleIds, userGroupIds, addresses,
  400. emailAddresses, phones, websites, announcementsDelivers,
  401. sendEmail, serviceContext);
  402. Object returnObj = null;
  403. try {
  404. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  405. }
  406. catch (Exception exception) {
  407. if (exception instanceof
  408. com.liferay.portal.kernel.exception.PortalException) {
  409. throw (com.liferay.portal.kernel.exception.PortalException)
  410. exception;
  411. }
  412. throw new com.liferay.portal.kernel.exception.SystemException(
  413. exception);
  414. }
  415. return (com.liferay.portal.kernel.model.User)returnObj;
  416. }
  417. catch (com.liferay.portal.kernel.exception.SystemException
  418. systemException) {
  419. _log.error(systemException, systemException);
  420. throw systemException;
  421. }
  422. }
  423. public static void addUserGroupUsers(
  424. HttpPrincipal httpPrincipal, long userGroupId, long[] userIds)
  425. throws com.liferay.portal.kernel.exception.PortalException {
  426. try {
  427. MethodKey methodKey = new MethodKey(
  428. UserServiceUtil.class, "addUserGroupUsers",
  429. _addUserGroupUsersParameterTypes10);
  430. MethodHandler methodHandler = new MethodHandler(
  431. methodKey, userGroupId, userIds);
  432. try {
  433. TunnelUtil.invoke(httpPrincipal, methodHandler);
  434. }
  435. catch (Exception exception) {
  436. if (exception instanceof
  437. com.liferay.portal.kernel.exception.PortalException) {
  438. throw (com.liferay.portal.kernel.exception.PortalException)
  439. exception;
  440. }
  441. throw new com.liferay.portal.kernel.exception.SystemException(
  442. exception);
  443. }
  444. }
  445. catch (com.liferay.portal.kernel.exception.SystemException
  446. systemException) {
  447. _log.error(systemException, systemException);
  448. throw systemException;
  449. }
  450. }
  451. public static com.liferay.portal.kernel.model.User addUserWithWorkflow(
  452. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  453. String password1, String password2, boolean autoScreenName,
  454. String screenName, String emailAddress, java.util.Locale locale,
  455. String firstName, String middleName, String lastName, long prefixId,
  456. long suffixId, boolean male, int birthdayMonth, int birthdayDay,
  457. int birthdayYear, String jobTitle, long[] groupIds,
  458. long[] organizationIds, long[] roleIds, long[] userGroupIds,
  459. boolean sendEmail,
  460. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  461. throws com.liferay.portal.kernel.exception.PortalException {
  462. try {
  463. MethodKey methodKey = new MethodKey(
  464. UserServiceUtil.class, "addUserWithWorkflow",
  465. _addUserWithWorkflowParameterTypes11);
  466. MethodHandler methodHandler = new MethodHandler(
  467. methodKey, companyId, autoPassword, password1, password2,
  468. autoScreenName, screenName, emailAddress, locale, firstName,
  469. middleName, lastName, prefixId, suffixId, male, birthdayMonth,
  470. birthdayDay, birthdayYear, jobTitle, groupIds, organizationIds,
  471. roleIds, userGroupIds, sendEmail, serviceContext);
  472. Object returnObj = null;
  473. try {
  474. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  475. }
  476. catch (Exception exception) {
  477. if (exception instanceof
  478. com.liferay.portal.kernel.exception.PortalException) {
  479. throw (com.liferay.portal.kernel.exception.PortalException)
  480. exception;
  481. }
  482. throw new com.liferay.portal.kernel.exception.SystemException(
  483. exception);
  484. }
  485. return (com.liferay.portal.kernel.model.User)returnObj;
  486. }
  487. catch (com.liferay.portal.kernel.exception.SystemException
  488. systemException) {
  489. _log.error(systemException, systemException);
  490. throw systemException;
  491. }
  492. }
  493. public static com.liferay.portal.kernel.model.User addUserWithWorkflow(
  494. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  495. String password1, String password2, boolean autoScreenName,
  496. String screenName, String emailAddress, java.util.Locale locale,
  497. String firstName, String middleName, String lastName, long prefixId,
  498. long suffixId, boolean male, int birthdayMonth, int birthdayDay,
  499. int birthdayYear, String jobTitle, long[] groupIds,
  500. long[] organizationIds, long[] roleIds, long[] userGroupIds,
  501. java.util.List<com.liferay.portal.kernel.model.Address> addresses,
  502. java.util.List<com.liferay.portal.kernel.model.EmailAddress>
  503. emailAddresses,
  504. java.util.List<com.liferay.portal.kernel.model.Phone> phones,
  505. java.util.List<com.liferay.portal.kernel.model.Website> websites,
  506. java.util.List
  507. <com.liferay.announcements.kernel.model.AnnouncementsDelivery>
  508. announcementsDelivers,
  509. boolean sendEmail,
  510. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  511. throws com.liferay.portal.kernel.exception.PortalException {
  512. try {
  513. MethodKey methodKey = new MethodKey(
  514. UserServiceUtil.class, "addUserWithWorkflow",
  515. _addUserWithWorkflowParameterTypes12);
  516. MethodHandler methodHandler = new MethodHandler(
  517. methodKey, companyId, autoPassword, password1, password2,
  518. autoScreenName, screenName, emailAddress, locale, firstName,
  519. middleName, lastName, prefixId, suffixId, male, birthdayMonth,
  520. birthdayDay, birthdayYear, jobTitle, groupIds, organizationIds,
  521. roleIds, userGroupIds, addresses, emailAddresses, phones,
  522. websites, announcementsDelivers, sendEmail, serviceContext);
  523. Object returnObj = null;
  524. try {
  525. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  526. }
  527. catch (Exception exception) {
  528. if (exception instanceof
  529. com.liferay.portal.kernel.exception.PortalException) {
  530. throw (com.liferay.portal.kernel.exception.PortalException)
  531. exception;
  532. }
  533. throw new com.liferay.portal.kernel.exception.SystemException(
  534. exception);
  535. }
  536. return (com.liferay.portal.kernel.model.User)returnObj;
  537. }
  538. catch (com.liferay.portal.kernel.exception.SystemException
  539. systemException) {
  540. _log.error(systemException, systemException);
  541. throw systemException;
  542. }
  543. }
  544. public static com.liferay.portal.kernel.model.User addUserWithWorkflow(
  545. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  546. String password1, String password2, boolean autoScreenName,
  547. String screenName, String emailAddress, long facebookId,
  548. String openId, java.util.Locale locale, String firstName,
  549. String middleName, String lastName, long prefixId, long suffixId,
  550. boolean male, int birthdayMonth, int birthdayDay, int birthdayYear,
  551. String jobTitle, long[] groupIds, long[] organizationIds,
  552. long[] roleIds, long[] userGroupIds, boolean sendEmail,
  553. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  554. throws com.liferay.portal.kernel.exception.PortalException {
  555. try {
  556. MethodKey methodKey = new MethodKey(
  557. UserServiceUtil.class, "addUserWithWorkflow",
  558. _addUserWithWorkflowParameterTypes13);
  559. MethodHandler methodHandler = new MethodHandler(
  560. methodKey, companyId, autoPassword, password1, password2,
  561. autoScreenName, screenName, emailAddress, facebookId, openId,
  562. locale, firstName, middleName, lastName, prefixId, suffixId,
  563. male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
  564. groupIds, organizationIds, roleIds, userGroupIds, sendEmail,
  565. serviceContext);
  566. Object returnObj = null;
  567. try {
  568. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  569. }
  570. catch (Exception exception) {
  571. if (exception instanceof
  572. com.liferay.portal.kernel.exception.PortalException) {
  573. throw (com.liferay.portal.kernel.exception.PortalException)
  574. exception;
  575. }
  576. throw new com.liferay.portal.kernel.exception.SystemException(
  577. exception);
  578. }
  579. return (com.liferay.portal.kernel.model.User)returnObj;
  580. }
  581. catch (com.liferay.portal.kernel.exception.SystemException
  582. systemException) {
  583. _log.error(systemException, systemException);
  584. throw systemException;
  585. }
  586. }
  587. public static com.liferay.portal.kernel.model.User addUserWithWorkflow(
  588. HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
  589. String password1, String password2, boolean autoScreenName,
  590. String screenName, String emailAddress, long facebookId,
  591. String openId, java.util.Locale locale, String firstName,
  592. String middleName, String lastName, long prefixId, long suffixId,
  593. boolean male, int birthdayMonth, int birthdayDay, int birthdayYear,
  594. String jobTitle, long[] groupIds, long[] organizationIds,
  595. long[] roleIds, long[] userGroupIds,
  596. java.util.List<com.liferay.portal.kernel.model.Address> addresses,
  597. java.util.List<com.liferay.portal.kernel.model.EmailAddress>
  598. emailAddresses,
  599. java.util.List<com.liferay.portal.kernel.model.Phone> phones,
  600. java.util.List<com.liferay.portal.kernel.model.Website> websites,
  601. java.util.List
  602. <com.liferay.announcements.kernel.model.AnnouncementsDelivery>
  603. announcementsDelivers,
  604. boolean sendEmail,
  605. com.liferay.portal.kernel.service.ServiceContext serviceContext)
  606. throws com.liferay.portal.kernel.exception.PortalException {
  607. try {
  608. MethodKey methodKey = new MethodKey(
  609. UserServiceUtil.class, "addUserWithWorkflow",
  610. _addUserWithWorkflowParameterTypes14);
  611. MethodHandler methodHandler = new MethodHandler(
  612. methodKey, companyId, autoPassword, password1, password2,
  613. autoScreenName, screenName, emailAddress, facebookId, openId,
  614. locale, firstName, middleName, lastName, prefixId, suffixId,
  615. male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
  616. groupIds, organizationIds, roleIds, userGroupIds, addresses,
  617. emailAddresses, phones, websites, announcementsDelivers,
  618. sendEmail, serviceContext);
  619. Object returnObj = null;
  620. try {
  621. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  622. }
  623. catch (Exception exception) {
  624. if (exception instanceof
  625. com.liferay.portal.kernel.exception.PortalException) {
  626. throw (com.liferay.portal.kernel.exception.PortalException)
  627. exception;
  628. }
  629. throw new com.liferay.portal.kernel.exception.SystemException(
  630. exception);
  631. }
  632. return (com.liferay.portal.kernel.model.User)returnObj;
  633. }
  634. catch (com.liferay.portal.kernel.exception.SystemException
  635. systemException) {
  636. _log.error(systemException, systemException);
  637. throw systemException;
  638. }
  639. }
  640. public static void deletePortrait(HttpPrincipal httpPrincipal, long userId)
  641. throws com.liferay.portal.kernel.exception.PortalException {
  642. try {
  643. MethodKey methodKey = new MethodKey(
  644. UserServiceUtil.class, "deletePortrait",
  645. _deletePortraitParameterTypes15);
  646. MethodHandler methodHandler = new MethodHandler(methodKey, userId);
  647. try {
  648. TunnelUtil.invoke(httpPrincipal, methodHandler);
  649. }
  650. catch (Exception exception) {
  651. if (exception instanceof
  652. com.liferay.portal.kernel.exception.PortalException) {
  653. throw (com.liferay.portal.kernel.exception.PortalException)
  654. exception;
  655. }
  656. throw new com.liferay.portal.kernel.exception.SystemException(
  657. exception);
  658. }
  659. }
  660. catch (com.liferay.portal.kernel.exception.SystemException
  661. systemException) {
  662. _log.error(systemException, systemException);
  663. throw systemException;
  664. }
  665. }
  666. public static void deleteRoleUser(
  667. HttpPrincipal httpPrincipal, long roleId, long userId)
  668. throws com.liferay.portal.kernel.exception.PortalException {
  669. try {
  670. MethodKey methodKey = new MethodKey(
  671. UserServiceUtil.class, "deleteRoleUser",
  672. _deleteRoleUserParameterTypes16);
  673. MethodHandler methodHandler = new MethodHandler(
  674. methodKey, roleId, userId);
  675. try {
  676. TunnelUtil.invoke(httpPrincipal, methodHandler);
  677. }
  678. catch (Exception exception) {
  679. if (exception instanceof
  680. com.liferay.portal.kernel.exception.PortalException) {
  681. throw (com.liferay.portal.kernel.exception.PortalException)
  682. exception;
  683. }
  684. throw new com.liferay.portal.kernel.exception.SystemException(
  685. exception);
  686. }
  687. }
  688. catch (com.liferay.portal.kernel.exception.SystemException
  689. systemException) {
  690. _log.error(systemException, systemException);
  691. throw systemException;
  692. }
  693. }
  694. public static void deleteUser(HttpPrincipal httpPrincipal, long userId)
  695. throws com.liferay.portal.kernel.exception.PortalException {
  696. try {
  697. MethodKey methodKey = new MethodKey(
  698. UserServiceUtil.class, "deleteUser",
  699. _deleteUserParameterTypes17);
  700. MethodHandler methodHandler = new MethodHandler(methodKey, userId);
  701. try {
  702. TunnelUtil.invoke(httpPrincipal, methodHandler);
  703. }
  704. catch (Exception exception) {
  705. if (exception instanceof
  706. com.liferay.portal.kernel.exception.PortalException) {
  707. throw (com.liferay.portal.kernel.exception.PortalException)
  708. exception;
  709. }
  710. throw new com.liferay.portal.kernel.exception.SystemException(
  711. exception);
  712. }
  713. }
  714. catch (com.liferay.portal.kernel.exception.SystemException
  715. systemException) {
  716. _log.error(systemException, systemException);
  717. throw systemException;
  718. }
  719. }
  720. public static java.util.List<com.liferay.portal.kernel.model.User>
  721. getCompanyUsers(
  722. HttpPrincipal httpPrincipal, long companyId, int start, int end)
  723. throws com.liferay.portal.kernel.exception.PortalException {
  724. try {
  725. MethodKey methodKey = new MethodKey(
  726. UserServiceUtil.class, "getCompanyUsers",
  727. _getCompanyUsersParameterTypes18);
  728. MethodHandler methodHandler = new MethodHandler(
  729. methodKey, companyId, start, end);
  730. Object returnObj = null;
  731. try {
  732. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  733. }
  734. catch (Exception exception) {
  735. if (exception instanceof
  736. com.liferay.portal.kernel.exception.PortalException) {
  737. throw (com.liferay.portal.kernel.exception.PortalException)
  738. exception;
  739. }
  740. throw new com.liferay.portal.kernel.exception.SystemException(
  741. exception);
  742. }
  743. return (java.util.List<com.liferay.portal.kernel.model.User>)
  744. returnObj;
  745. }
  746. catch (com.liferay.portal.kernel.exception.SystemException
  747. systemException) {
  748. _log.error(systemException, systemException);
  749. throw systemException;
  750. }
  751. }
  752. public static int getCompanyUsersCount(
  753. HttpPrincipal httpPrincipal, long companyId)
  754. throws com.liferay.portal.kernel.exception.PortalException {
  755. try {
  756. MethodKey methodKey = new MethodKey(
  757. UserServiceUtil.class, "getCompanyUsersCount",
  758. _getCompanyUsersCountParameterTypes19);
  759. MethodHandler methodHandler = new MethodHandler(
  760. methodKey, companyId);
  761. Object returnObj = null;
  762. try {
  763. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  764. }
  765. catch (Exception exception) {
  766. if (exception instanceof
  767. com.liferay.portal.kernel.exception.PortalException) {
  768. throw (com.liferay.portal.kernel.exception.PortalException)
  769. exception;
  770. }
  771. throw new com.liferay.portal.kernel.exception.SystemException(
  772. exception);
  773. }
  774. return ((Integer)returnObj).intValue();
  775. }
  776. catch (com.liferay.portal.kernel.exception.SystemException
  777. systemException) {
  778. _log.error(systemException, systemException);
  779. throw systemException;
  780. }
  781. }
  782. public static com.liferay.portal.kernel.model.User getCurrentUser(
  783. HttpPrincipal httpPrincipal)
  784. throws com.liferay.portal.kernel.exception.PortalException {
  785. try {
  786. MethodKey methodKey = new MethodKey(
  787. UserServiceUtil.class, "getCurrentUser",
  788. _getCurrentUserParameterTypes20);
  789. MethodHandler methodHandler = new MethodHandler(methodKey);
  790. Object returnObj = null;
  791. try {
  792. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  793. }
  794. catch (Exception exception) {
  795. if (exception instanceof
  796. com.liferay.portal.kernel.exception.PortalException) {
  797. throw (com.liferay.portal.kernel.exception.PortalException)
  798. exception;
  799. }
  800. throw new com.liferay.portal.kernel.exception.SystemException(
  801. exception);
  802. }
  803. return (com.liferay.portal.kernel.model.User)returnObj;
  804. }
  805. catch (com.liferay.portal.kernel.exception.SystemException
  806. systemException) {
  807. _log.error(systemException, systemException);
  808. throw systemException;
  809. }
  810. }
  811. public static long[] getGroupUserIds(
  812. HttpPrincipal httpPrincipal, long groupId)
  813. throws com.liferay.portal.kernel.exception.PortalException {
  814. try {
  815. MethodKey methodKey = new MethodKey(
  816. UserServiceUtil.class, "getGroupUserIds",
  817. _getGroupUserIdsParameterTypes21);
  818. MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
  819. Object returnObj = null;
  820. try {
  821. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  822. }
  823. catch (Exception exception) {
  824. if (exception instanceof
  825. com.liferay.portal.kernel.exception.PortalException) {
  826. throw (com.liferay.portal.kernel.exception.PortalException)
  827. exception;
  828. }
  829. throw new com.liferay.portal.kernel.exception.SystemException(
  830. exception);
  831. }
  832. return (long[])returnObj;
  833. }
  834. catch (com.liferay.portal.kernel.exception.SystemException
  835. systemException) {
  836. _log.error(systemException, systemException);
  837. throw systemException;
  838. }
  839. }
  840. public static java.util.List<com.liferay.portal.kernel.model.User>
  841. getGroupUsers(HttpPrincipal httpPrincipal, long groupId)
  842. throws com.liferay.portal.kernel.exception.PortalException {
  843. try {
  844. MethodKey methodKey = new MethodKey(
  845. UserServiceUtil.class, "getGroupUsers",
  846. _getGroupUsersParameterTypes22);
  847. MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
  848. Object returnObj = null;
  849. try {
  850. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  851. }
  852. catch (Exception exception) {
  853. if (exception instanceof
  854. com.liferay.portal.kernel.exception.PortalException) {
  855. throw (com.liferay.portal.kernel.exception.PortalException)
  856. exception;
  857. }
  858. throw new com.liferay.portal.kernel.exception.SystemException(
  859. exception);
  860. }
  861. return (java.util.List<com.liferay.portal.kernel.model.User>)
  862. returnObj;
  863. }
  864. catch (com.liferay.portal.kernel.exception.SystemException
  865. systemException) {
  866. _log.error(systemException, systemException);
  867. throw systemException;
  868. }
  869. }
  870. public static java.util.List<com.liferay.portal.kernel.model.User>
  871. getGroupUsers(
  872. HttpPrincipal httpPrincipal, long groupId, int status,
  873. int start, int end,
  874. com.liferay.portal.kernel.util.OrderByComparator
  875. <com.liferay.portal.kernel.model.User> orderByComparator)
  876. throws com.liferay.portal.kernel.exception.PortalException {
  877. try {
  878. MethodKey methodKey = new MethodKey(
  879. UserServiceUtil.class, "getGroupUsers",
  880. _getGroupUsersParameterTypes23);
  881. MethodHandler methodHandler = new MethodHandler(
  882. methodKey, groupId, status, start, end, orderByComparator);
  883. Object returnObj = null;
  884. try {
  885. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  886. }
  887. catch (Exception exception) {
  888. if (exception instanceof
  889. com.liferay.portal.kernel.exception.PortalException) {
  890. throw (com.liferay.portal.kernel.exception.PortalException)
  891. exception;
  892. }
  893. throw new com.liferay.portal.kernel.exception.SystemException(
  894. exception);
  895. }
  896. return (java.util.List<com.liferay.portal.kernel.model.User>)
  897. returnObj;
  898. }
  899. catch (com.liferay.portal.kernel.exception.SystemException
  900. systemException) {
  901. _log.error(systemException, systemException);
  902. throw systemException;
  903. }
  904. }
  905. public static java.util.List<com.liferay.portal.kernel.model.User>
  906. getGroupUsers(
  907. HttpPrincipal httpPrincipal, long groupId, int status,
  908. com.liferay.portal.kernel.util.OrderByComparator
  909. <com.liferay.portal.kernel.model.User> orderByComparator)
  910. throws com.liferay.portal.kernel.exception.PortalException {
  911. try {
  912. MethodKey methodKey = new MethodKey(
  913. UserServiceUtil.class, "getGroupUsers",
  914. _getGroupUsersParameterTypes24);
  915. MethodHandler methodHandler = new MethodHandler(
  916. methodKey, groupId, status, orderByComparator);
  917. Object returnObj = null;
  918. try {
  919. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  920. }
  921. catch (Exception exception) {
  922. if (exception instanceof
  923. com.liferay.portal.kernel.exception.PortalException) {
  924. throw (com.liferay.portal.kernel.exception.PortalException)
  925. exception;
  926. }
  927. throw new com.liferay.portal.kernel.exception.SystemException(
  928. exception);
  929. }
  930. return (java.util.List<com.liferay.portal.kernel.model.User>)
  931. returnObj;
  932. }
  933. catch (com.liferay.portal.kernel.exception.SystemException
  934. systemException) {
  935. _log.error(systemException, systemException);
  936. throw systemException;
  937. }
  938. }
  939. public static int getGroupUsersCount(
  940. HttpPrincipal httpPrincipal, long groupId, int status)
  941. throws com.liferay.portal.kernel.exception.PortalException {
  942. try {
  943. MethodKey methodKey = new MethodKey(
  944. UserServiceUtil.class, "getGroupUsersCount",
  945. _getGroupUsersCountParameterTypes25);
  946. MethodHandler methodHandler = new MethodHandler(
  947. methodKey, groupId, status);
  948. Object returnObj = null;
  949. try {
  950. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  951. }
  952. catch (Exception exception) {
  953. if (exception instanceof
  954. com.liferay.portal.kernel.exception.PortalException) {
  955. throw (com.liferay.portal.kernel.exception.PortalException)
  956. exception;
  957. }
  958. throw new com.liferay.portal.kernel.exception.SystemException(
  959. exception);
  960. }
  961. return ((Integer)returnObj).intValue();
  962. }
  963. catch (com.liferay.portal.kernel.exception.SystemException
  964. systemException) {
  965. _log.error(systemException, systemException);
  966. throw systemException;
  967. }
  968. }
  969. public static java.util.List<com.liferay.portal.kernel.model.User>
  970. getGtCompanyUsers(
  971. HttpPrincipal httpPrincipal, long gtUserId, long companyId,
  972. int size)
  973. throws com.liferay.portal.kernel.exception.PortalException {
  974. try {
  975. MethodKey methodKey = new MethodKey(
  976. UserServiceUtil.class, "getGtCompanyUsers",
  977. _getGtCompanyUsersParameterTypes26);
  978. MethodHandler methodHandler = new MethodHandler(
  979. methodKey, gtUserId, companyId, size);
  980. Object returnObj = null;
  981. try {
  982. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  983. }
  984. catch (Exception exception) {
  985. if (exception instanceof
  986. com.liferay.portal.kernel.exception.PortalException) {
  987. throw (com.liferay.portal.kernel.exception.PortalException)
  988. exception;
  989. }
  990. throw new com.liferay.portal.kernel.exception.SystemException(
  991. exception);
  992. }
  993. return (java.util.List<com.liferay.portal.kernel.model.User>)
  994. returnObj;
  995. }
  996. catch (com.liferay.portal.kernel.exception.SystemException
  997. systemException) {
  998. _log.error(systemException, systemException);
  999. throw systemException;
  1000. }
  1001. }
  1002. public static java.util.List<com.liferay.portal.kernel.model.User>
  1003. getGtOrganizationUsers(
  1004. HttpPrincipal httpPrincipal, long gtUserId, long organizationId,
  1005. int size)
  1006. throws com.liferay.portal.kernel.exception.PortalException {
  1007. try {
  1008. MethodKey methodKey = new MethodKey(
  1009. UserServiceUtil.class, "getGtOrganizationUsers",
  1010. _getGtOrganizationUsersParameterTypes27);
  1011. MethodHandler methodHandler = new MethodHandler(
  1012. methodKey, gtUserId, organizationId, size);
  1013. Object returnObj = null;
  1014. try {
  1015. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1016. }
  1017. catch (Exception exception) {
  1018. if (exception instanceof
  1019. com.liferay.portal.kernel.exception.PortalException) {
  1020. throw (com.liferay.portal.kernel.exception.PortalException)
  1021. exception;
  1022. }
  1023. throw new com.liferay.portal.kernel.exception.SystemException(
  1024. exception);
  1025. }
  1026. return (java.util.List<com.liferay.portal.kernel.model.User>)
  1027. returnObj;
  1028. }
  1029. catch (com.liferay.portal.kernel.exception.SystemException
  1030. systemException) {
  1031. _log.error(systemException, systemException);
  1032. throw systemException;
  1033. }
  1034. }
  1035. public static java.util.List<com.liferay.portal.kernel.model.User>
  1036. getGtUserGroupUsers(
  1037. HttpPrincipal httpPrincipal, long gtUserId, long userGroupId,
  1038. int size)
  1039. throws com.liferay.portal.kernel.exception.PortalException {
  1040. try {
  1041. MethodKey methodKey = new MethodKey(
  1042. UserServiceUtil.class, "getGtUserGroupUsers",
  1043. _getGtUserGroupUsersParameterTypes28);
  1044. MethodHandler methodHandler = new MethodHandler(
  1045. methodKey, gtUserId, userGroupId, size);
  1046. Object returnObj = null;
  1047. try {
  1048. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1049. }
  1050. catch (Exception exception) {
  1051. if (exception instanceof
  1052. com.liferay.portal.kernel.exception.PortalException) {
  1053. throw (com.liferay.portal.kernel.exception.PortalException)
  1054. exception;
  1055. }
  1056. throw new com.liferay.portal.kernel.exception.SystemException(
  1057. exception);
  1058. }
  1059. return (java.util.List<com.liferay.portal.kernel.model.User>)
  1060. returnObj;
  1061. }
  1062. catch (com.liferay.portal.kernel.exception.SystemException
  1063. systemException) {
  1064. _log.error(systemException, systemException);
  1065. throw systemException;
  1066. }
  1067. }
  1068. public static int getOrganizationsAndUserGroupsUsersCount(
  1069. HttpPrincipal httpPrincipal, long[] organizationIds,
  1070. long[] userGroupIds)
  1071. throws com.liferay.portal.kernel.security.auth.PrincipalException {
  1072. try {
  1073. MethodKey methodKey = new MethodKey(
  1074. UserServiceUtil.class,
  1075. "getOrganizationsAndUserGroupsUsersCount",
  1076. _getOrganizationsAndUserGroupsUsersCountParameterTypes29);
  1077. MethodHandler methodHandler = new MethodHandler(
  1078. methodKey, organizationIds, userGroupIds);
  1079. Object returnObj = null;
  1080. try {
  1081. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1082. }
  1083. catch (Exception exception) {
  1084. if (exception instanceof
  1085. com.liferay.portal.kernel.security.auth.
  1086. PrincipalException) {
  1087. throw (com.liferay.portal.kernel.security.auth.
  1088. PrincipalException)exception;
  1089. }
  1090. throw new com.liferay.portal.kernel.exception.SystemException(
  1091. exception);
  1092. }
  1093. return ((Integer)returnObj).intValue();
  1094. }
  1095. catch (com.liferay.portal.kernel.exception.SystemException
  1096. systemException) {
  1097. _log.error(systemException, systemException);
  1098. throw systemException;
  1099. }
  1100. }
  1101. public static long[] getOrganizationUserIds(
  1102. HttpPrincipal httpPrincipal, long organizationId)
  1103. throws com.liferay.portal.kernel.exception.PortalException {
  1104. try {
  1105. MethodKey methodKey = new MethodKey(
  1106. UserServiceUtil.class, "getOrganizationUserIds",
  1107. _getOrganizationUserIdsParameterTypes30);
  1108. MethodHandler methodHandler = new MethodHandler(
  1109. methodKey, organizationId);
  1110. Object returnObj = null;
  1111. try {
  1112. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1113. }
  1114. catch (Exception exception) {
  1115. if (exception instanceof
  1116. com.liferay.portal.kernel.exception.PortalException) {
  1117. throw (com.liferay.portal.kernel.exception.PortalException)
  1118. exception;
  1119. }
  1120. throw new com.liferay.portal.kernel.exception.SystemException(
  1121. exception);
  1122. }
  1123. return (long[])returnObj;
  1124. }
  1125. catch (com.liferay.portal.kernel.exception.SystemException
  1126. systemException) {
  1127. _log.error(systemException, systemException);
  1128. throw systemException;
  1129. }
  1130. }
  1131. public static java.util.List<com.liferay.portal.kernel.model.User>
  1132. getOrganizationUsers(
  1133. HttpPrincipal httpPrincipal, long organizationId)
  1134. throws com.liferay.portal.kernel.exception.PortalException {
  1135. try {
  1136. MethodKey methodKey = new MethodKey(
  1137. UserServiceUtil.class, "getOrganizationUsers",
  1138. _getOrganizationUsersParameterTypes31);
  1139. MethodHandler methodHandler = new MethodHandler(
  1140. methodKey, organizationId);
  1141. Object returnObj = null;
  1142. try {
  1143. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1144. }
  1145. catch (Exception exception) {
  1146. if (exception instanceof
  1147. com.liferay.portal.kernel.exception.PortalException) {
  1148. throw (com.liferay.portal.kernel.exception.PortalException)
  1149. exception;
  1150. }
  1151. throw new com.liferay.portal.kernel.exception.SystemException(
  1152. exception);
  1153. }
  1154. return (java.util.List<com.liferay.portal.kernel.model.User>)
  1155. returnObj;
  1156. }
  1157. catch (com.liferay.portal.kernel.exception.SystemException
  1158. systemException) {
  1159. _log.error(systemException, systemException);
  1160. throw systemException;
  1161. }
  1162. }
  1163. public static java.util.List<com.liferay.portal.kernel.model.User>
  1164. getOrganizationUsers(
  1165. HttpPrincipal httpPrincipal, long organizationId, int status,
  1166. int start, int end,
  1167. com.liferay.portal.kernel.util.OrderByComparator
  1168. <com.liferay.portal.kernel.model.User> orderByComparator)
  1169. throws com.liferay.portal.kernel.exception.PortalException {
  1170. try {
  1171. MethodKey methodKey = new MethodKey(
  1172. UserServiceUtil.class, "getOrganizationUsers",
  1173. _getOrganizationUsersParameterTypes32);
  1174. MethodHandler methodHandler = new MethodHandler(
  1175. methodKey, organizationId, status, start, end,
  1176. orderByComparator);
  1177. Object returnObj = null;
  1178. try {
  1179. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1180. }
  1181. catch (Exception exception) {
  1182. if (exception instanceof
  1183. com.liferay.portal.kernel.exception.PortalException) {
  1184. throw (com.liferay.portal.kernel.exception.PortalException)
  1185. exception;
  1186. }
  1187. throw new com.liferay.portal.kernel.exception.SystemException(
  1188. exception);
  1189. }
  1190. return (java.util.List<com.liferay.portal.kernel.model.User>)
  1191. returnObj;
  1192. }
  1193. catch (com.liferay.portal.kernel.exception.SystemException
  1194. systemException) {
  1195. _log.error(systemException, systemException);
  1196. throw systemException;
  1197. }
  1198. }
  1199. public static java.util.List<com.liferay.portal.kernel.model.User>
  1200. getOrganizationUsers(
  1201. HttpPrincipal httpPrincipal, long organizationId, int status,
  1202. com.liferay.portal.kernel.util.OrderByComparator
  1203. <com.liferay.portal.kernel.model.User> orderByComparator)
  1204. throws com.liferay.portal.kernel.exception.PortalException {
  1205. try {
  1206. MethodKey methodKey = new MethodKey(
  1207. UserServiceUtil.class, "getOrganizationUsers",
  1208. _getOrganizationUsersParameterTypes33);
  1209. MethodHandler methodHandler = new MethodHandler(
  1210. methodKey, organizationId, status, orderByComparator);
  1211. Object returnObj = null;
  1212. try {
  1213. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1214. }
  1215. catch (Exception exception) {
  1216. if (exception instanceof
  1217. com.liferay.portal.kernel.exception.PortalException) {
  1218. throw (com.liferay.portal.kernel.exception.PortalException)
  1219. exception;
  1220. }
  1221. throw new com.liferay.portal.kernel.exception.SystemException(
  1222. exception);
  1223. }
  1224. return (java.util.List<com.liferay.portal.kernel.model.User>)
  1225. returnObj;
  1226. }
  1227. catch (com.liferay.portal.kernel.exception.SystemException
  1228. systemException) {
  1229. _log.error(systemException, systemException);
  1230. throw systemException;
  1231. }
  1232. }
  1233. public static int getOrganizationUsersCount(
  1234. HttpPrincipal httpPrincipal, long organizationId, int status)
  1235. throws com.liferay.portal.kernel.exception.PortalException {
  1236. try {
  1237. MethodKey methodKey = new MethodKey(
  1238. UserServiceUtil.class, "getOrganizationUsersCount",
  1239. _getOrganizationUsersCountParameterTypes34);
  1240. MethodHandler methodHandler = new MethodHandler(
  1241. methodKey, organizationId, status);
  1242. Object returnObj = null;
  1243. try {
  1244. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1245. }
  1246. catch (Exception exception) {
  1247. if (exception instanceof
  1248. com.liferay.portal.kernel.exception.PortalException) {
  1249. throw (com.liferay.portal.kernel.exception.PortalException)
  1250. exception;
  1251. }
  1252. throw new com.liferay.portal.kernel.exception.SystemException(
  1253. exception);
  1254. }
  1255. return ((Integer)returnObj).intValue();
  1256. }
  1257. catch (com.liferay.portal.kernel.exception.SystemException
  1258. systemException) {
  1259. _log.error(systemException, systemException);
  1260. throw systemException;
  1261. }
  1262. }
  1263. public static long[] getRoleUserIds(
  1264. HttpPrincipal httpPrincipal, long roleId)
  1265. throws com.liferay.portal.kernel.exception.PortalException {
  1266. try {
  1267. MethodKey methodKey = new MethodKey(
  1268. UserServiceUtil.class, "getRoleUserIds",
  1269. _getRoleUserIdsParameterTypes35);
  1270. MethodHandler methodHandler = new MethodHandler(methodKey, roleId);
  1271. Object returnObj = null;
  1272. try {
  1273. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1274. }
  1275. catch (Exception exception) {
  1276. if (exception instanceof
  1277. com.liferay.portal.kernel.exception.PortalException) {
  1278. throw (com.liferay.portal.kernel.exception.PortalException)
  1279. exception;
  1280. }
  1281. throw new com.liferay.portal.kernel.exception.SystemException(
  1282. exception);
  1283. }
  1284. return (long[])returnObj;
  1285. }
  1286. catch (com.liferay.portal.kernel.exception.SystemException
  1287. systemException) {
  1288. _log.error(systemException, systemException);
  1289. throw systemException;
  1290. }
  1291. }
  1292. public static com.liferay.portal.kernel.model.User getUserByEmailAddress(
  1293. HttpPrincipal httpPrincipal, long companyId, String emailAddress)
  1294. throws com.liferay.portal.kernel.exception.PortalException {
  1295. try {
  1296. MethodKey methodKey = new MethodKey(
  1297. UserServiceUtil.class, "getUserByEmailAddress",
  1298. _getUserByEmailAddressParameterTypes36);
  1299. MethodHandler methodHandler = new MethodHandler(
  1300. methodKey, companyId, emailAddress);
  1301. Object returnObj = null;
  1302. try {
  1303. returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
  1304. }
  1305. catch (Exception exception) {
  1306. if (exception instanceof
  1307. com.liferay.portal.kernel.exception.PortalException) {
  1308. throw (com.liferay.portal.kernel.exception.PortalException)
  1309. exception;
  1310. }
  1311. throw new com.liferay.portal.kernel.exception.SystemException(
  1312. exception);
  1313. }
  1314. return (com.liferay.portal.kernel.model.User)returnObj;
  1315. }
  1316. catch (com.liferay.portal.kernel.exception.SystemException
  1317. systemException) {
  1318. _log.error(systemException, systemException);
  1319. throw systemException;
  1320. }
  1321. }
  1322. p