Package org.apache.james.mailbox.model.SimpleMailboxACL

Examples of org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey


                HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
                no(command, tag, responder, text);
            }
            else {
               
                MailboxACLEntryKey key = new SimpleMailboxACLEntryKey(identifier);
               
                // FIXME check if identifier is a valid user or group
                // FIXME Servers, when processing a command that has an identifier as a
                // parameter (i.e., any of SETACL, DELETEACL, and LISTRIGHTS commands),
                // SHOULD first prepare the received identifier using "SASLprep" profile
View Full Code Here


                HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
                no(command, tag, responder, text);
            }
            else {
               
                MailboxACLEntryKey key = new SimpleMailboxACLEntryKey(identifier);
               
                // FIXME check if identifier is a valid user or group
                // FIXME Servers, when processing a command that has an identifier as a
                // parameter (i.e., any of SETACL, DELETEACL, and LISTRIGHTS commands),
                // SHOULD first prepare the received identifier using "SASLprep" profile
View Full Code Here

                HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
                no(command, tag, responder, text);
            }
            else {
               
                MailboxACLEntryKey key = new SimpleMailboxACLEntryKey(identifier);
               
                // FIXME check if identifier is a valid user or group
                // FIXME Servers, when processing a command that has an identifier as a
                // parameter (i.e., any of SETACL, DELETEACL, and LISTRIGHTS commands),
                // SHOULD first prepare the received identifier using "SASLprep" profile
View Full Code Here

        messageManagerStub = mockery.mock(MessageManager.class);
        metaDataStub = mockery.mock(MetaData.class);

        deleteACLRequest = new DeleteACLRequest("TAG", ImapCommand.anyStateCommand("Name"), MAILBOX_NAME, USER_1);

        user1Key = new SimpleMailboxACLEntryKey(USER_1);
    }
View Full Code Here

        messageManagerStub = mockery.mock(MessageManager.class);
        metaDataStub = mockery.mock(MetaData.class);

        listRightsRequest = new ListRightsRequest("TAG", ImapCommand.anyStateCommand("Name"), MAILBOX_NAME, USER_1);

        user1Key = new SimpleMailboxACLEntryKey(USER_1);
        listRights = new MailboxACLRights[] {new Rfc4314Rights("ae"), new Rfc4314Rights("i"), new Rfc4314Rights("k")};
    }
View Full Code Here

        messageManagerStub = mockery.mock(MessageManager.class);
        metaDataStub = mockery.mock(MetaData.class);

        replaceACLRequest = new SetACLRequest("TAG", ImapCommand.anyStateCommand("Name"), MAILBOX_NAME, USER_1, SET_RIGHTS);

        user1Key = new SimpleMailboxACLEntryKey(USER_1);
        setRights = new Rfc4314Rights(SET_RIGHTS);
    }
View Full Code Here

    @Test
    public void testUnionACLExisting() throws UnsupportedRightException {

        Map<MailboxACLEntryKey, MailboxACLRights> expectedEntries = new HashMap<MailboxACL.MailboxACLEntryKey, MailboxACL.MailboxACLRights>(u1u2g1g2ACL.getEntries());
        expectedEntries.put(new SimpleMailboxACLEntryKey(USER_1), new Rfc4314Rights(aeik + lprs));

        MailboxACL toAdd = new SimpleMailboxACL(new SimpleMailboxACL.SimpleMailboxACLEntry[] { new SimpleMailboxACL.SimpleMailboxACLEntry(USER_1, lprs) });
        MailboxACL result = u1u2g1g2ACL.union(toAdd);

        Map<MailboxACLEntryKey, MailboxACLRights> foundEntries = result.getEntries();
View Full Code Here

    @Test
    public void testUnionEntryExisting() throws UnsupportedRightException {

        Map<MailboxACLEntryKey, MailboxACLRights> expectedEntries = new HashMap<MailboxACL.MailboxACLEntryKey, MailboxACL.MailboxACLRights>(u1u2g1g2ACL.getEntries());
        expectedEntries.put(new SimpleMailboxACLEntryKey(USER_1), new Rfc4314Rights(aeik + lprs));

        MailboxACL result = u1u2g1g2ACL.union(new SimpleMailboxACLEntryKey(USER_1), new Rfc4314Rights(lprs));

        Map<MailboxACLEntryKey, MailboxACLRights> foundEntries = result.getEntries();

        assertEquals(foundEntries, expectedEntries);
    }
View Full Code Here

    @Test
    public void testExceptACLExisting() throws UnsupportedRightException {

        Map<MailboxACLEntryKey, MailboxACLRights> expectedEntries = new HashMap<MailboxACL.MailboxACLEntryKey, MailboxACL.MailboxACLRights>(u1u2g1g2ACL.getEntries());
        expectedEntries.put(new SimpleMailboxACLEntryKey(USER_1), new Rfc4314Rights(ik));

        MailboxACL toRemove = new SimpleMailboxACL(new SimpleMailboxACL.SimpleMailboxACLEntry[] { new SimpleMailboxACL.SimpleMailboxACLEntry(USER_1, ae) });
        MailboxACL result = u1u2g1g2ACL.except(toRemove);

        Map<MailboxACLEntryKey, MailboxACLRights> foundEntries = result.getEntries();
View Full Code Here

    @Test
    public void testExceptEntryExisting() throws UnsupportedRightException {

        Map<MailboxACLEntryKey, MailboxACLRights> expectedEntries = new HashMap<MailboxACL.MailboxACLEntryKey, MailboxACL.MailboxACLRights>(u1u2g1g2ACL.getEntries());
        expectedEntries.put(new SimpleMailboxACLEntryKey(USER_1), new Rfc4314Rights(ik));

        MailboxACL result = u1u2g1g2ACL.except(new SimpleMailboxACLEntryKey(USER_1), new Rfc4314Rights(ae));

        Map<MailboxACLEntryKey, MailboxACLRights> foundEntries = result.getEntries();

        assertEquals(foundEntries, expectedEntries);
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey

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.