james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r515230 [1/4] - in /james/server/sandbox/seda-imap/src: java/org/apache/james/imapserver/ java/org/apache/james/imapserver/commands/ java/org/apache/james/imapserver/decode/ java/org/apache/james/imapserver/encode/ java/org/apache/james/ima...
Date Tue, 06 Mar 2007 17:59:12 GMT
Author: rdonkin
Date: Tue Mar  6 09:59:02 2007
New Revision: 515230

URL: http://svn.apache.org/viewvc?view=rev&rev=515230
Log:
Separate parsing from processing.

Added:
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandFactory.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StandardImapCommandFactory.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractImapCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractImapCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractUidCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractUidCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AppendCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AuthenticateCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/CapabilityCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/CheckCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CheckCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/CloseCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/CopyCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/CreateCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/DelegatingImapCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/DeleteCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/ExamineCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExamineCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/ExpungeCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/FetchCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/ImapCommandParser.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/ImapCommandParserFactory.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandParserFactory.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/InitialisableCommandFactory.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/ListCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/LoginCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/LogoutCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/LsubCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/MessagingImapCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/NoopCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/NoopCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/RenameCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/SearchCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/SelectCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/StandardImapDecoder.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StandardImapDecoder.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/StatusCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/StoreCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/SubscribeCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/UidCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UidCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/UnsubscribeCommandParser.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/AbstractCommandResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractCommandResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/AbstractImapCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractImapCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/AppendCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/AuthenticateCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/BadResponseMessage.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/BadResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/BaseImapMessageFactory.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/BodyFetchElement.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/BodyFetchElement.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CapabilityCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CapabilityReponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityReponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CloseCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CloseResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CommandCompleteResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CommandCompleteResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CommandFailedResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CommandFailedResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CompleteCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CompleteCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CopyCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/CreateCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/DeleteCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/ErrorResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ErrorResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/ExpungeCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/FetchCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/FetchRequest.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchRequest.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/FetchResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/FixedLengthInputStream.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FixedLengthInputStream.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/IdRange.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/IdRange.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/IdSet.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/IdSet.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/ImapCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/ImapMessageFactory.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/ImapResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/ListCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/ListResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/LoginCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/LogoutCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/LogoutResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/LsubListCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubListCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/MsnRange.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/MsnRange.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/RenameCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/SearchImapCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/SearchResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/SelectCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/SelectResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/StatusCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/StatusDataItems.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusDataItems.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/StatusResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/StoreCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/StoreDirective.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreDirective.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/StoreResponseMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/SubscribeCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/message/UnsubscribeCommandMessage.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommandMessage.java
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/message/
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/message/BadResponseMessageTest.java
      - copied, changed from r514102, james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/commands/BadResponseMessageTest.java
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/message/CommandFailedResponseMessageTest.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/commands/CommandFailedResponseMessageTest.java
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/message/ErrorResponseMessageTest.java
      - copied, changed from r514100, james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/commands/ErrorResponseMessageTest.java
Removed:
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractCommandResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractImapCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractImapCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractUidCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/BadResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/BodyFetchElement.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityReponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CheckCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CommandCompleteResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CommandFailedResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CompleteCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ErrorResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExamineCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchRequest.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FixedLengthInputStream.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/IdRange.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/IdSet.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandParserFactory.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubListCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/MsnRange.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/NoopCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchImapCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StandardImapDecoder.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusDataItems.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreDirective.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreResponseMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UidCommandParser.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommandMessage.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommandParser.java
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/commands/BadResponseMessageTest.java
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/commands/CommandFailedResponseMessageTest.java
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/commands/ErrorResponseMessageTest.java
Modified:
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapConstants.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapDecoder.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapRequestHandler.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CheckCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExamineCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/NoopCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectedStateCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UidCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommand.java
    james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/encode/RecordingImapResponseWriter.java
    james/server/sandbox/seda-imap/src/test/org/apache/james/imapserver/commands/MockCommand.java

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapConstants.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapConstants.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapConstants.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapConstants.java Tue Mar  6 09:59:02 2007
@@ -40,4 +40,35 @@
     final String NAMESPACE_PREFIX = String.valueOf( NAMESPACE_PREFIX_CHAR );
 
     String INBOX_NAME = "INBOX";
