Examples of UsersStore


Examples of org.apache.james.services.UsersStore

        throws ComponentException {
        mailServer = (MailServer)componentManager.lookup(
                                 "org.apache.james.services.MailServer");
        scheduler = (TimeScheduler)componentManager.lookup(
            "org.apache.avalon.cornerstone.services.scheduler.TimeScheduler");
        UsersStore usersStore = (UsersStore)componentManager.lookup(
            "org.apache.james.services.UsersStore" );
        users = usersStore.getRepository("LocalUsers");
    }
View Full Code Here

Examples of org.apache.james.services.UsersStore

    /**
     * Fetch the repository of users
     */
    protected void initUsersRepository() throws Exception {
        ServiceManager compMgr = (ServiceManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
        UsersStore usersStore = (UsersStore) compMgr.lookup(UsersStore.ROLE);
        String repName = getInitParameter("repositoryName");

        usersRepository = usersStore.getRepository(repName);
        if (usersRepository == null) throw new Exception("Invalid user repository: " + repName);
    }
View Full Code Here

Examples of org.apache.james.services.UsersStore

     * Fetch the repository of users
     */
    protected void initUsersRepository() {
        ServiceManager compMgr = (ServiceManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
        try {
            UsersStore usersStore = (UsersStore) compMgr.lookup(UsersStore.ROLE);
            String repName = getInitParameter("repositoryName");

            usersRepository = usersStore.getRepository(repName);
        } catch (Exception e) {
            log("Failed to retrieve Store component:" + e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.james.services.UsersStore

    /**
     * Fetch the repository of users
     */
    protected void initUsersRepository() throws Exception {
        ComponentManager compMgr = (ComponentManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
        UsersStore usersStore = (UsersStore) compMgr.lookup("org.apache.james.services.UsersStore");
        String repName = getInitParameter("repositoryName");

        usersRepository = usersStore.getRepository(repName);
        if (usersRepository == null) throw new Exception("Invalid user repository: " + repName);
    }
View Full Code Here

Examples of org.apache.james.services.UsersStore

     * Initialize the mailet
     */
    public void init() {
        ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
        try {
            UsersStore usersStore = (UsersStore) compMgr.lookup("org.apache.james.services.UsersStore");
            String repName = getInitParameter("repositoryName");

            members = (UsersRepository) usersStore.getRepository(repName);
        } catch (ComponentException cnfe) {
            log("Failed to retrieve Store component:" + cnfe.getMessage());
        } catch (Exception e) {
            log("Failed to retrieve Store component:" + e.getMessage());
        }
View Full Code Here

Examples of org.apache.james.services.UsersStore

                    MailServer.ROLE).append(
                    "does not implement the required interface.");
            throw new ServiceException("", errorBuffer.toString());
        }

        UsersStore usersStore =
            (UsersStore) manager.lookup("org.apache.james.services.UsersStore");
        setLocalUsers(usersStore.getRepository("LocalUsers"));
        if (getLocalUsers() == null)
            throw new ServiceException(
                "",
                "The user repository could not be found.");
    }
View Full Code Here

Examples of org.apache.james.services.UsersStore

            // Ignore any exceptions, default to true
        }

        ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
        try {
            UsersStore usersStore = (UsersStore)compMgr.lookup("org.apache.james.services.UsersStore");
            String repName = getInitParameter("repositoryName");

            members = (UsersRepository)usersStore.getRepository( repName );
        } catch (ComponentException cnfe) {
            log("Failed to retrieve Store component:" + cnfe.getMessage());
        } catch (Exception e) {
            log("Failed to retrieve Store component:" + e.getMessage());
        }
View Full Code Here

Examples of org.apache.james.services.UsersStore

     * Fetch the repository of users
     */
    protected void initUsersRepository() {
        ComponentManager compMgr = (ComponentManager) getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
        try {
            UsersStore usersStore = (UsersStore) compMgr.lookup("org.apache.james.services.UsersStore");
            String repName = getInitParameter("repositoryName");

            usersRepository = usersStore.getRepository(repName);
        } catch (Exception e) {
            log("Failed to retrieve Store component:" + e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.james.services.UsersStore

    public void compose( final ComponentManager componentManager )
        throws ComponentException {
        super.compose(componentManager);
        mailServer = (MailServer)componentManager.
            lookup( "org.apache.james.services.MailServer" );
        UsersStore usersStore = (UsersStore)componentManager.
            lookup( "org.apache.james.services.UsersStore" );
        users = usersStore.getRepository("LocalUsers");
        if (users == null) {
            throw new ComponentException("The user repository could not be found.");
        }
    }
View Full Code Here

Examples of org.apache.james.services.UsersStore

    public void initialize() throws Exception {
        getLogger().info( "JamesHost init..." );

        imapSystem = (IMAPSystem) compMgr.lookup( IMAPSystem.ROLE );

        UsersStore usersStore = (UsersStore) compMgr.lookup( "org.apache.james.services.UsersStore" );
        localUsers = usersStore.getRepository( "LocalUsers" );

        String recordRepDest
                = conf.getChild( "recordRepository" ).getValue();
        recordRep = new DefaultRecordRepository();
        setupLogger( recordRep, "recordRep" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.