1 /*
2 * Copyright (c) 2005-2007 Creative Sphere Limited.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 *
10 * Creative Sphere - initial API and implementation
11 *
12 */
13 package org.abstracthorizon.mercury.maildir.util;
14
15 import javax.mail.Folder;
16 import javax.mail.MessagingException;
17 import javax.mail.Session;
18 import javax.mail.internet.MimeMessage;
19
20 /**
21 * This class extends mime message from javax.mail exposing <code>setMessageNumber</code> method.
22 */
23 public class MessageBase extends MimeMessage {
24
25 /**
26 * Constructor
27 * @param folder folder
28 * @param msgnum message number
29 * @throws MessagingException
30 */
31 protected MessageBase(Folder folder, int msgnum) throws MessagingException {
32 super(folder, msgnum);
33 }
34
35 /**
36 * Constructor
37 * @param session session
38 * @throws MessagingException
39 */
40 public MessageBase(Session session) throws MessagingException {
41 super(session);
42 }
43
44 /**
45 * Constructor
46 * @param message message
47 * @throws MessagingException
48 */
49 public MessageBase(MimeMessage message) throws MessagingException {
50 super(message);
51 }
52
53 /**
54 * Sets message number
55 * @param num message number
56 */
57 public void setMessageNumber(int num) {
58 super.setMessageNumber(num);
59 }
60 }