001
014
015 package com.liferay.mail.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.util.MethodCache;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
025 public class CyrusServiceUtil {
026
027 public static void addUser(
028 long userId, String emailAddress, String password)
029 throws SystemException {
030
031 getService().addUser(userId, emailAddress, password);
032 }
033
034 public static void deleteEmailAddress(long companyId, long userId)
035 throws SystemException {
036
037 getService().deleteEmailAddress(companyId, userId);
038 }
039
040 public static void deleteUser(long userId) throws SystemException {
041 getService().deleteUser(userId);
042 }
043
044 public static CyrusService getService() {
045 if (_service == null) {
046 _service = (CyrusService)PortalBeanLocatorUtil.locate(
047 CyrusService.class.getName());
048
049 ReferenceRegistry.registerReference(
050 CyrusServiceUtil.class, "_service");
051
052 MethodCache.remove(CyrusService.class);
053 }
054
055 return _service;
056 }
057
058 public static void updateEmailAddress(
059 long companyId, long userId, String emailAddress)
060 throws SystemException {
061
062 getService().updateEmailAddress(companyId, userId, emailAddress);
063 }
064
065 public static void updatePassword(
066 long companyId, long userId, String password)
067 throws SystemException {
068
069 getService().updatePassword(companyId, userId, password);
070 }
071
072 public void setService(CyrusService service) {
073 _service = service;
074
075 ReferenceRegistry.registerReference(CyrusServiceUtil.class, "_service");
076
077 MethodCache.remove(CyrusService.class);
078 }
079
080 private static CyrusService _service;
081
082 }