001 /* 002 * Copyright 2010 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package com.hs.mail.imap.message; 017 018 import java.util.Date; 019 020 import javax.mail.FetchProfile; 021 import javax.mail.Flags; 022 023 /** 024 * 025 * @author Won Chul Doh 026 * @since Jan 29, 2010 027 * 028 */ 029 public class FetchData { 030 031 private long messageID; 032 private long physMessageID; 033 private long size; 034 private Flags flags; 035 private Date internalDate; 036 037 public FetchData() { 038 super(); 039 } 040 041 public long getMessageID() { 042 return messageID; 043 } 044 045 public void setMessageID(long messageID) { 046 this.messageID = messageID; 047 } 048 049 public long getPhysMessageID() { 050 return physMessageID; 051 } 052 053 public void setPhysMessageID(long physMessageID) { 054 this.physMessageID = physMessageID; 055 } 056 057 public long getSize() { 058 return size; 059 } 060 061 public void setSize(long size) { 062 this.size = size; 063 } 064 065 public Flags getFlags() { 066 return flags; 067 } 068 069 public void setFlags(Flags flags) { 070 this.flags = flags; 071 } 072 073 public Date getInternalDate() { 074 return internalDate; 075 } 076 077 public void setInternalDate(Date internalDate) { 078 this.internalDate = internalDate; 079 } 080 081 public static class FetchProfileItem extends FetchProfile.Item { 082 083 protected FetchProfileItem(String name) { 084 super(name); 085 } 086 087 public static final FetchProfileItem HEADERS 088 = new FetchProfileItem("HEADERS"); 089 090 public static final FetchProfileItem SIZE 091 = new FetchProfileItem("SIZE"); 092 093 public static final FetchProfileItem INTERNALDATE 094 = new FetchProfileItem("INTERNALDATE"); 095 096 public static final FetchProfileItem UID 097 = new FetchProfileItem("UID"); 098 099 public static final FetchProfileItem BODY 100 = new FetchProfileItem("BODY"); 101 102 public static final FetchProfileItem BODYSTRUCTURE 103 = new FetchProfileItem("BODYSTRUCTURE"); 104 105 } 106 107 }