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 com.hs.mail.imap.mailbox.Mailbox;
019    import com.hs.mail.imap.message.request.Status;
020    
021    /**
022     * 
023     * @author Won Chul Doh
024     * @since Mar 17, 2010
025     *
026     */
027    public class StatusResponse extends AbstractImapResponse {
028    
029            private Status status;
030            private Mailbox mailbox;
031            private int messageCount;
032            private int recentMessageCount;
033            private int unseenMessageCount;
034    
035            public StatusResponse(Status status, Mailbox mailbox) {
036                    this.status = status;
037                    this.mailbox = mailbox;
038            }
039    
040            public Status getStatusAtts() {
041                    return status;
042            }
043    
044            public String getMailboxName() {
045                    return mailbox.getName();
046            }
047    
048            public int getMessageCount() {
049                    return messageCount;
050            }
051    
052            public void setMessageCount(int count) {
053                    this.messageCount = count;
054            }
055    
056            public int getRecentMessageCount() {
057                    return recentMessageCount;
058            }
059    
060            public void setRecentMessageCount(int count) {
061                    this.recentMessageCount = count;
062            }
063    
064            public long getNextUid() {
065                    return mailbox.getNextUID();
066            }
067    
068            public long getUidValidity() {
069                    return mailbox.getUidValidity();
070            }
071    
072            public int getUnseenMessageCount() {
073                    return unseenMessageCount;
074            }
075    
076            public void setUnseenMessageCount(int count) {
077                    this.unseenMessageCount = count;
078            }
079    
080    }