Package org.apache.james.services

Examples of org.apache.james.services.UsersRepository


     * @return false if the user is subscribed, true otherwise
     * @throws MessagingException
     */
    protected boolean checkSubscriptionStatus(Mail mail) throws MessagingException {
        MailAddress mailAddress = mail.getSender();
        UsersRepository usersRepository = getUsersRepository();
        if (usersRepository.contains(mailAddress.toString())) {
            getCommandListservManager().onError(mail,
                    "Invalid request",
                    xmlResources.getString("already.subscribed", getStandardProperties()));
            return false;
        }
View Full Code Here


     * @return false if the user isn't subscribed, true otherwise
     * @throws MessagingException
     */
    protected boolean checkSubscriptionStatus(Mail mail) throws MessagingException {
        MailAddress mailAddress = mail.getSender();
        UsersRepository usersRepository = getUsersRepository();
        if (!usersRepository.contains(mailAddress.toString())) {
            getCommandListservManager().onError(mail,
                    "Invalid request",
                    xmlResources.getString("not.subscribed", getStandardProperties()));
            return false;
        }
View Full Code Here

     * @return false if the user isn't subscribed, true otherwise
     * @throws MessagingException
     */
    protected boolean checkSubscriptionStatus(Mail mail) throws MessagingException {
        MailAddress mailAddress = mail.getSender();
        UsersRepository usersRepository = getUsersRepository();
        if (!usersRepository.contains(mailAddress.toString())) {
            getCommandListservManager().onError(mail,
                    "Invalid request",
                    xmlResources.getString("not.subscribed", getStandardProperties()));
            return false;
        }
View Full Code Here

            if (theClassLoader == null) {
                theClassLoader = this.getClass().getClassLoader();
            }

            UsersRepository rep = (UsersRepository) theClassLoader.loadClass(repClass).newInstance();

            setupLogger(rep);

            ContainerUtil.contextualize(rep,context);
            ContainerUtil.service(rep,manager);
View Full Code Here

     * @param name the name of the desired repository
     *
     * @return the UsersRepository corresponding to the name parameter
     */
    public UsersRepository getRepository(String name) {
        UsersRepository response = (UsersRepository) repositories.get(name);
        if ((response == null) && (getLogger().isWarnEnabled())) {
            getLogger().warn("No users repository called: " + name);
        }
        return response;
    }
View Full Code Here

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

        UsersRepository usersRepository =
            (UsersRepository) manager.lookup(UsersRepository.ROLE);
        setLocalUsers(usersRepository);
    }
View Full Code Here

            if (theClassLoader == null) {
                theClassLoader = this.getClass().getClassLoader();
            }

            UsersRepository rep = (UsersRepository) theClassLoader.loadClass(repClass).newInstance();

            setupLogger(rep);

            ContainerUtil.contextualize(rep,context);
            ContainerUtil.service(rep,manager);
View Full Code Here

     * @param name the name of the desired repository
     *
     * @return the UsersRepository corresponding to the name parameter
     */
    public UsersRepository getRepository(String name) {
        UsersRepository response = (UsersRepository) repositories.get(name);
        if ((response == null) && (getLogger().isWarnEnabled())) {
            getLogger().warn("No users repository called: " + name);
        }
        return response;
    }
View Full Code Here

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

        UsersRepository usersRepository =
            (UsersRepository) manager.lookup(UsersRepository.ROLE);
        setLocalUsers(usersRepository);
    }
View Full Code Here

            Configuration repConf = repConfs[i];
            String repName = repConf.getAttribute("name");
            String repClass = repConf.getAttribute("class");

      getLogger().debug("Starting " + repClass);
            UsersRepository rep = (UsersRepository) Class.forName(repClass).newInstance();

            setupLogger((Component)rep);

            if (rep instanceof Contextualizable) {
                ((Contextualizable) rep).contextualize(context);
View Full Code Here

TOP

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

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.