001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.mail.service;
016    
017    import com.liferay.mail.model.Filter;
018    import com.liferay.portal.kernel.exception.PortalException;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.mail.MailMessage;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    import java.util.List;
024    
025    import javax.mail.Session;
026    
027    /**
028     * @author Brian Wing Shun Chan
029     */
030    @Transactional(rollbackFor = {PortalException.class, SystemException.class})
031    public interface MailService {
032    
033            public void addForward(
034                    long companyId, long userId, List<Filter> filters,
035                    List<String> emailAddresses, boolean leaveCopy);
036    
037            public void addUser(
038                    long companyId, long userId, String password, String firstName,
039                    String middleName, String lastName, String emailAddress);
040    
041            public void addVacationMessage(
042                    long companyId, long userId, String emailAddress,
043                    String vacationMessage);
044    
045            public void clearSession();
046    
047            public void deleteEmailAddress(long companyId, long userId);
048    
049            public void deleteUser(long companyId, long userId);
050    
051            public Session getSession() throws SystemException;
052    
053            public void sendEmail(MailMessage mailMessage);
054    
055            public void updateBlocked(
056                    long companyId, long userId, List<String> blocked);
057    
058            public void updateEmailAddress(
059                    long companyId, long userId, String emailAddress);
060    
061            public void updatePassword(long companyId, long userId, String password);
062    
063    }