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