package haipham.webnntp.ejb.message;

import java.rmi.RemoteException;
import javax.ejb.EJBObject;
import java.util.*;
import haipham.webnntp.ejb.folder.Folder;

/** Remote interface for MessageBean */
public interface Message extends EJBObject{
    public final static int NEW     = 0;
    public final static int OLD     = 1;
    public final static int READ    = 2;

    //public Object clone(){} throws RemoteException;

    public Folder getFolder() throws RemoteException;
    public String getSubject() throws RemoteException;
    public String getFrom() throws RemoteException;
    public String getMessageId() throws RemoteException;
    public String getReferences() throws RemoteException;
    public String getPlainBody() throws RemoteException;
    public Date getDate() throws RemoteException;
    public int getStatus() throws RemoteException;
    public String getHeader(String key) throws RemoteException;

    public void setFolder(Folder folder) throws RemoteException;
    public void setSubject(String subject) throws RemoteException;
    public void setFrom(String from) throws RemoteException;
    public void setMessageId(String id) throws RemoteException;
    public void setReferences(String ref) throws RemoteException;
    public void setPlainBody(String body) throws RemoteException;
    public void setDate(Date date) throws RemoteException;
    public void setStatus(int status) throws RemoteException;
    public void setHeader(String key, String value) throws RemoteException;
}
