001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class MembershipRequestServiceUtil {
035
040 public static com.liferay.portal.model.MembershipRequest addMembershipRequest(
041 long groupId, java.lang.String comments,
042 com.liferay.portal.service.ServiceContext serviceContext)
043 throws com.liferay.portal.kernel.exception.PortalException,
044 com.liferay.portal.kernel.exception.SystemException {
045 return getService()
046 .addMembershipRequest(groupId, comments, serviceContext);
047 }
048
049 public static void deleteMembershipRequests(long groupId, int statusId)
050 throws com.liferay.portal.kernel.exception.PortalException,
051 com.liferay.portal.kernel.exception.SystemException {
052 getService().deleteMembershipRequests(groupId, statusId);
053 }
054
055 public static com.liferay.portal.model.MembershipRequest getMembershipRequest(
056 long membershipRequestId)
057 throws com.liferay.portal.kernel.exception.PortalException,
058 com.liferay.portal.kernel.exception.SystemException {
059 return getService().getMembershipRequest(membershipRequestId);
060 }
061
062 public static void updateStatus(long membershipRequestId,
063 java.lang.String reviewComments, int statusId,
064 com.liferay.portal.service.ServiceContext serviceContext)
065 throws com.liferay.portal.kernel.exception.PortalException,
066 com.liferay.portal.kernel.exception.SystemException {
067 getService()
068 .updateStatus(membershipRequestId, reviewComments, statusId,
069 serviceContext);
070 }
071
072 public static MembershipRequestService getService() {
073 if (_service == null) {
074 _service = (MembershipRequestService)PortalBeanLocatorUtil.locate(MembershipRequestService.class.getName());
075
076 ReferenceRegistry.registerReference(MembershipRequestServiceUtil.class,
077 "_service");
078 MethodCache.remove(MembershipRequestService.class);
079 }
080
081 return _service;
082 }
083
084 public void setService(MembershipRequestService service) {
085 MethodCache.remove(MembershipRequestService.class);
086
087 _service = service;
088
089 ReferenceRegistry.registerReference(MembershipRequestServiceUtil.class,
090 "_service");
091 MethodCache.remove(MembershipRequestService.class);
092 }
093
094 private static MembershipRequestService _service;
095 }