+    public static final String STATUS_UNSEEN = "UNSEEN";
+    public static final String STATUS_UIDVALIDITY = "UIDVALIDITY";
+    public static final String STATUS_UIDNEXT = "UIDNEXT";
+    public static final String STATUS_RECENT = "RECENT";
+    public static final String STATUS_MESSAGES = "MESSAGES";
+    public static final String UNSUBSCRIBE_COMMAND_NAME = "UNSUBSCRIBE";
+    public static final String UID_COMMAND_NAME = "UID";
+    public static final String SUBSCRIBE_COMMAND_NAME = "SUBSCRIBE";
+    public static final String STORE_COMMAND_NAME = "STORE";
+    public static final String STATUS_COMMAND_NAME = "STATUS";
+    public static final String SELECT_COMMAND_NAME = "SELECT";
+    public static final String SEARCH_COMMAND_NAME = "SEARCH";
+    public static final String RENAME_COMMAND_NAME = "RENAME";
+    public static final String NOOP_COMMAND_NAME = "NOOP";
+    public static final String LSUB_COMMAND_NAME = "LSUB";
+    public static final String LOGOUT_COMMAND_NAME = "LOGOUT";
+    public static final String LOGIN_COMMAND_NAME = "LOGIN";
+    public static final String LIST_COMMAND_NAME = "LIST";
+    public static final String FETCH_COMMAND_NAME = "FETCH";
+    public static final String EXPUNGE_COMMAND_NAME = "EXPUNGE";
+    public static final String EXAMINE_COMMAND_NAME = "EXAMINE";
+    public static final String DELETE_COMMAND_NAME = "DELETE";
+    public static final String CREATE_COMMAND_NAME = "CREATE";
+    public static final String COPY_COMMAND_NAME = "COPY";
+    public static final String CLOSE_COMMAND_NAME = "CLOSE";
+    public static final String CHECK_COMMAND_NAME = "CHECK";
+    public static final String CAPABILITY_COMMAND_NAME = "CAPABILITY";
+    public static final String AUTHENTICATE_COMMAND_NAME = "AUTHENTICATE";
+    public static final String APPEND_COMMAND_NAME = "APPEND";
+    public static final String CAPABILITY_RESPONSE = CAPABILITY_COMMAND_NAME + SP + VERSION + SP + CAPABILITIES;
+    
 }

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapDecoder.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapDecoder.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapDecoder.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapDecoder.java Tue Mar  6 09:59:02 2007
@@ -18,7 +18,7 @@
  ****************************************************************/ 
 package org.apache.james.imapserver;
 
