Package org.apache.james.mailbox.MailboxSession

Examples of org.apache.james.mailbox.MailboxSession.User


     * @param session
     * @return jcrSession
     * @throws RepositoryException
     */
    public Session login(MailboxSession session) throws RepositoryException {
        User user = session.getUser();
        String username = user.getUserName();
        String password = user.getPassword();
        char[] pass = null;
        if (password != null) {
            pass = password.toCharArray();
        }
        return login(session, username, pass);
View Full Code Here


    /**
     * @see org.apache.james.mailbox.MessageManager#hasRight(org.apache.james.mailbox.MailboxACL.MailboxACLRight,
     *      org.apache.james.mailbox.MailboxSession)
     */
    public boolean hasRight(MailboxACLRight right, MailboxSession session) throws UnsupportedRightException {
        User user = session.getUser();
        String userName = user != null ? user.getUserName() : null;

        return aclResolver.hasRight(userName, groupMembershipResolver, right, mailbox.getACL(), mailbox.getUser(), isGroupFolder(session));
    }
View Full Code Here

    /**
     * @see org.apache.james.mailbox.MessageManager#myRights(org.apache.james.mailbox.MailboxSession)
     */
    @Override
    public MailboxACLRights myRights(MailboxSession session) throws MailboxException {
        User user = session.getUser();
        if (user != null) {
            return aclResolver.resolveRights(user.getUserName(), groupMembershipResolver, mailbox.getACL(), mailbox.getUser(), isGroupFolder(session));
        } else {
            return SimpleMailboxACL.NO_RIGHTS;
        }
    }
View Full Code Here

    private final static Random RANDOM = new Random();

    private long sessionId = RANDOM.nextLong();
   
    public MockMailboxSession(final String username) {
        this.user = new User() {
           
            public String getUserName() {
                return username;
            }
           
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.MailboxSession.User

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.