Package org.apache.james.imap.message.response

Examples of org.apache.james.imap.message.response.ListRightsResponse


     * (org.apache.james.imap.api.ImapMessage,
     * org.apache.james.imap.encode.ImapResponseComposer,
     * org.apache.james.imap.api.process.ImapSession)
     */
    protected void doEncode(ImapMessage acceptableMessage, ImapResponseComposer composer, ImapSession session) throws IOException {
        final ListRightsResponse listRightsResponse = (ListRightsResponse) acceptableMessage;
        composer.untagged();
        composer.commandName(ImapConstants.LISTRIGHTS_RESPONSE_NAME);
       
        String mailboxName = listRightsResponse.getMailboxName();
        composer.mailbox(mailboxName == null ? "" : mailboxName);
       
        String identifier = listRightsResponse.getIdentifier();
        composer.quote(identifier);
       
        MailboxACLRights[] rights = listRightsResponse.getRights();
       
        for (MailboxACLRights entry : rights) {
            composer.quote(entry.serialize());
       }
        composer.end();
View Full Code Here


                // the server MUST refuse to perform the command with a BAD response.
                // Note that Section 6 recommends additional identifier’s verification
                // steps.
               
                MailboxACLRights[] rights = messageManager.listRigths(key, mailboxSession);
                ListRightsResponse aclResponse = new ListRightsResponse(mailboxName, identifier, rights);
                responder.respond(aclResponse);
                okComplete(command, tag, responder);
                // FIXME should we send unsolicited responses here?
                // unsolicitedResponses(session, responder, false);
            }
View Full Code Here

        expectations.allowing(metaDataStub).getACL();
        expectations.will(Expectations.returnValue(acl));

        mockery.checking(expectations);

        final ListRightsResponse response = new ListRightsResponse(MAILBOX_NAME, USER_1, listRights);
        final Responder responderMock = mockery.mock(Responder.class);
        mockery.checking(new Expectations() {
            {
                oneOf(responderMock).respond(with(equal(response)));
                oneOf(responderMock).respond(with(new StatusResponseTypeMatcher(StatusResponse.Type.OK)));
View Full Code Here

TOP

Related Classes of org.apache.james.imap.message.response.ListRightsResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.