-import org.apache.james.imapserver.commands.ImapCommandMessage;
+import org.apache.james.imapserver.message.ImapCommandMessage;
 
 public interface ImapDecoder {
     public ImapCommandMessage decode(final ImapRequestLineReader request);

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapRequestHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapRequestHandler.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapRequestHandler.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/ImapRequestHandler.java Tue Mar  6 09:59:02 2007
@@ -24,10 +24,10 @@
 
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.logger.Logger;
-import org.apache.james.imapserver.commands.ImapCommandMessage;
-import org.apache.james.imapserver.commands.ImapResponseMessage;
-import org.apache.james.imapserver.commands.StandardImapDecoder;
+import org.apache.james.imapserver.decode.StandardImapDecoder;
 import org.apache.james.imapserver.encode.OutputStreamImapResponseWriter;
+import org.apache.james.imapserver.message.ImapCommandMessage;
+import org.apache.james.imapserver.message.ImapResponseMessage;
 
 /**
  * @version $Revision: 109034 $

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 
@@ -29,13 +31,12 @@
  */
 class AppendCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "APPEND";
     public static final String ARGS = "<mailbox> [<flag_list>] [<date_time>] literal";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.APPEND_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AuthenticateCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the AUTHENTICATE imap command.
@@ -27,13 +29,12 @@
  */
 class AuthenticateCommand extends NonAuthenticatedStateCommand
 {
-    public static final String NAME = "AUTHENTICATE";
     public static final String ARGS = "<auth_type> *(CRLF base64)";
     
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.AUTHENTICATE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CapabilityCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the CAPABILITY imap command.
@@ -27,15 +29,12 @@
  */
 class CapabilityCommand extends CommandTemplate
 {
-    public static final String NAME = "CAPABILITY";
     public static final String ARGS = null;
 
-    public static final String CAPABILITY_RESPONSE = NAME + SP + VERSION + SP + CAPABILITIES;
-
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.CAPABILITY_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CheckCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CheckCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CheckCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CheckCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processing for the CHECK imap command.
@@ -27,13 +29,12 @@
  */
 class CheckCommand extends SelectedStateCommand
 {
-    public static final String NAME = "CHECK";
     public static final String ARGS = null;
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.CHECK_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CloseCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the CHECK imap command.
@@ -27,13 +29,12 @@
  */
 class CloseCommand extends SelectedStateCommand
 {
-    public static final String NAME = "CLOSE";
     public static final String ARGS = null;
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.CLOSE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CopyCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the COPY imap command.
@@ -27,13 +29,12 @@
  */
 class CopyCommand extends SelectedStateCommand
 {
-    public static final String NAME = "COPY";
     public static final String ARGS = "<message-set> <mailbox>";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.COPY_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/CreateCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the CREATE imap command.
@@ -27,13 +29,12 @@
  */
 class CreateCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "CREATE";
     public static final String ARGS = "<mailbox>";
     
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.CREATE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/DeleteCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the DELETE imap command.
@@ -27,13 +29,12 @@
  */
 class DeleteCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "DELETE";
     public static final String ARGS = "<mailbox>";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.DELETE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExamineCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExamineCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExamineCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExamineCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 /**
  * TODO: sort out inheritance heirarchy.
  * TODO: this should not inherit from select
@@ -26,14 +28,12 @@
  */
 class ExamineCommand extends SelectCommand
 {
-    public static final String NAME = "EXAMINE";
-
     public ExamineCommand() {
         super();
     }
     
     public String getName()
     {
-        return NAME;
+        return ImapConstants.EXAMINE_COMMAND_NAME;
     }
 }

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the EXPUNGE imap command.
@@ -27,13 +29,12 @@
  */
 class ExpungeCommand extends SelectedStateCommand
 {
-    public static final String NAME = "EXPUNGE";
     public static final String ARGS = null;
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.EXPUNGE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/FetchCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 
@@ -30,13 +32,12 @@
  */
 class FetchCommand extends SelectedStateCommand 
 {
-    public static final String NAME = "FETCH";
     public static final String ARGS = "<message-set> <fetch-profile>";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.FETCH_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Added: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandFactory.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandFactory.java?view=auto&rev=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandFactory.java (added)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ImapCommandFactory.java Tue Mar  6 09:59:02 2007
@@ -0,0 +1,71 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/ 
+package org.apache.james.imapserver.commands;
+
+public interface ImapCommandFactory {
+
+    public abstract ImapCommand getAppend();
+
+    public abstract ImapCommand getAuthenticate();
+
+    public abstract ImapCommand getCapability();
+
+    public abstract ImapCommand getCheck();
+
+    public abstract ImapCommand getClose();
+
+    public abstract ImapCommand getCopy();
+
+    public abstract ImapCommand getCreate();
+
+    public abstract ImapCommand getDelete();
+
+    public abstract ImapCommand getExamine();
+
+    public abstract ImapCommand getExpunge();
+
+    public abstract ImapCommand getFetch();
+
+    public abstract ImapCommand getList();
+
+    public abstract ImapCommand getLogin();
+
+    public abstract ImapCommand getLogout();
+
+    public abstract ImapCommand getLsub();
+
+    public abstract ImapCommand getNoop();
+
+    public abstract ImapCommand getRename();
+
+    public abstract ImapCommand getSearch();
+
+    public abstract ImapCommand getSelect();
+
+    public abstract ImapCommand getStatus();
+
+    public abstract ImapCommand getStore();
+
+    public abstract ImapCommand getSubscribe();
+
+    public abstract ImapCommand getUid();
+
+    public abstract ImapCommand getUnsubscribe();
+
+}

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/ListCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 /**
@@ -28,13 +30,12 @@
  */
 class ListCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "LIST";
     public static final String ARGS = "<reference-name> <mailbox-name-with-wildcards>";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.LIST_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LoginCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 /**
@@ -28,13 +30,12 @@
  */
 class LoginCommand extends NonAuthenticatedStateCommand
 {
-    public static final String NAME = "LOGIN";
     public static final String ARGS = "<userid> <password>";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.LOGIN_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LogoutCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the LOGOUT imap command.
@@ -27,14 +29,12 @@
  */
 class LogoutCommand extends CommandTemplate
 {
-    public static final String NAME = "LOGOUT";
     public static final String ARGS = null;
-    public static final String BYE_MESSAGE = VERSION + SP + "Server logging out";
     
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.LOGOUT_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/LsubCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 /**
@@ -26,11 +28,9 @@
  */
 class LsubCommand extends ListCommand
 {
-    public static final String NAME = "LSUB";
-
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.LSUB_COMMAND_NAME;
     }
 }

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/NoopCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/NoopCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/NoopCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/NoopCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the NOOP imap command.
@@ -27,13 +29,12 @@
  */
 class NoopCommand extends CommandTemplate
 {
-    public static final String NAME = "NOOP";
     public static final String ARGS = null;
     
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.NOOP_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/RenameCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the RENAME imap command.
@@ -27,13 +29,12 @@
  */
 class RenameCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "RENAME";
     public static final String ARGS = "existing-mailbox-name SPACE new-mailbox-name";
     
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.RENAME_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SearchCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 /**
@@ -28,13 +30,12 @@
  */
 class SearchCommand extends SelectedStateCommand 
 {
-    public static final String NAME = "SEARCH";
     public static final String ARGS = "<search term>";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.SEARCH_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 /**
@@ -28,13 +30,12 @@
  */
 class SelectCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "SELECT";
     public static final String ARGS = "mailbox";
     
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.SELECT_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectedStateCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectedStateCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectedStateCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SelectedStateCommand.java Tue Mar  6 09:59:02 2007
@@ -20,6 +20,7 @@
 package org.apache.james.imapserver.commands;
 
 import org.apache.james.imapserver.ImapSessionState;
+import org.apache.james.imapserver.message.IdRange;
 
 /**
  * A base class for ImapCommands only valid in the SELECTED state.

Added: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StandardImapCommandFactory.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StandardImapCommandFactory.java?view=auto&rev=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StandardImapCommandFactory.java (added)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StandardImapCommandFactory.java Tue Mar  6 09:59:02 2007
@@ -0,0 +1,215 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+package org.apache.james.imapserver.commands;
+
+public class StandardImapCommandFactory implements ImapCommandFactory {
+
+    private final AppendCommand APPEND = new AppendCommand();   
+    private final AuthenticateCommand AUTHENTICATE = new AuthenticateCommand();
+    private final CapabilityCommand CAPABILITY = new CapabilityCommand();
+    private final CheckCommand CHECK = new CheckCommand();
+    private final CloseCommand CLOSE  = new CloseCommand();
+    private final CopyCommand COPY = new CopyCommand();
+    private final CreateCommand CREATE = new CreateCommand();
+    private final DeleteCommand DELETE = new DeleteCommand();
+    private final ExamineCommand EXAMINE = new ExamineCommand();
+    private final ExpungeCommand EXPUNGE = new ExpungeCommand();
+    private final FetchCommand FETCH = new FetchCommand();
+    private final ListCommand LIST = new ListCommand();
+    private final LoginCommand LOGIN = new LoginCommand();
+    private final LogoutCommand LOGOUT = new LogoutCommand();
+    private final LsubCommand LSUB = new LsubCommand();
+    private final NoopCommand NOOP = new NoopCommand();
+    private final RenameCommand RENAME = new RenameCommand();
+    private final SearchCommand SEARCH = new SearchCommand();
+    private final SelectCommand SELECT = new SelectCommand();
+    private final StatusCommand STATUS = new StatusCommand();
+    private final StoreCommand STORE = new StoreCommand();
+    private final SubscribeCommand SUBSCRIBE = new SubscribeCommand();
+    private final UidCommand UID = new UidCommand();
+    private final UnsubscribeCommand UNSUBSCRIBE  = new UnsubscribeCommand();
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getAppend()
+     */
+    public ImapCommand getAppend() {
+        return APPEND;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getAuthenticate()
+     */
+    public ImapCommand getAuthenticate() {
+        return AUTHENTICATE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getCapability()
+     */
+    public ImapCommand getCapability() {
+        return CAPABILITY;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getCheck()
+     */
+    public ImapCommand getCheck() {
+        return CHECK;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getClose()
+     */
+    public ImapCommand getClose() {
+        return CLOSE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getCopy()
+     */
+    public ImapCommand getCopy() {
+        return COPY;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getCreate()
+     */
+    public ImapCommand getCreate() {
+        return CREATE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getDelete()
+     */
+    public ImapCommand getDelete() {
+        return DELETE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getExamine()
+     */
+    public ImapCommand getExamine() {
+        return EXAMINE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getExpunge()
+     */
+    public ImapCommand getExpunge() {
+        return EXPUNGE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getFetch()
+     */
+    public ImapCommand getFetch() {
+        return FETCH;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getList()
+     */
+    public ImapCommand getList() {
+        return LIST;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getLogin()
+     */
+    public ImapCommand getLogin() {
+        return LOGIN;
+    }
+
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getLogout()
+     */
+    public ImapCommand getLogout() {
+        return LOGOUT;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getLsub()
+     */
+    public ImapCommand getLsub() {
+        return LSUB;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getNoop()
+     */
+    public ImapCommand getNoop() {
+        return NOOP;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getRename()
+     */
+    public ImapCommand getRename() {
+        return RENAME;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getSearch()
+     */
+    public ImapCommand getSearch() {
+        return SEARCH;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getSelect()
+     */
+    public ImapCommand getSelect() {
+        return SELECT;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getStatus()
+     */
+    public ImapCommand getStatus() {
+        return STATUS;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getStore()
+     */
+    public ImapCommand getStore() {
+        return STORE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getSubscribe()
+     */
+    public ImapCommand getSubscribe() {
+        return SUBSCRIBE;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getUid()
+     */
+    public ImapCommand getUid() {
+        return UID;
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.commands.ImapCommandFactory#getUnsubscribe()
+     */
+    public ImapCommand getUnsubscribe() {
+        return UNSUBSCRIBE;
+    }
+}

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StatusCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the STATUS imap command.
@@ -27,19 +29,12 @@
  */
 class StatusCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "STATUS";
     public static final String ARGS = "<mailbox> ( <status-data-item>+ )";
 
-    static final String MESSAGES = "MESSAGES";
-    static final String RECENT = "RECENT";
-    static final String UIDNEXT = "UIDNEXT";
-    static final String UIDVALIDITY = "UIDVALIDITY";
-    static final String UNSEEN = "UNSEEN";
-
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.STATUS_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/StoreCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 
 /**
@@ -28,13 +30,12 @@
  */
 class StoreCommand extends SelectedStateCommand 
 {
-    public static final String NAME = "STORE";
     public static final String ARGS = "<Message-set> ['+'|'-']FLAG[.SILENT] <flag-list>";
     
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.STORE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/SubscribeCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the SUBSCRIBE imap command.
@@ -26,12 +28,11 @@
  * @version $Revision: 109034 $
  */
 class SubscribeCommand extends AuthenticatedStateCommand {
-    public static final String NAME = "SUBSCRIBE";
     public static final String ARGS = "<mailbox>";
     
     /** @see ImapCommand#getName */
     public String getName() {
-        return NAME;
+        return ImapConstants.SUBSCRIBE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UidCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UidCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UidCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UidCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the UID imap command.
@@ -27,13 +29,12 @@
  */
 class UidCommand extends SelectedStateCommand
 {
-    public static final String NAME = "UID";
     public static final String ARGS = "<fetch-command>|<store-command>|<copy-command>|<search-command>";
 
     /** @see ImapCommand#getName */
     public String getName()
     {
-        return NAME;
+        return ImapConstants.UID_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Modified: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommand.java?view=diff&rev=515230&r1=515229&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommand.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/UnsubscribeCommand.java Tue Mar  6 09:59:02 2007
@@ -19,6 +19,8 @@
 
 package org.apache.james.imapserver.commands;
 
+import org.apache.james.imapserver.ImapConstants;
+
 
 /**
  * Handles processeing for the UNSUBSCRIBE imap command.
@@ -27,12 +29,11 @@
  */
 class UnsubscribeCommand extends AuthenticatedStateCommand
 {
-    public static final String NAME = "UNSUBSCRIBE";
     public static final String ARGS = "<mailbox>";
 
     /** @see ImapCommand#getName */
     public String getName() {
-        return NAME;
+        return ImapConstants.UNSUBSCRIBE_COMMAND_NAME;
     }
 
     /** @see CommandTemplate#getArgSyntax */

Copied: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractImapCommandParser.java (from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractImapCommandParser.java)
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractImapCommandParser.java?view=diff&rev=515230&p1=james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractImapCommandParser.java&r1=514102&p2=james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractImapCommandParser.java&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractImapCommandParser.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractImapCommandParser.java Tue Mar  6 09:59:02 2007
@@ -17,7 +17,7 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.imapserver.commands;
+package org.apache.james.imapserver.decode;
 
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -32,22 +32,49 @@
 import org.apache.james.imapserver.ImapConstants;
 import org.apache.james.imapserver.ImapRequestLineReader;
 import org.apache.james.imapserver.ProtocolException;
+import org.apache.james.imapserver.commands.ImapCommand;
+import org.apache.james.imapserver.message.IdRange;
+import org.apache.james.imapserver.message.ImapCommandMessage;
+import org.apache.james.imapserver.message.ImapMessageFactory;
 import org.apache.james.imapserver.store.MessageFlags;
 
 /**
- * TODO: find better name for class
+ * <p>
+ * <strong>Note:</strong> 
+ * </p>
  * @version $Revision: 109034 $
  */
-public abstract class AbstractImapCommandParser extends AbstractLogEnabled implements ImapCommandParser
+public abstract class AbstractImapCommandParser extends AbstractLogEnabled implements ImapCommandParser, MessagingImapCommandParser
 {
-    private final ImapCommand command;
+    private ImapCommand command;
+    private ImapMessageFactory messageFactory;
     
-    
-    public AbstractImapCommandParser(final ImapCommand command) {
+    public AbstractImapCommandParser() {
         super();
-        this.command = command;
     }
     
+    public ImapCommand getCommand() {
+        return command;
+    }
+    
+    protected void setCommand(ImapCommand command) {
+        this.command = command;
+    }
+
+    /**
+     * @see org.apache.james.imapserver.decode.MessagingImapCommandParser#getMessageFactory()
+     */
+    public ImapMessageFactory getMessageFactory() {
+        return messageFactory;
+    }
+
+    /**
+     * @see org.apache.james.imapserver.decode.MessagingImapCommandParser#setMessageFactory(org.apache.james.imapserver.message.ImapMessageFactory)
+     */
+    public void setMessageFactory(ImapMessageFactory messageFactory) {
+        this.messageFactory = messageFactory;
+    }
+
     /**
      * Parses a request into a command message
      * for later processing.
@@ -58,18 +85,16 @@
         ImapCommandMessage result;
         try {
             
-            AbstractImapCommandMessage message = decode(request, tag);
+            ImapCommandMessage message = decode(command, request, tag);
             final Logger logger = getLogger();
-            if (logger != null) {
-                message.enableLogging(logger);
-            }
+            setupLogger(message);
             result = message;
             
         } catch ( ProtocolException e ) {
             getLogger().debug("error processing command ", e);
             String msg = e.getMessage() + " Command should be '" +
                     command.getExpectedMessage() + "'";
-            result = new ErrorResponseMessage( msg, tag );
+            result = messageFactory.createErrorMessage( msg, tag );
         }
         return result;
     }
@@ -79,25 +104,11 @@
      * for later processing.
      * @param request <code>ImapRequestLineReader</code>, not null
      * @param tag TODO
-     * @return <code>ImapCommandMessage</code>, not null
-     * @throws ProtocolException if the request cannot be parsed
-     */
-    public final AbstractImapCommandMessage decode( ImapRequestLineReader request, String tag ) 
-        throws ProtocolException {
-        final AbstractImapCommandMessage result = decode(command, request, tag);
-        return result;
-    }
-    
-    /**
-     * Parses a request into a command message
-     * for later processing.
-     * @param request <code>ImapRequestLineReader</code>, not null
-     * @param tag TODO
      * @param command <code>ImapCommand</code> to be parsed, not null
      * @return <code>ImapCommandMessage</code>, not null
      * @throws ProtocolException if the request cannot be parsed
      */
-    protected abstract AbstractImapCommandMessage decode( ImapCommand command, ImapRequestLineReader request, String tag ) 
+    protected abstract ImapCommandMessage decode( ImapCommand command, ImapRequestLineReader request, String tag ) 
         throws ProtocolException;
     
     /**

Copied: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractUidCommandParser.java (from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractUidCommandParser.java)
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractUidCommandParser.java?view=diff&rev=515230&p1=james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractUidCommandParser.java&r1=514102&p2=james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractUidCommandParser.java&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AbstractUidCommandParser.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AbstractUidCommandParser.java Tue Mar  6 09:59:02 2007
@@ -17,32 +17,31 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.imapserver.commands;
+package org.apache.james.imapserver.decode;
 
 import org.apache.james.imapserver.ImapRequestLineReader;
 import org.apache.james.imapserver.ProtocolException;
+import org.apache.james.imapserver.commands.ImapCommand;
+import org.apache.james.imapserver.message.ImapCommandMessage;
 
 abstract class AbstractUidCommandParser extends AbstractImapCommandParser {
-
-    private final ImapCommand command;
     
-    public AbstractUidCommandParser(ImapCommand command) {
-        super(command);
-        this.command = command;
+    public AbstractUidCommandParser() {
     }
 
-    protected AbstractImapCommandMessage decode(ImapCommand command,
+    protected ImapCommandMessage decode(ImapCommand command,
             ImapRequestLineReader request, String tag) throws ProtocolException {
-        final AbstractImapCommandMessage result = decode(command, request, tag, false);
+        final ImapCommandMessage result = decode(command, request, tag, false);
         return result;
     }
     
-    public AbstractImapCommandMessage decode(ImapRequestLineReader request, 
+    public ImapCommandMessage decode(ImapRequestLineReader request, 
             String tag, boolean useUids) throws ProtocolException {
-        final AbstractImapCommandMessage result = decode(command, request, tag, useUids);
+        final ImapCommand command = getCommand();
+        final ImapCommandMessage result = decode(command, request, tag, useUids);
         return result;
     }
 
-    protected abstract AbstractImapCommandMessage decode(ImapCommand command,
+    protected abstract ImapCommandMessage decode(ImapCommand command,
             ImapRequestLineReader request, String tag, boolean useUids) throws ProtocolException;
 }

Copied: james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AppendCommandParser.java (from r514102, james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommandParser.java)
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AppendCommandParser.java?view=diff&rev=515230&p1=james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommandParser.java&r1=514102&p2=james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AppendCommandParser.java&r2=515230
==============================================================================
--- james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/commands/AppendCommandParser.java (original)
+++ james/server/sandbox/seda-imap/src/java/org/apache/james/imapserver/decode/AppendCommandParser.java Tue Mar  6 09:59:02 2007
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.imapserver.commands;
+package org.apache.james.imapserver.decode;
 
 import java.io.ByteArrayInputStream;
 import java.util.Date;
@@ -26,12 +26,23 @@
 
 import org.apache.james.imapserver.ImapRequestLineReader;
 import org.apache.james.imapserver.ProtocolException;
+import org.apache.james.imapserver.commands.ImapCommand;
+import org.apache.james.imapserver.commands.ImapCommandFactory;
+import org.apache.james.imapserver.message.ImapCommandMessage;
+import org.apache.james.imapserver.message.ImapMessageFactory;
 
-class AppendCommandParser extends AbstractImapCommandParser
-{        
+class AppendCommandParser extends AbstractImapCommandParser implements InitialisableCommandFactory {        
 
     public AppendCommandParser() {
-        super(new AppendCommand());
+    }
+    
+    /**
+     * @see org.apache.james.imapserver.decode.InitialisableCommandFactory#init(org.apache.james.imapserver.commands.ImapCommandFactory)
+     */
+    public void init(ImapCommandFactory factory)
+    {
+        final ImapCommand command = factory.getAppend();
+        setCommand(command);
     }
 
     /**
@@ -93,7 +104,7 @@
         return mm;
     }
 
-    protected AbstractImapCommandMessage decode(ImapCommand command, ImapRequestLineReader request, String tag) throws ProtocolException {
+    protected ImapCommandMessage decode(ImapCommand command, ImapRequestLineReader request, String tag) throws ProtocolException {
         String mailboxName = mailbox( request );
         Flags flags = optionalAppendFlags( request );
         if ( flags == null ) {
@@ -105,8 +116,8 @@
         }
         MimeMessage message = mimeMessage( request );
         endLine( request );
-        // TODO: use an object pool
-        final AppendCommandMessage result = new AppendCommandMessage(command, mailboxName, 
+        final ImapMessageFactory factory = getMessageFactory();
+        final ImapCommandMessage result = factory.createAppendMessage(command, mailboxName, 
                 flags, datetime, message, tag);
         return result;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message