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.response;
017    
018    import java.util.Date;
019    
020    import javax.mail.Flags;
021    
022    import com.hs.mail.imap.processor.fetch.Content;
023    import com.hs.mail.imap.processor.fetch.Envelope;
024    import com.hs.mail.imap.processor.fetch.MimeDescriptor;
025    
026    /**
027     * 
028     * @author Won Chul Doh
029     * @since Mar 8, 2010
030     *
031     */
032    public class FetchResponse extends AbstractImapResponse {
033            
034            private long msgnum;
035            private Long uid;
036            /**
037             * The [RFC-2822] size of the message.
038             */
039            private Long size;
040            /**
041             * The flags that are set for this message.
042             */
043            private Flags flags;
044            /**
045             * The internal date of this message.
046             */
047            private Date internalDate;
048            private Envelope envelope;
049            private MimeDescriptor body;
050            private MimeDescriptor bodyStructure;
051            private Content content;
052            
053            public FetchResponse(long msgnum) {
054                    this.msgnum = msgnum;
055            }
056            
057            public long getMessageNumber() {
058                    return msgnum;
059            }
060    
061            public Long getUid() {
062                    return uid;
063            }
064            
065            public void setUid(Long uid) {
066                    this.uid = uid;
067            }
068            
069            public Flags getFlags() {
070                    return flags;
071            }
072            
073            public void setFlags(Flags flags) {
074                    this.flags = flags;
075            }
076    
077            public Long getSize() {
078                    return size;
079            }
080            
081            public void setSize(Long size) {
082                    this.size = size;
083            }
084    
085            public Date getInternalDate() {
086                    return internalDate;
087            }
088    
089            public void setInternalDate(Date internalDate) {
090                    this.internalDate = internalDate;
091            }
092    
093            public Envelope getEnvelope() {
094                    return envelope;
095            }
096    
097            public void setEnvelope(Envelope envelope) {
098                    this.envelope = envelope;
099            }
100    
101            public void setBody(MimeDescriptor body) {
102                    this.body = body;
103            }
104    
105            public MimeDescriptor getBody() {
106                    return body;
107            }
108    
109            public void setBodyStructure(MimeDescriptor bodyStructure) {
110                    this.bodyStructure = bodyStructure;
111            }
112    
113            public MimeDescriptor getBodyStructure() {
114                    return bodyStructure;
115            }
116    
117            public Content getContent() {
118                    return content;
119            }
120    
121            public void setContent(Content content) {
122                    this.content = content;
123            }
124    
125    }