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.ReferenceRegistry;
020
021
024 public class CyrusServiceUtil {
025
026 public static void addUser(
027 long userId, String emailAddress, String password)
028 throws SystemException {
029
030 getService().addUser(userId, emailAddress, password);
031 }
032
033 public static void deleteEmailAddress(long companyId, long userId)
034 throws SystemException {
035
036 getService().deleteEmailAddress(companyId, userId);
037 }
038
039 public static void deleteUser(long userId) throws SystemException {
040 getService().deleteUser(userId);
041 }
042
043 public static CyrusService getService() {
044 if (_service == null) {
045 _service = (CyrusService)PortalBeanLocatorUtil.locate(
046 CyrusService.class.getName());
047
048 ReferenceRegistry.registerReference(
049 CyrusServiceUtil.class, "_service");
050 }
051
052 return _service;
053 }
054
055 public static void updateEmailAddress(
056 long companyId, long userId, String emailAddress)
057 throws SystemException {
058
059 getService().updateEmailAddress(companyId, userId, emailAddress);
060 }
061
062 public static void updatePassword(
063 long companyId, long userId, String password)
064 throws SystemException {
065
066 getService().updatePassword(companyId, userId, password);
067 }
068
069 public void setService(CyrusService service) {
070 _service = service;
071
072 ReferenceRegistry.registerReference(CyrusServiceUtil.class, "_service");
073 }
074
075 private static CyrusService _service;
076
077 }