1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.UserGroupGroupRoleServiceUtil;
23
24
61 public class UserGroupGroupRoleServiceHttp {
62 public static void addUserGroupGroupRoles(HttpPrincipal httpPrincipal,
63 long userGroupId, long groupId, long[] roleIds)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException {
66 try {
67 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class.getName(),
68 "addUserGroupGroupRoles",
69 _addUserGroupGroupRolesParameterTypes0);
70
71 MethodHandler methodHandler = new MethodHandler(methodKey,
72 userGroupId, groupId, roleIds);
73
74 try {
75 TunnelUtil.invoke(httpPrincipal, methodHandler);
76 }
77 catch (Exception e) {
78 if (e instanceof com.liferay.portal.PortalException) {
79 throw (com.liferay.portal.PortalException)e;
80 }
81
82 if (e instanceof com.liferay.portal.SystemException) {
83 throw (com.liferay.portal.SystemException)e;
84 }
85
86 throw new com.liferay.portal.SystemException(e);
87 }
88 }
89 catch (com.liferay.portal.SystemException se) {
90 _log.error(se, se);
91
92 throw se;
93 }
94 }
95
96 public static void addUserGroupGroupRoles(HttpPrincipal httpPrincipal,
97 long[] userGroupIds, long groupId, long roleId)
98 throws com.liferay.portal.PortalException,
99 com.liferay.portal.SystemException {
100 try {
101 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class.getName(),
102 "addUserGroupGroupRoles",
103 _addUserGroupGroupRolesParameterTypes1);
104
105 MethodHandler methodHandler = new MethodHandler(methodKey,
106 userGroupIds, groupId, roleId);
107
108 try {
109 TunnelUtil.invoke(httpPrincipal, methodHandler);
110 }
111 catch (Exception e) {
112 if (e instanceof com.liferay.portal.PortalException) {
113 throw (com.liferay.portal.PortalException)e;
114 }
115
116 if (e instanceof com.liferay.portal.SystemException) {
117 throw (com.liferay.portal.SystemException)e;
118 }
119
120 throw new com.liferay.portal.SystemException(e);
121 }
122 }
123 catch (com.liferay.portal.SystemException se) {
124 _log.error(se, se);
125
126 throw se;
127 }
128 }
129
130 public static void deleteUserGroupGroupRoles(HttpPrincipal httpPrincipal,
131 long userGroupId, long groupId, long[] roleIds)
132 throws com.liferay.portal.PortalException,
133 com.liferay.portal.SystemException {
134 try {
135 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class.getName(),
136 "deleteUserGroupGroupRoles",
137 _deleteUserGroupGroupRolesParameterTypes2);
138
139 MethodHandler methodHandler = new MethodHandler(methodKey,
140 userGroupId, groupId, roleIds);
141
142 try {
143 TunnelUtil.invoke(httpPrincipal, methodHandler);
144 }
145 catch (Exception e) {
146 if (e instanceof com.liferay.portal.PortalException) {
147 throw (com.liferay.portal.PortalException)e;
148 }
149
150 if (e instanceof com.liferay.portal.SystemException) {
151 throw (com.liferay.portal.SystemException)e;
152 }
153
154 throw new com.liferay.portal.SystemException(e);
155 }
156 }
157 catch (com.liferay.portal.SystemException se) {
158 _log.error(se, se);
159
160 throw se;
161 }
162 }
163
164 public static void deleteUserGroupGroupRoles(HttpPrincipal httpPrincipal,
165 long[] userGroupIds, long groupId, long roleId)
166 throws com.liferay.portal.PortalException,
167 com.liferay.portal.SystemException {
168 try {
169 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class.getName(),
170 "deleteUserGroupGroupRoles",
171 _deleteUserGroupGroupRolesParameterTypes3);
172
173 MethodHandler methodHandler = new MethodHandler(methodKey,
174 userGroupIds, groupId, roleId);
175
176 try {
177 TunnelUtil.invoke(httpPrincipal, methodHandler);
178 }
179 catch (Exception e) {
180 if (e instanceof com.liferay.portal.PortalException) {
181 throw (com.liferay.portal.PortalException)e;
182 }
183
184 if (e instanceof com.liferay.portal.SystemException) {
185 throw (com.liferay.portal.SystemException)e;
186 }
187
188 throw new com.liferay.portal.SystemException(e);
189 }
190 }
191 catch (com.liferay.portal.SystemException se) {
192 _log.error(se, se);
193
194 throw se;
195 }
196 }
197
198 private static Log _log = LogFactoryUtil.getLog(UserGroupGroupRoleServiceHttp.class);
199 private static final Class<?>[] _addUserGroupGroupRolesParameterTypes0 = new Class[] {
200 long.class, long.class, long[].class
201 };
202 private static final Class<?>[] _addUserGroupGroupRolesParameterTypes1 = new Class[] {
203 long[].class, long.class, long.class
204 };
205 private static final Class<?>[] _deleteUserGroupGroupRolesParameterTypes2 = new Class[] {
206 long.class, long.class, long[].class
207 };
208 private static final Class<?>[] _deleteUserGroupGroupRolesParameterTypes3 = new Class[] {
209 long[].class, long.class, long.class
210 };
211 }