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

https://github.com/spreddy/liferay-portal · Java · 314 lines · 121 code · 29 blank · 164 comment · 0 complexity · 84aa7e78fa807664bfa5a0633497f77d MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-2011 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.service.UserGroupServiceUtil;
  18. import java.rmi.RemoteException;
  19. /**
  20. * <p>
  21. * This class provides a SOAP utility for the
  22. * {@link com.liferay.portal.service.UserGroupServiceUtil} service utility. The
  23. * static methods of this class calls the same methods of the service utility.
  24. * However, the signatures are different because it is difficult for SOAP to
  25. * support certain types.
  26. * </p>
  27. *
  28. * <p>
  29. * ServiceBuilder follows certain rules in translating the methods. For example,
  30. * if the method in the service utility returns a {@link java.util.List}, that
  31. * is translated to an array of {@link com.liferay.portal.model.UserGroupSoap}.
  32. * If the method in the service utility returns a
  33. * {@link com.liferay.portal.model.UserGroup}, that is translated to a
  34. * {@link com.liferay.portal.model.UserGroupSoap}. Methods that SOAP cannot
  35. * safely wire are skipped.
  36. * </p>
  37. *
  38. * <p>
  39. * The benefits of using the SOAP utility is that it is cross platform
  40. * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
  41. * even Perl, to call the generated services. One drawback of SOAP is that it is
  42. * slow because it needs to serialize all calls into a text format (XML).
  43. * </p>
  44. *
  45. * <p>
  46. * You can see a list of services at
  47. * http://localhost:8080/tunnel-web/secure/axis. Set the property
  48. * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
  49. * security.
  50. * </p>
  51. *
  52. * <p>
  53. * The SOAP utility is only generated for remote services.
  54. * </p>
  55. *
  56. * @author Brian Wing Shun Chan
  57. * @see UserGroupServiceHttp
  58. * @see com.liferay.portal.model.UserGroupSoap
  59. * @see com.liferay.portal.service.UserGroupServiceUtil
  60. * @generated
  61. */
  62. public class UserGroupServiceSoap {
  63. /**
  64. * Adds the user groups to the group.
  65. *
  66. * @param groupId the primary key of the group
  67. * @param userGroupIds the primary keys of the user groups
  68. * @throws PortalException if a group or user group with the primary key
  69. could not be found, or if the user did not have permission to
  70. assign group members
  71. * @throws SystemException if a system exception occurred
  72. */
  73. public static void addGroupUserGroups(long groupId, long[] userGroupIds)
  74. throws RemoteException {
  75. try {
  76. UserGroupServiceUtil.addGroupUserGroups(groupId, userGroupIds);
  77. }
  78. catch (Exception e) {
  79. _log.error(e, e);
  80. throw new RemoteException(e.getMessage());
  81. }
  82. }
  83. /**
  84. * Adds the user groups to the team
  85. *
  86. * @param teamId the primary key of the team
  87. * @param userGroupIds the primary keys of the user groups
  88. * @throws PortalException if a team or user group with the primary key
  89. could not be found, or if the user did not have permission to
  90. assign team members
  91. * @throws SystemException if a system exception occurred
  92. */
  93. public static void addTeamUserGroups(long teamId, long[] userGroupIds)
  94. throws RemoteException {
  95. try {
  96. UserGroupServiceUtil.addTeamUserGroups(teamId, userGroupIds);
  97. }
  98. catch (Exception e) {
  99. _log.error(e, e);
  100. throw new RemoteException(e.getMessage());
  101. }
  102. }
  103. /**
  104. * Adds a user group.
  105. *
  106. * <p>
  107. * This method handles the creation and bookkeeping of the user group,
  108. * including its resources, metadata, and internal data structures.
  109. * </p>
  110. *
  111. * @param name the user group's name
  112. * @param description the user group's description
  113. * @param publicLayoutSetPrototypeId the primary key of the user group's
  114. public layout set
  115. * @param privateLayoutSetPrototypeId the primary key of the user group's
  116. private layout set
  117. * @return the user group
  118. * @throws PortalException if the user group's information was invalid or
  119. if the user did not have permission to add the user group
  120. * @throws SystemException if a system exception occurred
  121. */
  122. public static com.liferay.portal.model.UserGroupSoap addUserGroup(
  123. java.lang.String name, java.lang.String description,
  124. long publicLayoutSetPrototypeId, long privateLayoutSetPrototypeId)
  125. throws RemoteException {
  126. try {
  127. com.liferay.portal.model.UserGroup returnValue = UserGroupServiceUtil.addUserGroup(name,
  128. description, publicLayoutSetPrototypeId,
  129. privateLayoutSetPrototypeId);
  130. return com.liferay.portal.model.UserGroupSoap.toSoapModel(returnValue);
  131. }
  132. catch (Exception e) {
  133. _log.error(e, e);
  134. throw new RemoteException(e.getMessage());
  135. }
  136. }
  137. /**
  138. * Deletes the user group.
  139. *
  140. * @param userGroupId the primary key of the user group
  141. * @throws PortalException if a user group with the primary key could not
  142. be found, if the user did not have permission to delete the user
  143. group, or if the user group had a workflow in approved status
  144. * @throws SystemException if a system exception occurred
  145. */
  146. public static void deleteUserGroup(long userGroupId)
  147. throws RemoteException {
  148. try {
  149. UserGroupServiceUtil.deleteUserGroup(userGroupId);
  150. }
  151. catch (Exception e) {
  152. _log.error(e, e);
  153. throw new RemoteException(e.getMessage());
  154. }
  155. }
  156. /**
  157. * Returns the user group with the primary key.
  158. *
  159. * @param userGroupId the primary key of the user group
  160. * @return Returns the user group with the primary key
  161. * @throws PortalException if a user group with the primary key could not
  162. be found or if the user did not have permission to view the user
  163. group
  164. * @throws SystemException if a system exception occurred
  165. */
  166. public static com.liferay.portal.model.UserGroupSoap getUserGroup(
  167. long userGroupId) throws RemoteException {
  168. try {
  169. com.liferay.portal.model.UserGroup returnValue = UserGroupServiceUtil.getUserGroup(userGroupId);
  170. return com.liferay.portal.model.UserGroupSoap.toSoapModel(returnValue);
  171. }
  172. catch (Exception e) {
  173. _log.error(e, e);
  174. throw new RemoteException(e.getMessage());
  175. }
  176. }
  177. /**
  178. * Returns the user group with the name.
  179. *
  180. * @param name the user group's name
  181. * @return Returns the user group with the name
  182. * @throws PortalException if a user group with the name could not be found
  183. or if the user did not have permission to view the user group
  184. * @throws SystemException if a system exception occurred
  185. */
  186. public static com.liferay.portal.model.UserGroupSoap getUserGroup(
  187. java.lang.String name) throws RemoteException {
  188. try {
  189. com.liferay.portal.model.UserGroup returnValue = UserGroupServiceUtil.getUserGroup(name);
  190. return com.liferay.portal.model.UserGroupSoap.toSoapModel(returnValue);
  191. }
  192. catch (Exception e) {
  193. _log.error(e, e);
  194. throw new RemoteException(e.getMessage());
  195. }
  196. }
  197. /**
  198. * Returns all the user groups to which the user belongs.
  199. *
  200. * @param userId the primary key of the user
  201. * @return the user groups to which the user belongs
  202. * @throws SystemException if a system exception occurred
  203. */
  204. public static com.liferay.portal.model.UserGroupSoap[] getUserUserGroups(
  205. long userId) throws RemoteException {
  206. try {
  207. java.util.List<com.liferay.portal.model.UserGroup> returnValue = UserGroupServiceUtil.getUserUserGroups(userId);
  208. return com.liferay.portal.model.UserGroupSoap.toSoapModels(returnValue);
  209. }
  210. catch (Exception e) {
  211. _log.error(e, e);
  212. throw new RemoteException(e.getMessage());
  213. }
  214. }
  215. /**
  216. * Removes the user groups from the group.
  217. *
  218. * @param groupId the primary key of the group
  219. * @param userGroupIds the primary keys of the user groups
  220. * @throws PortalException if the user did not have permission to assign
  221. group members
  222. * @throws SystemException if a system exception occurred
  223. */
  224. public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
  225. throws RemoteException {
  226. try {
  227. UserGroupServiceUtil.unsetGroupUserGroups(groupId, userGroupIds);
  228. }
  229. catch (Exception e) {
  230. _log.error(e, e);
  231. throw new RemoteException(e.getMessage());
  232. }
  233. }
  234. /**
  235. * Removes the user groups from the team.
  236. *
  237. * @param teamId the primary key of the team
  238. * @param userGroupIds the primary keys of the user groups
  239. * @throws PortalException if the user did not have permission to assign
  240. team members
  241. * @throws SystemException if a system exception occurred
  242. */
  243. public static void unsetTeamUserGroups(long teamId, long[] userGroupIds)
  244. throws RemoteException {
  245. try {
  246. UserGroupServiceUtil.unsetTeamUserGroups(teamId, userGroupIds);
  247. }
  248. catch (Exception e) {
  249. _log.error(e, e);
  250. throw new RemoteException(e.getMessage());
  251. }
  252. }
  253. /**
  254. * Updates the user group.
  255. *
  256. * @param userGroupId the primary key of the user group
  257. * @param name the user group's name
  258. * @param description the the user group's description
  259. * @param publicLayoutSetPrototypeId the primary key of the user group's
  260. public layout set
  261. * @param privateLayoutSetPrototypeId the primary key of the user group's
  262. private layout set
  263. * @return the user group
  264. * @throws PortalException if a user group with the primary key was not
  265. found, if the new information was invalid, or if the user did
  266. not have permission to update the user group information
  267. * @throws SystemException if a system exception occurred
  268. */
  269. public static com.liferay.portal.model.UserGroupSoap updateUserGroup(
  270. long userGroupId, java.lang.String name, java.lang.String description,
  271. long publicLayoutSetPrototypeId, long privateLayoutSetPrototypeId)
  272. throws RemoteException {
  273. try {
  274. com.liferay.portal.model.UserGroup returnValue = UserGroupServiceUtil.updateUserGroup(userGroupId,
  275. name, description, publicLayoutSetPrototypeId,
  276. privateLayoutSetPrototypeId);
  277. return com.liferay.portal.model.UserGroupSoap.toSoapModel(returnValue);
  278. }
  279. catch (Exception e) {
  280. _log.error(e, e);
  281. throw new RemoteException(e.getMessage());
  282. }
  283. }
  284. private static Log _log = LogFactoryUtil.getLog(UserGroupServiceSoap.class);
  285. }