⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 castorpreferences.java

📁 java windows mda and reveus
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*** * jwma Java WebMail * Copyright (c) 2000-2003 jwma team * * jwma is free software; you can distribute and use this source * under the terms of the BSD-style license received along with * the distribution. ***/package dtw.webmail.plugin.std;import dtw.webmail.JwmaKernel;import dtw.webmail.model.JwmaMailIdentity;import dtw.webmail.model.JwmaMailIdentityImpl;import dtw.webmail.model.JwmaPreferencesImpl;import dtw.webmail.util.AbstractIdentifiable;import dtw.webmail.util.AssociatedAbstractIdentifiable;import dtw.webmail.util.Associator;import net.wimpi.text.Processor;import org.apache.log4j.Logger;import org.exolab.castor.jdo.Database;import org.exolab.castor.jdo.PersistenceException;import org.exolab.castor.jdo.TimeStampable;import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.*;/** * Class implementing a specialized <tt>JwmaPreferencesImpl</tt> * for being persisted with the Castor Plugins. * * @author Dieter Wimberger * @version 0.9.7 07/02/2003 */public class CastorPreferences    extends AbstractIdentifiable    implements JwmaPreferencesImpl, Associator, TimeStampable {  //logging  private static Logger log = Logger.getLogger(CastorPreferences.class);  //instance attributes  private String m_UserIdentity;  private String m_Firstname = "firstname";  private String m_Lastname = "lastname";  private String m_LastLogin = "Never.";  private String m_Signature = "";  private String m_QuoteChar = ">";  private boolean m_AutoQuote = false;  private boolean m_AutoSign = true;  //Folders  private String m_RootFolder = "";  private String m_Inbox = "Inbox";  private String m_SentMailArchive = "sent-mail";  private String m_ReadMailArchive = "read-mail";  private String m_TrashFolder = "trash";  private String m_DraftFolder = "draft";  //Auto features  private boolean m_AutoArchiveSent = false;  private boolean m_AutoMoveRead = false;  private boolean m_AutoEmpty = false;  private Processor m_MessageProcessor;  private Locale m_Locale = new Locale("en", "");  private String m_ContactDatabase;  private SimpleDateFormat m_DateFormat =      (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.SHORT, m_Locale);  private String m_DefaultMailIdentity;  private List m_MailIdentities;  private boolean m_Expert = false;  private boolean m_DisplayingInlined;  private String m_Style = "";  public int m_MessageSortCriteria;  private List m_RemovedAssociations;  private boolean m_Update = false;  private long m_Timestamp = TimeStampable.NO_TIMESTAMP;  /**   * Constructs a JwmaPreferences instance.   */  public CastorPreferences() {    super();    //ensure default processor to be set    setMessageProcessorName("");    m_MailIdentities =        Collections.synchronizedList(new ArrayList(5));    m_RemovedAssociations =        Collections.synchronizedList(new ArrayList(5));  }//constructor  public String getUserIdentity() {    return m_UserIdentity;  }//getUserIdentity  /**   * Sets the identity of this <tt>JwmaPreferences</tt>.   * <p>   * <em>Note</em>:<br>   * The format of the string has to be   * <tt>&lt;username&gt;@&lt;postofficehost&gt;</tt>.   * <br>   *   * @param id the identity to be set as <tt>String</tt>.   */  public void setUserIdentity(String userid) {    m_UserIdentity = userid;  }//setUserIdentity  public String getFirstname() {    return m_Firstname;  }//getFirstname  /**   * Sets the firstname of the owner of this   * <tt>JwmaPreferences</tt>.   *   * @param firstname the owner's firstname.   */  public void setFirstname(String firstname) {    m_Firstname = firstname;  }//setFirstname  public String getLastname() {    return m_Lastname;  }//getLastname  /**   * Sets the lastname of the owner of this   * <tt>JwmaPreferences</tt>.   *   * @param lastname the owner's lastname.   */  public void setLastname(String lastname) {    m_Lastname = lastname;  }//setLastname  public String getLastLogin() {    return m_LastLogin;  }//getLastLogin  /**   * Sets the the user's last login date and originating host.   *   * @param address the internet address of the last login.   */  public void setLastLogin(String lastlogin) {    m_LastLogin = lastlogin;  }//setLastLogin  public String getQuoteChar() {    return m_QuoteChar;  }//getQuoteChars  /**   * Sets the quoting character.   * <p>   * <i><b>Note</b>:   * only the first character is taken from the String.</i>   *   * @return the quote character as String.   */  public void setQuoteChar(String qc) {    m_QuoteChar = "" + qc.charAt(0);  }//setQuoteChars  public boolean isAutoQuote() {    return m_AutoQuote;  }//isAutoQuote  /**   * Sets the flag that controls wheter messages should be automatically   * quoted on reply.   *   * @param doquote true if messages being replied to  should be automatically   *        quoted, false otherwise.   */  public void setAutoQuote(boolean doquote) {    m_AutoQuote = doquote;  }//setAutoQuote  public String getRootFolder() {    return m_RootFolder;  }//getRootFolder  /**   * Sets the path of the mail root folder.   *   * @param path the path of root mail folder as   *        <tt>String</tt>.   */  public void setRootFolder(String path) {    m_RootFolder = path;  }//setRootFolder  public String getSentMailArchive() {    return m_SentMailArchive;  }//getSentMailArchive  /**   * Sets the path of the sent-mail-archive.   *   * @param path the path of the sent-mail-archive as <tt>String</tt>.   */  public void setSentMailArchive(String path) {    m_SentMailArchive = path;  }//setSentMailArchive  public String getReadMailArchive() {    return m_ReadMailArchive;  }//getReadMailArchive  /**   * Sets the path of the read-mail-archive.   *   * @param path the path of the read-mail-archive as <tt>String</tt>.   */  public void setReadMailArchive(String path) {    m_ReadMailArchive = path;  }//setReadMailArchive  public String getTrashFolder() {    return m_TrashFolder;  }//getTrashFolder  /**   * Sets the path of the trashfolder.   *   * @param path the path of the trashfolder as <tt>String</tt>.   */  public void setTrashFolder(String path) {    m_TrashFolder = path;  }//setTrashFolder  public String getDraftFolder() {    return m_DraftFolder;  }//getDraftFolder  /**   * Sets the path of the draft folder.   *   * @param path the path of the draft folder as <tt>String</tt>.   */  public void setDraftFolder(String path) {    m_DraftFolder = path;  }//setDraftFolder  /**   * Sets the flag that controls wheter messages should be automatically   * archived when sent.   *   * @param doarchive true if messages being sent should be automatically   *        archived, false otherwise.   */  public void setAutoArchiveSent(boolean doarchive) {    m_AutoArchiveSent = doarchive;  }//setAutoArchiveSent  public boolean isAutoArchiveSent() {    return m_AutoArchiveSent;  }//isAutoArchiveSent  /**   * Sets the flag that controls wheter messages should be automatically   * moved when read.   *   * @param domoveread true if read messages should be automatically   *        moved, false otherwise.   */  public void setAutoMoveRead(boolean domoveread) {    m_AutoMoveRead = domoveread;  }//setAutoMoveRead  public boolean isAutoMoveRead() {    return m_AutoMoveRead;  }//isAutoMoveRead  public boolean isAutoEmpty() {    return m_AutoEmpty;  }//isAutoEmptying  /**   * Sets the flag that controls wheter messages should be automatically   * deleted from the trash on logout.   *   * @param b true if messages in trash should be automatically   *        deleted on logout, false otherwise.   */  public void setAutoEmpty(boolean b) {    m_AutoEmpty = b;  }//setAutoEmpty  public String getLanguage() {    return m_Locale.getLanguage();  }//getLanguage

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -