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.MembershipRequestServiceUtil;
025
026
054 @ProviderType
055 public class MembershipRequestServiceHttp {
056 public static com.liferay.portal.model.MembershipRequest addMembershipRequest(
057 HttpPrincipal httpPrincipal, long groupId, java.lang.String comments,
058 com.liferay.portal.service.ServiceContext serviceContext)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 try {
061 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class,
062 "addMembershipRequest", _addMembershipRequestParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
065 comments, serviceContext);
066
067 Object returnObj = null;
068
069 try {
070 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
071 }
072 catch (Exception e) {
073 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
074 throw (com.liferay.portal.kernel.exception.PortalException)e;
075 }
076
077 throw new com.liferay.portal.kernel.exception.SystemException(e);
078 }
079
080 return (com.liferay.portal.model.MembershipRequest)returnObj;
081 }
082 catch (com.liferay.portal.kernel.exception.SystemException se) {
083 _log.error(se, se);
084
085 throw se;
086 }
087 }
088
089 public static void deleteMembershipRequests(HttpPrincipal httpPrincipal,
090 long groupId, long statusId)
091 throws com.liferay.portal.kernel.exception.PortalException {
092 try {
093 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class,
094 "deleteMembershipRequests",
095 _deleteMembershipRequestsParameterTypes1);
096
097 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
098 statusId);
099
100 try {
101 TunnelUtil.invoke(httpPrincipal, methodHandler);
102 }
103 catch (Exception e) {
104 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
105 throw (com.liferay.portal.kernel.exception.PortalException)e;
106 }
107
108 throw new com.liferay.portal.kernel.exception.SystemException(e);
109 }
110 }
111 catch (com.liferay.portal.kernel.exception.SystemException se) {
112 _log.error(se, se);
113
114 throw se;
115 }
116 }
117
118 public static com.liferay.portal.model.MembershipRequest getMembershipRequest(
119 HttpPrincipal httpPrincipal, long membershipRequestId)
120 throws com.liferay.portal.kernel.exception.PortalException {
121 try {
122 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class,
123 "getMembershipRequest", _getMembershipRequestParameterTypes2);
124
125 MethodHandler methodHandler = new MethodHandler(methodKey,
126 membershipRequestId);
127
128 Object returnObj = null;
129
130 try {
131 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
132 }
133 catch (Exception e) {
134 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
135 throw (com.liferay.portal.kernel.exception.PortalException)e;
136 }
137
138 throw new com.liferay.portal.kernel.exception.SystemException(e);
139 }
140
141 return (com.liferay.portal.model.MembershipRequest)returnObj;
142 }
143 catch (com.liferay.portal.kernel.exception.SystemException se) {
144 _log.error(se, se);
145
146 throw se;
147 }
148 }
149
150 public static void updateStatus(HttpPrincipal httpPrincipal,
151 long membershipRequestId, java.lang.String reviewComments,
152 long statusId, com.liferay.portal.service.ServiceContext serviceContext)
153 throws com.liferay.portal.kernel.exception.PortalException {
154 try {
155 MethodKey methodKey = new MethodKey(MembershipRequestServiceUtil.class,
156 "updateStatus", _updateStatusParameterTypes3);
157
158 MethodHandler methodHandler = new MethodHandler(methodKey,
159 membershipRequestId, reviewComments, statusId,
160 serviceContext);
161
162 try {
163 TunnelUtil.invoke(httpPrincipal, methodHandler);
164 }
165 catch (Exception e) {
166 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
167 throw (com.liferay.portal.kernel.exception.PortalException)e;
168 }
169
170 throw new com.liferay.portal.kernel.exception.SystemException(e);
171 }
172 }
173 catch (com.liferay.portal.kernel.exception.SystemException se) {
174 _log.error(se, se);
175
176 throw se;
177 }
178 }
179
180 private static Log _log = LogFactoryUtil.getLog(MembershipRequestServiceHttp.class);
181 private static final Class<?>[] _addMembershipRequestParameterTypes0 = new Class[] {
182 long.class, java.lang.String.class,
183 com.liferay.portal.service.ServiceContext.class
184 };
185 private static final Class<?>[] _deleteMembershipRequestsParameterTypes1 = new Class[] {
186 long.class, long.class
187 };
188 private static final Class<?>[] _getMembershipRequestParameterTypes2 = new Class[] {
189 long.class
190 };
191 private static final Class<?>[] _updateStatusParameterTypes3 = new Class[] {
192 long.class, java.lang.String.class, long.class,
193 com.liferay.portal.service.ServiceContext.class
194 };
195 }