1 32 33 package scioworks.imap.presentation; 34 35 import javax.mail.*; 36 37 public class ImapWebSessionData implements java.io.Serializable { 38 39 public static final String SESSION_KEY = "ImapWebSessionData"; 40 41 private URLName imapURL = null; 42 private Session imapSession = null; 43 private Store imapStore = null; 44 String userMessage = null; 45 46 public ImapWebSessionData() { 47 } 48 49 public ImapWebSessionData(URLName url) { 50 this.imapURL = url; 51 } 52 53 public URLName getImapURL() { 54 return imapURL; 55 } 56 57 public void setImapURL(URLName url) { 58 this.imapURL = url; 59 } 60 61 public void setImapSession(Session session){ 62 this.imapSession = session; 63 } 64 65 public Session getImapSession(){ 66 return imapSession; 67 } 68 69 public void setImapStore(Store store){ 70 this.imapStore = store; 71 } 72 73 public Store getImapStore(){ 74 return imapStore; 75 } 76 77 public void setUserMessage(String msg) { 78 this.userMessage = msg; 79 } 80 81 public String getUserMessage() { 82 return userMessage; 83 } 84 85 89 public String getAndClearUserMessage() { 90 String msg = this.userMessage; 91 this.userMessage = null; 92 return msg; 93 } 94 95 public boolean isValidSession() { 96 97 if (imapSession == null) { 98 return false; 99 } else { 100 return true; 101 } 102 } 103 } | Popular Tags |