001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.security.auth.HttpPrincipal;
022 import com.liferay.portal.kernel.service.UserGroupGroupRoleServiceUtil;
023 import com.liferay.portal.kernel.service.http.TunnelUtil;
024 import com.liferay.portal.kernel.util.MethodHandler;
025 import com.liferay.portal.kernel.util.MethodKey;
026
027
055 @ProviderType
056 public class UserGroupGroupRoleServiceHttp {
057 public static void addUserGroupGroupRoles(HttpPrincipal httpPrincipal,
058 long userGroupId, long groupId, long[] roleIds)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 try {
061 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class,
062 "addUserGroupGroupRoles",
063 _addUserGroupGroupRolesParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey,
066 userGroupId, groupId, roleIds);
067
068 try {
069 TunnelUtil.invoke(httpPrincipal, methodHandler);
070 }
071 catch (Exception e) {
072 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
073 throw (com.liferay.portal.kernel.exception.PortalException)e;
074 }
075
076 throw new com.liferay.portal.kernel.exception.SystemException(e);
077 }
078 }
079 catch (com.liferay.portal.kernel.exception.SystemException se) {
080 _log.error(se, se);
081
082 throw se;
083 }
084 }
085
086 public static void addUserGroupGroupRoles(HttpPrincipal httpPrincipal,
087 long[] userGroupIds, long groupId, long roleId)
088 throws com.liferay.portal.kernel.exception.PortalException {
089 try {
090 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class,
091 "addUserGroupGroupRoles",
092 _addUserGroupGroupRolesParameterTypes1);
093
094 MethodHandler methodHandler = new MethodHandler(methodKey,
095 userGroupIds, groupId, roleId);
096
097 try {
098 TunnelUtil.invoke(httpPrincipal, methodHandler);
099 }
100 catch (Exception e) {
101 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
102 throw (com.liferay.portal.kernel.exception.PortalException)e;
103 }
104
105 throw new com.liferay.portal.kernel.exception.SystemException(e);
106 }
107 }
108 catch (com.liferay.portal.kernel.exception.SystemException se) {
109 _log.error(se, se);
110
111 throw se;
112 }
113 }
114
115 public static void deleteUserGroupGroupRoles(HttpPrincipal httpPrincipal,
116 long userGroupId, long groupId, long[] roleIds)
117 throws com.liferay.portal.kernel.exception.PortalException {
118 try {
119 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class,
120 "deleteUserGroupGroupRoles",
121 _deleteUserGroupGroupRolesParameterTypes2);
122
123 MethodHandler methodHandler = new MethodHandler(methodKey,
124 userGroupId, groupId, roleIds);
125
126 try {
127 TunnelUtil.invoke(httpPrincipal, methodHandler);
128 }
129 catch (Exception e) {
130 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
131 throw (com.liferay.portal.kernel.exception.PortalException)e;
132 }
133
134 throw new com.liferay.portal.kernel.exception.SystemException(e);
135 }
136 }
137 catch (com.liferay.portal.kernel.exception.SystemException se) {
138 _log.error(se, se);
139
140 throw se;
141 }
142 }
143
144 public static void deleteUserGroupGroupRoles(HttpPrincipal httpPrincipal,
145 long[] userGroupIds, long groupId, long roleId)
146 throws com.liferay.portal.kernel.exception.PortalException {
147 try {
148 MethodKey methodKey = new MethodKey(UserGroupGroupRoleServiceUtil.class,
149 "deleteUserGroupGroupRoles",
150 _deleteUserGroupGroupRolesParameterTypes3);
151
152 MethodHandler methodHandler = new MethodHandler(methodKey,
153 userGroupIds, groupId, roleId);
154
155 try {
156 TunnelUtil.invoke(httpPrincipal, methodHandler);
157 }
158 catch (Exception e) {
159 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
160 throw (com.liferay.portal.kernel.exception.PortalException)e;
161 }
162
163 throw new com.liferay.portal.kernel.exception.SystemException(e);
164 }
165 }
166 catch (com.liferay.portal.kernel.exception.SystemException se) {
167 _log.error(se, se);
168
169 throw se;
170 }
171 }
172
173 private static Log _log = LogFactoryUtil.getLog(UserGroupGroupRoleServiceHttp.class);
174 private static final Class<?>[] _addUserGroupGroupRolesParameterTypes0 = new Class[] {
175 long.class, long.class, long[].class
176 };
177 private static final Class<?>[] _addUserGroupGroupRolesParameterTypes1 = new Class[] {
178 long[].class, long.class, long.class
179 };
180 private static final Class<?>[] _deleteUserGroupGroupRolesParameterTypes2 = new Class[] {
181 long.class, long.class, long[].class
182 };
183 private static final Class<?>[] _deleteUserGroupGroupRolesParameterTypes3 = new Class[] {
184 long[].class, long.class, long.class
185 };
186 }