2 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 package com.liferay.mail;
17 import com.liferay.portal.kernel.exception.PortalException;
22 public class MailException extends PortalException {
24 public static final int ACCOUNT_ALREADY_EXISTS = 1;
26 public static final int ACCOUNT_CONNECTIONS_FAILED = 2;
28 public static final int ACCOUNT_INCOMING_CONNECTION_FAILED = 3;
30 public static final int ACCOUNT_OUTGOING_CONNECTION_FAILED = 4;
32 public static final int FOLDER_ALREADY_EXISTS = 5;
34 public static final int FOLDER_CREATE_FAILED = 6;
36 public static final int FOLDER_DELETE_FAILED = 7;
38 public static final int FOLDER_DOES_NOT_EXIST = 8;
40 public static final int FOLDER_INVALID_DESTINATION = 9;
42 public static final int FOLDER_PAGE_DOES_NOT_EXIST = 10;
44 public static final int FOLDER_RENAME_FAILED = 11;
46 public static final int FOLDER_REQUIRED = 12;
48 public static final int MESSAGE_HAS_NO_RECIPIENTS = 13;
50 public static final int MESSAGE_INVALID_ADDRESS = 14;
52 public static final int MESSAGE_INVALID_FLAG = 15;
54 public static final int MESSAGE_NOT_FOUND_ON_SERVER = 16;
56 public static final int MESSAGE_NOT_SELECTED = 17;
58 public MailException() {
62 public MailException(int type) {
66 public MailException(int type, String value) {
71 public MailException(int type, Throwable cause) {
77 public MailException(int type, Throwable cause, String value) {
84 public MailException(String msg) {
88 public MailException(String msg, Throwable cause) {
92 public MailException(Throwable cause) {
96 public int getType() {
100 public String getValue() {
105 private String _value;