Package org.apache.james.services

Examples of org.apache.james.services.UsersStore


    private UsersRepository members;

    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


        }
        subjectPrefix = getInitParameter("subjectprefix");

        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

            throws ComponentException
    {

        mailServer = (MailServer) componentManager.
                lookup( "org.apache.james.services.MailServer" );
        UsersStore usersStore = (UsersStore) componentManager.
                lookup( "org.apache.james.services.UsersStore" );
        users = usersStore.getRepository( "LocalUsers" );
        scheduler = (TimeScheduler) componentManager.
                lookup( "org.apache.avalon.cornerstone.services.scheduler.TimeScheduler" );
        imapSystem = (IMAPSystem) componentManager.
                lookup( "org.apache.james.imapserver.IMAPSystem" );
        imapHost = (Host) componentManager.
View Full Code Here

            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" );
        imapHost = ( ImapHost ) componentManager.
                lookup( "org.apache.james.imapserver.ImapHost" );
        if ( users == null ) {
            throw new ComponentException( "The user repository could not be found." );
        }
View Full Code Here

        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

        listeners = new HashSet();
        sequence = new ArrayList();
        recentMessages = new HashSet();
        messagesForDeletion = new HashSet();
        getLogger().info("FileMailbox init for " + absoluteName);
        UsersStore usersStore = (UsersStore)compMgr.lookup( "org.apache.james.services.UsersStore" );
        localUsers = usersStore.getRepository("LocalUsers");
        rootPath = conf.getChild( "mailboxRepository" ).getValue();
        if (!rootPath.endsWith(File.separator)) {
            rootPath = rootPath + File.separator;
        }
       
View Full Code Here

     * <p> Contract is that re-init must be called after configure, contextualize, compose.
     */
    public void reinitialize() throws Exception {
        listeners = new HashSet();
        getLogger().info("FileMailbox reInit for " + absoluteName);
        UsersStore usersStore = (UsersStore)compMgr.lookup( "org.apache.james.services.UsersStore" );
        localUsers = usersStore.getRepository("LocalUsers");
        rootPath
            = conf.getChild("mailboxRepository").getValue();
        if (!rootPath.endsWith(File.separator)) {
            rootPath = rootPath + File.separator;
        }
View Full Code Here

    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

            throws ComponentException
    {

        mailServer = (MailServer) componentManager.
                lookup( "org.apache.james.services.MailServer" );
        UsersStore usersStore = (UsersStore) componentManager.
                lookup( "org.apache.james.services.UsersStore" );
        users = usersStore.getRepository( "LocalUsers" );
        scheduler = (TimeScheduler) componentManager.
                lookup( "org.apache.avalon.cornerstone.services.scheduler.TimeScheduler" );
        imapSystem = (IMAPSystem) componentManager.
                lookup( "org.apache.james.imapserver.IMAPSystem" );
        imapHost = (Host) componentManager.
View Full Code Here

    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

Related Classes of org.apache.james.services.UsersStore

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.