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

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


                HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
                no(command, tag, responder, text);
            }
            else {
                MetaData metaData = messageManager.getMetaData(false, mailboxSession, FetchGroup.NO_COUNT);
                ACLResponse aclResponse = new ACLResponse(mailboxName, metaData.getACL());
                responder.respond(aclResponse);
                okComplete(command, tag, responder);
                // FIXME should we send unsolicited responses here?
                // unsolicitedResponses(session, responder, false);
            }
View Full Code Here


     * (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 ACLResponse aclResponse = (ACLResponse) acceptableMessage;
        final Map<MailboxACLEntryKey, MailboxACLRights> entries = aclResponse.getAcl().getEntries();
        composer.untagged();
        composer.commandName(ImapConstants.ACL_RESPONSE_NAME);
       
        String mailboxName = aclResponse.getMailboxName();
        composer.mailbox(mailboxName == null ? "" : mailboxName);
       
        if (entries != null) {
            for (Entry<MailboxACLEntryKey, MailboxACLRights> entry : entries.entrySet()) {
                String identifier = entry.getKey().serialize();
View Full Code Here

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

        mockery.checking(expectations);

        final ACLResponse response = new ACLResponse(MAILBOX_NAME, acl);
        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.ACLResponse

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.