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.MembershipRequestServiceUtil;
23
24
61 public class MembershipRequestServiceHttp {
62 public static com.liferay.portal.model.MembershipRequest addMembershipRequest(
63 HttpPrincipal httpPrincipal, long groupId, java.lang.String comments)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException {
66 try {
67 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class.getName(),
68 "addMembershipRequest", _addMembershipRequestParameterTypes0);
69
70 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
71 comments);
72
73 Object returnObj = null;
74
75 try {
76 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
77 }
78 catch (Exception e) {
79 if (e instanceof com.liferay.portal.PortalException) {
80 throw (com.liferay.portal.PortalException)e;
81 }
82
83 if (e instanceof com.liferay.portal.SystemException) {
84 throw (com.liferay.portal.SystemException)e;
85 }
86
87 throw new com.liferay.portal.SystemException(e);
88 }
89
90 return (com.liferay.portal.model.MembershipRequest)returnObj;
91 }
92 catch (com.liferay.portal.SystemException se) {
93 _log.error(se, se);
94
95 throw se;
96 }
97 }
98
99 public static void deleteMembershipRequests(HttpPrincipal httpPrincipal,
100 long groupId, int statusId)
101 throws com.liferay.portal.PortalException,
102 com.liferay.portal.SystemException {
103 try {
104 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class.getName(),
105 "deleteMembershipRequests",
106 _deleteMembershipRequestsParameterTypes1);
107
108 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
109 statusId);
110
111 try {
112 TunnelUtil.invoke(httpPrincipal, methodHandler);
113 }
114 catch (Exception e) {
115 if (e instanceof com.liferay.portal.PortalException) {
116 throw (com.liferay.portal.PortalException)e;
117 }
118
119 if (e instanceof com.liferay.portal.SystemException) {
120 throw (com.liferay.portal.SystemException)e;
121 }
122
123 throw new com.liferay.portal.SystemException(e);
124 }
125 }
126 catch (com.liferay.portal.SystemException se) {
127 _log.error(se, se);
128
129 throw se;
130 }
131 }
132
133 public static com.liferay.portal.model.MembershipRequest getMembershipRequest(
134 HttpPrincipal httpPrincipal, long membershipRequestId)
135 throws com.liferay.portal.PortalException,
136 com.liferay.portal.SystemException {
137 try {
138 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class.getName(),
139 "getMembershipRequest", _getMembershipRequestParameterTypes2);
140
141 MethodHandler methodHandler = new MethodHandler(methodKey,
142 membershipRequestId);
143
144 Object returnObj = null;
145
146 try {
147 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
148 }
149 catch (Exception e) {
150 if (e instanceof com.liferay.portal.PortalException) {
151 throw (com.liferay.portal.PortalException)e;
152 }
153
154 if (e instanceof com.liferay.portal.SystemException) {
155 throw (com.liferay.portal.SystemException)e;
156 }
157
158 throw new com.liferay.portal.SystemException(e);
159 }
160
161 return (com.liferay.portal.model.MembershipRequest)returnObj;
162 }
163 catch (com.liferay.portal.SystemException se) {
164 _log.error(se, se);
165
166 throw se;
167 }
168 }
169
170 public static void updateStatus(HttpPrincipal httpPrincipal,
171 long membershipRequestId, java.lang.String reviewComments, int statusId)
172 throws com.liferay.portal.PortalException,
173 com.liferay.portal.SystemException {
174 try {
175 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class.getName(),
176 "updateStatus", _updateStatusParameterTypes3);
177
178 MethodHandler methodHandler = new MethodHandler(methodKey,
179 membershipRequestId, reviewComments, statusId);
180
181 try {
182 TunnelUtil.invoke(httpPrincipal, methodHandler);
183 }
184 catch (Exception e) {
185 if (e instanceof com.liferay.portal.PortalException) {
186 throw (com.liferay.portal.PortalException)e;
187 }
188
189 if (e instanceof com.liferay.portal.SystemException) {
190 throw (com.liferay.portal.SystemException)e;
191 }
192
193 throw new com.liferay.portal.SystemException(e);
194 }
195 }
196 catch (com.liferay.portal.SystemException se) {
197 _log.error(se, se);
198
199 throw se;
200 }
201 }
202
203 private static Log _log = LogFactoryUtil.getLog(MembershipRequestServiceHttp.class);
204 private static final Class<?>[] _addMembershipRequestParameterTypes0 = new Class[] {
205 long.class, java.lang.String.class
206 };
207 private static final Class<?>[] _deleteMembershipRequestsParameterTypes1 = new Class[] {
208 long.class, int.class
209 };
210 private static final Class<?>[] _getMembershipRequestParameterTypes2 = new Class[] {
211 long.class
212 };
213 private static final Class<?>[] _updateStatusParameterTypes3 = new Class[] {
214 long.class, java.lang.String.class, int.class
215 };
216 }