Class GetQuotaCommand
java.lang.Object
com.icegreen.greenmail.imap.commands.GetQuotaCommand
- All Implemented Interfaces:
ImapCommand, ImapConstants
- Direct Known Subclasses:
GetQuotaRootCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Loggerstatic final Stringprotected CommandParserFields inherited from interface ImapConstants
BAD, BYE, HIERARCHY_DELIMITER, HIERARCHY_DELIMITER_CHAR, INBOX_NAME, MESSAGES, NAMESPACE_PREFIX, NAMESPACE_PREFIX_CHAR, NO, OK, SP, STORAGE, UNTAGGED, USER_NAMESPACE, VERSIONModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final charstatic final Stringstatic final Stringstatic final Stringstatic final charstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendQuota(Quota quota, StringBuilder buf) protected voidappendQuotaRootName(Quota quota, StringBuilder buf) protected voiddoProcess(ImapRequestLineReader request, ImapResponse response, ImapSession session) This is the method overridden by specific command implementations to perform commend-specific processing.protected final StringProvides the syntax for the command arguments if any.protected StringProvides a message which describes the expected format and arguments for this command.protected MailFoldergetMailbox(String mailboxName, ImapSession session, boolean mustExist) final StringgetName()voidprocess(ImapRequestLineReader request, ImapResponse response, ImapSession session) Template methods for handling command processing.protected static StringRenders a client-supplied quota root / mailbox name as an IMAP quoted string, escaping the quoted-specials and dropping CR/LF so it cannot terminate the quoted string early or inject extra response lines.booleanvalidForState(ImapSessionState state) Check that the state isImapSessionState.AUTHENTICATEDorImapSessionState.SELECTED
-
Field Details
-
NAME
- See Also:
-
log
protected final org.slf4j.Logger log -
parser
-
-
Constructor Details
-
GetQuotaCommand
-
-
Method Details
-
doProcess
protected void doProcess(ImapRequestLineReader request, ImapResponse response, ImapSession session) throws ProtocolException, FolderException, AuthorizationException This is the method overridden by specific command implementations to perform commend-specific processing.- Parameters:
request- The client requestresponse- The server responsesession- The current client session- Throws:
ProtocolExceptionFolderExceptionAuthorizationException
-
appendQuota
-
appendQuotaRootName
-
quoteName
-
validForState
Check that the state isImapSessionState.AUTHENTICATEDorImapSessionState.SELECTED- Specified by:
validForStatein interfaceImapCommand- Parameters:
state- The currentstateof theImapSession- Returns:
trueif the command is valid in this state.- See Also:
-
process
Template methods for handling command processing. This method reads argument values (validating them), and checks the request for correctness. If correct, the command processing is delegated to the specific command implementation.- Specified by:
processin interfaceImapCommand- Parameters:
request- The current client requestresponse- The current server responsesession- The current session- See Also:
-
getExpectedMessage
Provides a message which describes the expected format and arguments for this command. This is used to provide user feedback when a command request is malformed.- Returns:
- A message describing the command protocol format.
-
getArgSyntax
Provides the syntax for the command arguments if any. This value is used to provide user feedback in the case of a malformed request.For commands which do not allow any arguments,
nullshould be returned.- Returns:
- The syntax for the command arguments, or
nullfor commands without arguments.
-
getMailbox
protected MailFolder getMailbox(String mailboxName, ImapSession session, boolean mustExist) throws FolderException - Throws:
FolderException
-
getParser
-
getName
- Specified by:
getNamein interfaceImapCommand- Returns:
- the name of the command, as specified in rfc2060.
-